1mlib_ImageBlendColor_Fp_Inpm(e3dMiLaILBi)b Library Fumnlcitbi_oInmsageBlendColor_Fp_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageBlendColor_Fp_Inp - blend an image and a color, in place
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageBlendColor_Fp_Inp(mlib_image *srcdst,
13            const mlib_d64 *color, mlib_s32 cmask);
14
15

DESCRIPTION

17       The  mlib_ImageBlendColor_Fp_Inp() function blends an image and a color
18       with the alpha channel.
19
20
21       It uses the following equation:
22
23         Cd = Cs*As + Cc*(1 - As)
24         Ad = 1.0
25
26
27
28       where, Cs and Cd are the RGB color components of the source and  desti‐
29       nation images, respectively.  As and Ad are the alpha components of the
30       source and destination images, respectively. Cc is the color  component
31       of the constant color.
32
33
34       For  MLIB_FLOAT  and  MLIB_DOUBLE  images,  the  alpha coefficients are
35       assumed to be in the range of [0.0, 1.0].
36
37
38       The images can have two to four channels. The  length  of  color  array
39       must not be less than the number of channels in the images.
40

PARAMETERS

42       The function takes the following arguments:
43
44       srcdst    Pointer to the source and destination image.
45
46
47       color     Array of constant color components.
48
49
50       cmask     Channel mask to indicate the alpha channel. Each bit of cmask
51                 represents a channel in the image. The channel  corresponding
52                 to the highest bit with value 1 is the alpha channel.
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_ImageBlendColor_Fp(3MLIB),            mlib_ImageBlendColor(3MLIB),
75       mlib_ImageBlendColor_Inp(3MLIB), attributes(5)
76
77
78
79SunOS 5.11                        2 Mar 2007mlib_ImageBlendColor_Fp_Inp(3MLIB)
Impressum