1mlib_VideoColorBlendABGR_Inmpe(d3iMaLLIiBb)Library Fmulnicbt_iVoindseoColorBlendABGR_Inp(3MLIB)
2
3
4
6 mlib_VideoColorBlendABGR_Inp, mlib_VideoColorBlendABGR_ResetAlpha_Inp -
7 in-place image blend
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 void mlib_VideoColorBlendABGR_Inp(mlib_u32 *src1dst,
14 const mlib_u32 *src2,mlib_s32 src1dst_w,
15 mlib_s32 src1dst_h,mlib_s32 src2_w,
16 mlib_s32 src2_h,mlib_s32 src2_x,
17 mlib_s32 src2_y,mlib_s32 src1dst_lb,
18 mlib_s32 src2_lb,mlib_blend src1dst_blend,
19 mlib_blend src2_blend);
20
21
22 void mlib_VideoColorBlendABGR_ResetAlpha_Inp(mlib_u32 *src1dst,
23 const mlib_u32 *src2, mlib_s32 src1dst_w,
24 mlib_s32 src1dst_h, mlib_s32 src2_w,
25 mlib_s32 src2_h, mlib_s32 src2_x,
26 mlib_s32 src2_y, mlib_s32 src1dst_lb,
27 mlib_s32 src2_lb, mlib_blend src1dst_blend,
28 mlib_blend src2_blend);
29
30
32 The functions use the following equation for blending images:
33
34 src1dst = (src1dst * src1dst_blend) + (src2 * src2_blend)
35
36
37
38 The two multi-banded source images (src1dst and src2) are blended
39 together and the result is stored in src1dst. src1dst_blend specifies
40 the blend function to be applied to the src1dst image and src2_blend
41 specifies the blend function to be applied to the src2 image. src2_x
42 and src2_y specify position of src2 relative to the upper-left corner
43 of src1dst. src2 is clipped to the boundaries of src1dst, if needed.
44
45
46 Possible blend functions are:
47
48 MLIB_BLEND_ZERO
49 MLIB_BLEND_ONE
50 MLIB_BLEND_SRC_ALPHA
51 MLIB_BLEND_ONE_MINUS_SRC_ALPHA
52 MLIB_BLEND_DST_ALPHA
53 MLIB_BLEND_ONE_MINUS_DST_ALPHA
54
55
56
57 MLIB_BLEND_DST_ALPHA is the alpha band of image src1 scaled to the
58 range 0 to 1. MLIB_BLEND_SRC_ALPHA is the alpha band of image src2
59 scaled to the range 0 to 1. The output pixel bands are clamped to the
60 range 0 to 255.
61
62
63 For the mlib_VideoColorBlendABGR_ResetAlpha_Inp() function, the alpha
64 value of every pixel in destination image is set to 0 after blending is
65 complete.
66
68 Each of the functions takes the following arguments:
69
70 src1dst Pointer to 1st input image (also dest. image).
71
72
73 src2 Pointer to 2nd input image.
74
75
76 src1dst_w src1dst image width in pixels.
77
78
79 src1dst_h src1dst image height in rows.
80
81
82 src2_w src2 image width in pixels.
83
84
85 src2_h src2 image height in rows.
86
87
88 src2_x src2 horizontal displacement (in pixels), relative to
89 the upper-left corner of src1dst.
90
91
92 src2_y src2 vertical displacement (in rows), relative to the
93 upper-left corner of src1dst.
94
95
96 src1dst_lb Linebytes for src1dst image.
97
98
99 src2_lb Linebytes for src2 image.
100
101
102 src1dst_blend Blend function for src1dst image.
103
104
105 src2_blend Blend function for src2 image.
106
107
109 None.
110
112 See attributes(5) for descriptions of the following attributes:
113
114
115
116
117 ┌─────────────────────────────┬─────────────────────────────┐
118 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
119 ├─────────────────────────────┼─────────────────────────────┤
120 │Interface Stability │Committed │
121 ├─────────────────────────────┼─────────────────────────────┤
122 │MT-Level │MT-Safe │
123 └─────────────────────────────┴─────────────────────────────┘
124
126 mlib_VideoColorBlendABGR(3MLIB), attributes(5)
127
128
129
130SunOS 5.11 2 Mar 2007mlib_VideoColorBlendABGR_Inp(3MLIB)