1mlib_ImageScalarBlend(3MLIBm)ediaLib Library Functionmslib_ImageScalarBlend(3MLIB)
2
3
4
6 mlib_ImageScalarBlend - image blending with scalar
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageScalarBlend(mlib_image dst, const mlib_image *src1,
13 const mlib_image *src2, const mlib_s32 *alpha);
14
15
17 The mlib_ImageScalarBlend() function blends the first and second source
18 images by adding each of their scaled pixels. The first source image is
19 scaled by the scalar a, and the second source image is inverse scaled
20 by (1 - a).
21
22
23 It uses the following equation:
24
25 dst[x][y][i] = a[i]*src1[x][y][i] + (1 - a[i])*src2[x][y][i]
26
27
29 The function takes the following arguments:
30
31 dst Pointer to destination image.
32
33
34 src1 Pointer to first source image.
35
36
37 src2 Pointer to second source image.
38
39
40 alpha Scalar blending factor. The a value equals (alpha * 2**(-31)).
41 alpha[i] contains the blending factor for channel i.
42
43
45 The function returns MLIB_SUCCESS if successful. Otherwise it returns
46 MLIB_FAILURE.
47
49 See attributes(5) for descriptions of the following attributes:
50
51
52
53
54 ┌─────────────────────────────┬─────────────────────────────┐
55 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │Interface Stability │Committed │
58 ├─────────────────────────────┼─────────────────────────────┤
59 │MT-Level │MT-Safe │
60 └─────────────────────────────┴─────────────────────────────┘
61
63 mlib_ImageScalarBlend_Fp(3MLIB), mlib_ImageScalarBlend_Fp_Inp(3MLIB),
64 mlib_ImageScalarBlend_Inp(3MLIB), attributes(5)
65
66
67
68SunOS 5.11 2 Mar 2007 mlib_ImageScalarBlend(3MLIB)