1mlib_ImageBlend2_Fp_Inp(3MLmIeBd)iaLib Library Functimolnisb_ImageBlend2_Fp_Inp(3MLIB)
2
3
4
6 mlib_ImageBlend2_Fp_Inp - blend with an alpha image
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageBlend2_Fp_Inp(mlib_image *src2dst,
13 const mlib_image *src1, const mlib_image *alpha);
14
15
17 The mlib_ImageBlend2_Fp_Inp() function blends two images together, in
18 place, on a pixel-by-pixel basis using an alpha image, when a is also
19 on a pixel basis. The alpha image can be a single-channel image or have
20 the same number of channels as the source and destination images.
21
22
23 It uses the following equation when the alpha image is a single-channel
24 image:
25
26 src2dst[x][y][i] = alpha[x][y][0]*src1[x][y][i] +
27 (1 - alpha[x][y][0])*src2dst[x][y][i]
28
29
30
31 It uses the following equation when the alpha image has the same number
32 of channels as the source and destination images:
33
34 src2dst[x][y][i] = alpha[x][y][i]*src1[x][y][i] +
35 (1 - alpha[x][y][i])*src2dst[x][y][i]
36
37
38
39 It uses the following equation:
40
41
42
43
45 The function takes the following arguments:
46
47 src2dst Pointer to second source and destination image.
48
49
50 src1 Pointer to first source image.
51
52
53 alpha Alpha image used to control blending. The pixels in this
54 image should have values in the range of [0.0, 1.0].
55
56
58 The function returns MLIB_SUCCESS if successful. Otherwise it returns
59 MLIB_FAILURE.
60
62 See attributes(5) for descriptions of the following attributes:
63
64
65
66
67 ┌─────────────────────────────┬─────────────────────────────┐
68 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │Interface Stability │Committed │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │MT-Level │MT-Safe │
73 └─────────────────────────────┴─────────────────────────────┘
74
76 mlib_ImageBlend(3MLIB), mlib_ImageBlend_Fp(3MLIB), mlib_Image‐
77 Blend1_Fp_Inp(3MLIB), mlib_ImageBlend1_Inp(3MLIB), mlib_Image‐
78 Blend2_Inp(3MLIB), attributes(5)
79
80
81
82SunOS 5.11 2 Mar 2007 mlib_ImageBlend2_Fp_Inp(3MLIB)