1IM_MAPLUT(3)               Library Functions Manual               IM_MAPLUT(3)
2
3
4

NAME

6       im_maplut - map an image through a lookup table
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_maplut(in, out, lut)
12       IMAGE *in, *out, *lut;
13
14

DESCRIPTION

16       im_maplut()  maps an image through another image, acting as a LUT (Look
17       Up Table).  The lut may have any type, and the output image will be  of
18       that type.
19
20       The  input image must be an unsigned integer types, that is, it must be
21       one of FMTUCHAR, FMTUSHORT or FMTUINT.
22
23       If the input is FMTUCHAR, then the LUT must have 256 elements, in other
24       words, lut->Xsize * lut->Ysize == 256.
25
26       If  the input is FMTUSHORT or FMTUINT, then the lut may have any number
27       of elements, and input pels whose value is greater  than  lut->Xsize  *
28       lut->Ysize  are  mapped  with the last LUT element. The function counts
29       and prints the number of image elements which overflow in this way.
30
31       As regards bands, there are three cases:
32
33          - If LUT has one band, then the input may have any number of  bands,
34       and
35          each band will pass through the same LUT.
36
37          -  If  LUT has the same number of bands as the input, then each band
38       of the
39          input will be LUTed separately.
40
41          - If the input has one band, then the LUT may  have  any  number  of
42       bands, and
43          the output will have the same number of bands as the LUT.
44
45

RETURN VALUE

47       All functions returns 0 on success and -1 on error.
48

SEE ALSO

50       im_histgr(3), im_hsp(3), im_heq(3), im_identity(3).
51
53       1995, National Gallery and Birkbeck College
54

AUTHORS

56       J. Cupitt, 1995
57       N. Dessipris - 10/05/1991
58
59
60
61                                  10 May 1991                     IM_MAPLUT(3)
Impressum