Method

VipsImagerecomb

Declaration [src]

int
vips_recomb (
  VipsImage* in,
  VipsImage** out,
  VipsImage* m,
  ...
)

Description [src]

This operation recombines an image’s bands. Each pixel in in is treated as an n-element vector, where n is the number of bands in in, and multiplied by the n x m matrix m to produce the m-band image out.

out is always float, unless in is double, in which case out is double too. No complex images allowed.

It’s useful for various sorts of colour space conversions.

::: seealso vips_bandmean().

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.
m VipsImage
 

Recombination matrix.

 The data is owned by the caller of the function.
... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.