Function
Vipscomposite
Declaration [src]
int
vips_composite (
VipsImage** in,
VipsImage** out,
int n,
int* mode,
...
)
Description [src]
Optional arguments:
compositing_space
:VipsInterpretation
to composite inpremultiplied
: %gboolean, images are already premultipliedx
:VipsArrayInt
, position of subimagesy
:VipsArrayInt
, position of subimages
Composite an array of images together.
Images are placed in a stack, with in
[0] at the bottom and in
[n
- 1] at
the top. Pixels are blended together working from the bottom upwards, with
the blend mode at each step being set by the corresponding VipsBlendMode
in mode
.
Images are transformed to a compositing space before processing. This is
VIPS_INTERPRETATION_sRGB, #VIPS_INTERPRETATION_B_W,
VIPS_INTERPRETATION_RGB16, or #VIPS_INTERPRETATION_GREY16
by default, depending on how many bands and bits the input images have. You can select any other space, such as #VIPS_INTERPRETATION_LAB or #VIPS_INTERPRETATION_scRGB.
The output image is in the compositing space. It will always be
VIPS_FORMAT_FLOAT unless one of the inputs is #VIPS_FORMAT_DOUBLE, in
which case the output will be double as well.
Complex images are not supported.
The output image will always have an alpha band. A solid alpha is added to any input missing an alpha.
The images do not need to match in size or format. They will be expanded to
the smallest common size and format in the usual way. Images are positioned
using the x
and y
parameters, if set.
Image are normally treated as unpremultiplied, so this operation can be used
directly on PNG images. If your images have been through vips_premultiply(),
set premultiplied
.
See also: vips_insert().
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. |
|
mode |
int* |
Array of ( |
|
The data is owned by the caller of the function. | |
... |
|
|