Method
VipsImagemaplut
Declaration [src]
int
vips_maplut (
VipsImage* in,
VipsImage** out,
VipsImage* lut,
...
)
Description [src]
Map an image through another image acting as a LUT (Look Up Table). The lut may have any type and the output image will be that type.
The input image will be cast to one of the unsigned integer types, that is,
VipsBandFormat, VipsBandFormat or VipsBandFormat.
If lut is too small for the input type (for example, if in is
VipsBandFormat but lut only has 100 elements), the lut is padded out
by copying the last element. Overflows are reported at the end of
computation.
If lut is too large, extra values are ignored.
If lut has one band and band is -1 (the default), then all bands of in
pass through lut. If band is >= 0, then just that band of in passes
through lut and other bands are just copied.
If lut
has same number of bands as in, then each band is mapped
separately. If in has one band, then lut may have many bands and
the output will have the same number of bands as lut.
::: tip “Optional arguments”
* band: gint, apply one-band lut to this band of in
::: seealso
vips_hist_find(), vips_identity().