1mlib_ImageColorErrorDiffusimoend3ixa3L(i3bMLLIiBb)ramrlyibF_uInmcatgieoCnoslorErrorDiffusion3x3(3MLIB)
2
3
4

NAME

6       mlib_ImageColorErrorDiffusion3x3  - true color to indexed color conver‐
7       sion using error diffusion
8

SYNOPSIS

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

DESCRIPTION

19       The mlib_ImageColorErrorDiffusion3x3() function converts a  true  color
20       image  to  a  pseudo  color  image  with  the method of error diffusion
21       dithering. The source image can be an  MLIB_BYTE  or  MLIB_SHORT  image
22       with  three  or four channels. The destination must be a single-channel
23       MLIB_BYTE or MLIB_SHORT image.
24
25
26       The last parameter, colormap, is an internal data structure for inverse
27       color mapping. Create it by calling the mlib_ImageColorTrue2IndexInit()
28       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       kernel      Pointer to the 3x3 error-distribution kernel, in row  major
40                   order.
41
42
43       scale       The  scaling factor for kernel to convert the input integer
44                   coefficients into floating-point coefficients:
45
46                     floating-point coefficient = integer coefficient * \
47                     2**(-scale)
48
49
50
51       colormap    Internal data structure for inverse color mapping.
52
53

RETURN VALUES

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

ATTRIBUTES

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

SEE ALSO

73       mlib_ImageColorOrderedDither8x8(3MLIB),                  mlib_ImageCol‐
74       orTrue2Index(3MLIB), mlib_ImageColorTrue2IndexFree(3MLIB),  mlib_Image‐
75       ColorTrue2IndexInit(3MLIB), attributes(5)
76
77
78
79SunOS 5.11                        2 Marm2l0i0b7_ImageColorErrorDiffusion3x3(3MLIB)
Impressum