Vips.Image.join (original) (raw)
Method
VipsImagejoin
Declaration [src]
int
vips_join (
VipsImage* in1,
VipsImage* in2,
VipsImage** out,
VipsDirection direction,
...
)
Description [src]
Join in1
and in2
together, left-right or up-down depending on the value of direction
.
If one is taller or wider than the other, out
will be has high as the smaller. If expand
is TRUE
, then the output will be expanded to contain all of the input pixels.
Use align
to set the edge that the images align on. By default, they align on the edge with the lower value coordinate.
Use background
to set the colour of any pixels in out
which are not present in either in1
or in2
.
Use shim
to set the spacing between the images. By default this is 0.
If the number of bands differs, 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 two n-band images are operated upon.
The two input images are cast up to the smallest common type (see table Smallest common format inarithmetic).
If you are going to be joining many thousands of images in a regular grid, vips_arrayjoin() is a better choice.
Optional arguments
expand
:gboolean
,TRUE
to expand the output image to hold all of the input pixelsshim
:gint
, space between images, in pixelsbackground
: VipsArrayDouble, background ink colouralign
: [enumAlign], low, centre or high alignment
This method is not directly available to language bindings.
Parameters
in2
Type: VipsImage
Second input image.
The data is owned by the caller of the method.
out
Type: VipsImage
Output image.
The argument will be set by the function. |
---|
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
direction
Type: VipsDirection
Join horizontally or vertically.
...
Type: ``
NULL
-terminated list of optional named arguments.
Return value
Type: int
0 on success, -1 on error.