1mlib_ImageMulAlpha_Inp(3MLImBe)diaLib Library Functiomnlsib_ImageMulAlpha_Inp(3MLIB)
2
3
4

NAME

6       mlib_ImageMulAlpha_Inp - alpha channel multiplication, in place
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageMulAlpha_Inp(mlib_image *srcdst, mlib_s32 cmask);
13
14

DESCRIPTION

16       The  mlib_ImageMulAlpha_Inp() function multiplies color channels by the
17       alpha channel on a pixel by pixel basis, in place.
18
19
20       For the MLIB_BYTE image, it uses the following equation:
21
22         srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-8)
23
24
25
26       For the MLIB_SHORT image, it uses the following equation:
27
28         srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-15)
29
30
31
32       For the MLIB_USHORT image, it uses the following equation:
33
34         srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-16)
35
36
37
38       For the MLIB_INT image, it uses the following equation:
39
40         srcdst[x][y][c] = srcdst[x][y][c] * srcdst[x][y][a] * 2**(-31)
41
42
43
44       where c and a are the indices for the  color  channels  and  the  alpha
45       channel, respectively, so c != a.
46

PARAMETERS

48       The function takes the following arguments:
49
50       srcdst    Pointer to source and destination image.
51
52
53       cmask     Channel  mask  to indicate the alpha channel. Each bit of the
54                 mask represents a channel in the image.  The  channel  corre‐
55                 sponding to the 1 bit of cmask is the alpha channel.
56
57

RETURN VALUES

59       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
60       MLIB_FAILURE.
61

ATTRIBUTES

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

SEE ALSO

77       mlib_ImageMulAlpha(3MLIB), mlib_ImageMulAlpha_Fp(3MLIB),  mlib_ImageMu‐
78       lAlpha_Fp_Inp(3MLIB), attributes(5)
79
80
81
82SunOS 5.11                        2 Mar 2007     mlib_ImageMulAlpha_Inp(3MLIB)
Impressum