1mlib_ImageColorOrderedDithemre8dxi8a(L3iMbLILBi)brarmyliFbu_nIcmtaigoenCsolorOrderedDither8x8(3MLIB)
2
3
4

NAME

6       mlib_ImageColorOrderedDither8x8  -  true color to indexed color conver‐
7       sion using ordered dithering
8

SYNOPSIS

10       cc [ flag... ] file... -lmlib [ library... ]
11       #include <mlib.h>
12
13       mlib_status (mlib_image *dst, const mlib_image *src, const mlib_s32 *dmask,
14            mlib_s32 scale, const void *colormap);
15
16

DESCRIPTION

18       The mlib_ImageColorOrderedDither8x8() function converts  a  true  color
19       image to a pseudo color image with the method of ordered dithering. The
20       source image can be an MLIB_BYTE or MLIB_SHORT image with three or four
21       channels.  The  destination  must  be  a  single-channel  MLIB_BYTE  or
22       MLIB_SHORT image.
23
24
25       This function works only with a colorcube, rather than a general lookup
26       table.  The  last  parameter,  colormap,  is an internal data structure
27       (which may include a colorcube) for inverse color mapping. Create it by
28       calling the mlib_ImageColorTrue2IndexInit() function.
29

PARAMETERS

31       The function takes the following arguments:
32
33       dst         Pointer to destination or destination image.
34
35
36       src         Pointer to source or source image.
37
38
39       dmask       Pointer  to  the  8x8  dither mask, in row major order. The
40                   dither mask is transposed differently for  different  chan‐
41                   nels to reduce artifacts.
42
43
44       scale       Scaling factor for dmask to convert the input integer coef‐
45                   ficients into floating-point coefficients:
46
47                     floating-point coefficient = integer coefficient * \
48                     2**(-scale)
49
50
51
52       colormap    Internal data structure for inverse color mapping.
53
54

RETURN VALUES

56       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
57       MLIB_FAILURE.
58

ATTRIBUTES

60       See attributes(5) for descriptions of the following attributes:
61
62
63
64
65       ┌─────────────────────────────┬─────────────────────────────┐
66       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Interface Stability          │Committed                    │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │MT-Level                     │MT-Safe                      │
71       └─────────────────────────────┴─────────────────────────────┘
72

SEE ALSO

74       mlib_ImageColorErrorDiffusion3x3(3MLIB),                 mlib_ImageCol‐
75       orTrue2Index(3MLIB), mlib_ImageColorTrue2IndexFree(3MLIB),  mlib_Image‐
76       ColorTrue2IndexInit(3MLIB), attributes(5)
77
78
79
80SunOS 5.11                        2 Mar 2m0l0i7b_ImageColorOrderedDither8x8(3MLIB)
Impressum