Function

Vipsarrayjoin

Declaration [src]

int
vips_arrayjoin (
  VipsImage** in,
  VipsImage** out,
  int n,
  ...
)

Description [src]

Optional arguments:

  • across: %gint, number of images per row
  • shim: %gint, space between images, in pixels
  • background: VipsArrayDouble, background ink colour
  • halign: VipsAlign, low, centre or high alignment
  • valign: VipsAlign, low, centre or high alignment
  • hspacing: %gint, horizontal distance between images
  • vspacing: %gint, vertical distance between images

Lay out the images in in in a grid. The grid is across images across and however high is necessary to use up all of in. Images are set down left-to-right and top-to-bottom. across defaults to n.

Each input image is placed with a box of size hspacing by vspacing pixels and cropped. These default to the largest width and largest height of the input images.

Space between images is filled with background. This defaults to 0 (black).

Images are positioned within their hspacing by vspacing box at low, centre or high coordinate values, controlled by halign and valign. These default to left-top.

Boxes are joined and separated by shim pixels. This defaults to 0.

If the number of bands in the input images differs, all but one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the n-band images are operated upon.

The input images are cast up to the smallest common type (see table Smallest common format in arithmetic).

vips_colourspace() can be useful for moving the images to a common colourspace for compositing.

See also: vips_join(), vips_insert(), vips_colourspace().

This function is not directly available to language bindings

Parameters

in An array of VipsImage*
 

Array of input images.

 The length of the array is specified in the n argument.
 The data is owned by the caller of the function.
out VipsImage
 

Output image.

 The argument will be set by the function.
 The called function takes ownership of the data, and is responsible for freeing it.
n int
 

Number of input images.

...
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.