Method
VipsImageflatten
Declaration [src]
int
vips_flatten (
VipsImage* in,
VipsImage** out,
...
)
Description [src]
Take the last band of in as an alpha and use it to blend the
remaining channels with background.
The alpha channel is 0 - max_alpha, where max_alpha means 100% image
and 0 means 100% background. background defaults to zero (black).
max_alpha has the default value 255, or 65535 for images tagged as
VipsInterpretation or VipsInterpretation.
Useful for flattening PNG images to RGB.
Non-complex images only.
::: tip “Optional arguments”
* background: VipsArrayDouble colour for new pixels
* max_alpha: gdouble, maximum value for alpha
::: seealso
vips_premultiply(), vips_pngload().
Parameters
out |
VipsImage |
Output image. |
|
| The argument will be set by the function. | |
| The instance takes ownership of the data, and is responsible for freeing it. | |
... |
none |
|