1mlib_VideoColorBlendABGR(3MmLeIdBi)aLib Library Functmiloinbs_VideoColorBlendABGR(3MLIB)
2
3
4

NAME

6       mlib_VideoColorBlendABGR,  mlib_VideoColorBlendABGR_ResetAlpha  - image
7       blend
8

SYNOPSIS

10       cc [ flag... ] file... -lmlib [ library... ]
11       #include <mlib.h>
12
13       void mlib_VideoColorBlendABGR(mlib_u32 *dst,
14            const mlib_u32 *src1,const mlib_u32 *src2,
15            mlib_s32 src1_w, mlib_s32 src1_h,
16            mlib_s32 src2_w,mlib_s32 src2_h,
17            mlib_s32 src2_x, mlib_s32 src2_y,
18            mlib_s32 dst_lb,mlib_s32 src1_lb,
19            mlib_s32 src2_lb, mlib_blend src1_blend,
20            mlib_blend src2_blend);
21
22
23       void mlib_VideoColorBlendABGR_ResetAlpha(mlib_u32 *dst,
24            const mlib_u32 *src1,const mlib_u32 *src2,
25            mlib_s32 src1_w, mlib_s32 src1_h,
26            mlib_s32 src2_w,mlib_s32 src2_h,
27            mlib_s32 src2_x, mlib_s32 src2_y,
28            mlib_s32 dst_lb, mlib_s32 src1_lb,
29            mlib_s32 src2_lb, mlib_blend src1_blend,
30            mlib_blend src2_blend);
31
32

DESCRIPTION

34       The functions use the following equation for blending images:
35
36           dst = (src1 * src1_blend) + (src2 * src2_blend)
37
38
39
40       The two multi-banded source images (src1 and src2) are blended together
41       and stored in the destination image (dst). The image buffers pointed to
42       by dst, src1, and src2 contain 4-banded ABGR images, 8 bits per  compo‐
43       nent.  src1_w  and  src1_h are the dimensions of the src1 input buffer.
44       src2_w and src2_h are the dimensions of the src2 input buffer. The out‐
45       put  buffer  must be at least as large as the src1 input buffer. src2_x
46       and src2_y are the offset of the src2 input buffer  relative  to  src1.
47       Where  pixels  in  src2 overlap pixels in src1, the pixels are blended.
48       Pixels in src1 which are outside of src2 are copied into dst. Pixels in
49       the  dst image outside of src1 are left unchanged. src1_blend specifies
50       the blend function to be applied  to  the  pixels  of  src1  image  and
51       src2_blend  specifies the blend function to be applied to the pixels of
52       src2.
53
54
55       Possible blend functions are:
56
57           MLIB_BLEND_ZERO
58           MLIB_BLEND_ONE
59           MLIB_BLEND_SRC_ALPHA
60           MLIB_BLEND_ONE_MINUS_SRC_ALPHA
61           MLIB_BLEND_DST_ALPHA
62           MLIB_BLEND_ONE_MINUS_DST_ALPHA
63
64
65
66       MLIB_BLEND_SRC_ALPHA is the alpha component of image src2 scaled to the
67       range  0.0 to 1.0. MLIB_BLEND_DST_ALPHA is the alpha component of image
68       src1 scaled to the range 0.0 to 1.0. All pixel components  are  treated
69       as  unsigned 8-bit quantities and the output pixel component values are
70       clamped to the range 0 to 255.
71
72
73       For  the  mlib_VideoColorBlendABGR_ResetAlpha()  function,   the  alpha
74       value of every pixel in destination image is set to 0 after blending is
75       complete.
76

PARAMETERS

78       Each of the functions takes the following arguments:
79
80       dst           Pointer to output image.
81
82
83       src1          Pointer to 1st input image.
84
85
86       src2          Pointer to 2nd input image.
87
88
89       src1_w        src1 image width in pixels.
90
91
92       src1_h        src1 image height in rows.
93
94
95       src2_w        src2 image width in pixels.
96
97
98       src2_h        src2 image height in rows.
99
100
101       src2_x        src2 horizontal displacement (in pixels), relative to the
102                     upper-left corner of src1.
103
104
105       src2_y        src2  vertical  displacement  (in  rows), relative to the
106                     upper-left corner of src1.
107
108
109       dst_lb        Linebytes for output image.
110
111
112       src1_lb       Linebytes for 1st input image.
113
114
115       src2_lb       Linebytes for 2nd input image.
116
117
118       src1_blend    Blend function for src1 image.
119
120
121       src2_blend    Blend function for src2 image.
122
123

RETURN VALUES

125       None.
126

ATTRIBUTES

128       See attributes(5) for descriptions of the following attributes:
129
130
131
132
133       ┌─────────────────────────────┬─────────────────────────────┐
134       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
135       ├─────────────────────────────┼─────────────────────────────┤
136       │Interface Stability          │Committed                    │
137       ├─────────────────────────────┼─────────────────────────────┤
138       │MT-Level                     │MT-Safe                      │
139       └─────────────────────────────┴─────────────────────────────┘
140

SEE ALSO

142       mlib_VideoColorBlendABGR_Inp(3MLIB), attributes(5)
143
144
145
146SunOS 5.11                        2 Mar 2007   mlib_VideoColorBlendABGR(3MLIB)
Impressum