1mlib_ImageBlendMulti(3MLIB)mediaLib Library Functionsmlib_ImageBlendMulti(3MLIB)
2
3
4

NAME

6       mlib_ImageBlendMulti - blend multiple images
7

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

RETURN VALUES

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

ATTRIBUTES

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

SEE ALSO

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