1mlib_ImageChannelExtract(3MmLeIdBi)aLib Library Functmiloinbs_ImageChannelExtract(3MLIB)
2
3
4
6 mlib_ImageChannelExtract - channel extract
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageChannelExtract(mlib_image *dst,
13 const mlib_image *src, mlib_s32 cmask);
14
15
17 In the mlib_ImageChannelExtract() function, the selected N channels in
18 the source image are copied into the destination image, where N is the
19 number of channels in the destination image. If more than N channels
20 are selected, then the leftmost N channels are extracted. If less than
21 N channels are selected, then the function returns failure status. The
22 channel mask is defined with respect to the source image. The data type
23 of the image can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, MLIB_INT,
24 MLIB_FLOAT, or MLIB_DOUBLE.
25
27 The function takes the following arguments:
28
29 dst Pointer to a destination image.
30
31
32 src Pointer to a source image.
33
34
35 cmask Source or destination channel selection mask. Each bit of the
36 mask represents a channel in the image data. The least signif‐
37 icant bit (LSB) of the mask corresponds to the last channel in
38 the image data. A bit with a value of 1 indicates that the
39 channel is selected.
40
41
43 The function returns MLIB_SUCCESS if successful. Otherwise it returns
44 MLIB_FAILURE.
45
47 See attributes(5) for descriptions of the following attributes:
48
49
50
51
52 ┌─────────────────────────────┬─────────────────────────────┐
53 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
54 ├─────────────────────────────┼─────────────────────────────┤
55 │Interface Stability │Committed │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │MT-Level │MT-Safe │
58 └─────────────────────────────┴─────────────────────────────┘
59
61 mlib_ImageChannelCopy(3MLIB), mlib_ImageChannelInsert(3MLIB),
62 mlib_ImageChannelMerge(3MLIB), mlib_ImageChannelSplit(3MLIB),
63 attributes(5)
64
65
66
67SunOS 5.11 2 Mar 2007 mlib_ImageChannelExtract(3MLIB)