1mlib_ImageColorTrue2Index(3mMeLdIiBa)Lib Library Funcmtliiobn_sImageColorTrue2Index(3MLIB)
2
3
4
6 mlib_ImageColorTrue2Index - true color to indexed color using nearest
7 matched LUT entries
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 mlib_status mlib_ImageColorTrue2Index(mlib_image *dst,
14 const mlib_image *src, const void *colormap);
15
16
18 The mlib_ImageColorTrue2Index() function converts a true color image to
19 a pseudo color image with the method of finding the nearest matched
20 lookup table entry for each pixel. The source image can be an MLIB_BYTE
21 or MLIB_SHORT image with three or four channels. The destination must
22 be a single-channel MLIB_BYTE or MLIB_SHORT image.
23
24
25 The last parameter, colormap, is an internal data structure (which
26 includes the lookup table) for inverse color mapping. Create it by
27 calling the mlib_ImageColorTrue2IndexInit() function.
28
30 The function takes the following arguments:
31
32 dst Pointer to destination or destination image.
33
34
35 src Pointer to source or source image.
36
37
38 colormap Internal data structure for inverse color mapping.
39
40
42 The function returns MLIB_SUCCESS if successful. Otherwise it returns
43 MLIB_FAILURE.
44
46 See attributes(5) for descriptions of the following attributes:
47
48
49
50
51 ┌─────────────────────────────┬─────────────────────────────┐
52 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
53 ├─────────────────────────────┼─────────────────────────────┤
54 │Interface Stability │Committed │
55 ├─────────────────────────────┼─────────────────────────────┤
56 │MT-Level │MT-Safe │
57 └─────────────────────────────┴─────────────────────────────┘
58
60 mlib_ImageColorErrorDiffusion3x3(3MLIB), mlib_ImageColorOrdered‐
61 Dither8x8(3MLIB), mlib_ImageColorTrue2IndexFree(3MLIB), mlib_ImageCol‐
62 orTrue2IndexInit(3MLIB), attributes(5)
63
64
65
66SunOS 5.11 2 Mar 2007 mlib_ImageColorTrue2Index(3MLIB)