1mlib_ImageBlendMulti_Fp(3MLmIeBd)iaLib Library Functimolnisb_ImageBlendMulti_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageBlendMulti_Fp - blend multiple images
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageBlendMulti_Fp(mlib_image *dst,
13            const mlib_image **srcs, const mlib_image **alphas, const mlib_d64 *c,
14            mlib_s32 n);
15
16

DESCRIPTION

18       The  mlib_ImageBlendMulti_Fp()  function blends multiple source images,
19       using multiple alpha images, into a single destination image.
20
21
22       All images involved should have the same data type and  same  size  and
23       the  source and destination images should have the same number of chan‐
24       nels.  The alpha images should have either 1 channel or the same number
25       of  channels  as  the  sources and destination.  A single-channel alpha
26       image would be applied to all  channels  of  the  corresponding  source
27       image.   Single and multi-channel alpha images can be mixed in the same
28       invocation.
29
30
31       It uses the following equation:
32
33                         n-1
34                         SUM {alphas[k][x][y][j] * srcs[k][x][y][i]}
35                         k=0
36         dst[x][y][i] = ---------------------------------------------
37                         n-1
38                         SUM {alphas[k][x][y][j]}
39                         k=0
40
41
42
43       or
44
45                                   n-1
46         dst[x][y][i] = c[i]    if SUM {alphas[k][x][y][j]} = 0
47                                   k=0
48
49
50
51       where j = i for multi-channel alpha images; j =  0  for  signle-channel
52       alpha images.
53

PARAMETERS

55       The function takes the following arguments:
56
57       dst       Pointer to destination image.
58
59
60       srcs      Pointer to an array of source images.
61
62
63       alphas    Pointer to an array of alpha images.
64
65
66       c         Background color.
67
68
69       n         Number of source images to be blended.
70
71

RETURN VALUES

73       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
74       MLIB_FAILURE.
75

ATTRIBUTES

77       See attributes(5) for descriptions of the following attributes:
78
79
80
81
82       ┌─────────────────────────────┬─────────────────────────────┐
83       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
84       ├─────────────────────────────┼─────────────────────────────┤
85       │Interface Stability          │Committed                    │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │MT-Level                     │MT-Safe                      │
88       └─────────────────────────────┴─────────────────────────────┘
89

SEE ALSO

91       mlib_ImageBlendMulti(3MLIB),    mlib_ImageBlend(3MLIB),     mlib_Image‐
92       Blend_Fp(3MLIB), attributes(5)
93
94
95
96SunOS 5.11                        2 Mar 2007    mlib_ImageBlendMulti_Fp(3MLIB)
Impressum