1mlib_ImageBlend1_Inp(3MLIB)mediaLib Library Functionsmlib_ImageBlend1_Inp(3MLIB)
2
3
4
6 mlib_ImageBlend1_Inp - blend with an alpha image, in place
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageBlend1_Inp(mlib_image *src1dst,
13 const mlib_image *src2, const mlib_image *alpha);
14
15
17 The mlib_ImageBlend1_Inp() function blends two images together, in
18 place, on a pixel-by-pixel basis using an alpha image, when alpha is
19 also on a pixel basis. The alpha image can be a single-channel image or
20 have 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 src1dst[x][y][i] = a[x][y][0]*src1dst[x][y][i] +
27 (1 - a[x][y][0])*src2[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 src1dst[x][y][i] = a[x][y][i]*src1dst[x][y][i] +
35 (1 - a[x][y][i])*src2[x][y][i]
36
37
39 The function takes the following arguments:
40
41 src1dst Pointer to first source and destination image.
42
43
44 src2 Pointer to second source image.
45
46
47 alpha Alpha image used to control blending. The a value equals
48 (alpha * 2**(-8)) for MLIB_BYTE image, (alpha * 2**(-15))
49 for MLIB_SHORT image, (alpha * 2**(-16)) for MLIB_USHORT
50 image, and (alpha * 2**(-31)) for MLIB_INT image.
51
52
54 The function returns MLIB_SUCCESS if successful. Otherwise it returns
55 MLIB_FAILURE.
56
58 See attributes(5) for descriptions of the following attributes:
59
60
61
62
63 ┌─────────────────────────────┬─────────────────────────────┐
64 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
65 ├─────────────────────────────┼─────────────────────────────┤
66 │Interface Stability │Committed │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │MT-Level │MT-Safe │
69 └─────────────────────────────┴─────────────────────────────┘
70
72 mlib_ImageBlend(3MLIB), mlib_ImageBlend_Fp(3MLIB), mlib_Image‐
73 Blend1_Fp_Inp(3MLIB), mlib_ImageBlend2_Fp_Inp(3MLIB), mlib_Image‐
74 Blend2_Inp(3MLIB), attributes(5)
75
76
77
78SunOS 5.11 2 Mar 2007 mlib_ImageBlend1_Inp(3MLIB)