1mlib_ImageBlendColor_Fp(3MLmIeBd)iaLib Library Functimolnisb_ImageBlendColor_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageBlendColor_Fp - blend an image and a color
7

SYNOPSIS

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

DESCRIPTION

17       The mlib_ImageBlendColor_Fp() function blends an image and a color with
18       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       dst      Pointer to destination image.
45
46
47       src      Pointer to source image.
48
49
50       color    Array of constant color components.
51
52
53       cmask    Channel  mask to indicate the alpha channel. Each bit of cmask
54                represents a channel in the image. The  channel  corresponding
55                to the highest bit with value 1 is the alpha channel.
56
57

RETURN VALUES

59       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
60       MLIB_FAILURE.
61

ATTRIBUTES

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

SEE ALSO

77       mlib_ImageBlendColor_Fp_Inp(3MLIB),        mlib_ImageBlendColor(3MLIB),
78       mlib_ImageBlendColor_Inp(3MLIB), attributes(5)
79
80
81
82SunOS 5.11                        2 Mar 2007    mlib_ImageBlendColor_Fp(3MLIB)
Impressum