1mlib_ImageBlend_Fp(3MLIB) mediaLib Library Functions mlib_ImageBlend_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageBlend_Fp - blend with an alpha image
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageBlend_Fp(mlib_image *dst, const mlib_image *src1,
13            const mlib_image *src2, const mlib_image *alpha);
14
15

DESCRIPTION

17       The  mlib_ImageBlend_Fp()  function  blends  two  images  together on a
18       pixel-by-pixel basis using an alpha image, when  alpha  is  also  on  a
19       pixel  basis. The alpha image can be a single-channel image or have the
20       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         dst[x][y][i] = alpha[x][y][0]*src1[x][y][i] +
27                        (1 - alpha[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         dst[x][y][i] = alpha[x][y][i]*src1[x][y][i] +
35                        (1 - alpha[x][y][i])*src2[x][y][i]
36
37

PARAMETERS

39       The function takes the following arguments:
40
41       dst      Pointer to destination image.
42
43
44       src1     Pointer to first source image.
45
46
47       src2     Pointer to second source image.
48
49
50       alpha    Alpha image used to control blending. The pixels in this image
51                should have values in the range of [0.0, 1.0].
52
53

RETURN VALUES

55       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
56       MLIB_FAILURE.
57

ATTRIBUTES

59       See attributes(5) for descriptions of the following attributes:
60
61
62
63
64       ┌─────────────────────────────┬─────────────────────────────┐
65       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
66       ├─────────────────────────────┼─────────────────────────────┤
67       │Interface Stability          │Committed                    │
68       ├─────────────────────────────┼─────────────────────────────┤
69       │MT-Level                     │MT-Safe                      │
70       └─────────────────────────────┴─────────────────────────────┘
71

SEE ALSO

73       mlib_ImageBlend(3MLIB),   mlib_ImageBlend1_Fp_Inp(3MLIB),   mlib_Image‐
74       Blend1_Inp(3MLIB),      mlib_ImageBlend2_Fp_Inp(3MLIB),     mlib_Image‐
75       Blend2_Inp(3MLIB), attributes(5)
76
77
78
79SunOS 5.11                        2 Mar 2007         mlib_ImageBlend_Fp(3MLIB)
Impressum