1mlib_ImageSetStruct(3MLIB)mediaLib Library Functionsmlib_ImageSetStruct(3MLIB)
2
3
4

NAME

6       mlib_ImageSetStruct - set image data structure
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageSetStruct(mlib_image *image, mlib_type type,
13            mlib_s32 channels, mlib_s32 width, mlib_s32 height, mlib_s32 stride,
14            const void *datbuf);
15
16

DESCRIPTION

18       The mlib_ImageSetStruct() function sets a mediaLib image data structure
19       using parameters supplied by the user.
20
21
22       The mlib_ImageSetStruct() function returns MLIB_FAILURE if the supplied
23       parameters do not pass the following sanity checks:
24
25           o      image should not be NULL
26
27           o      type should be MLIB_BIT, MLIB_BYTE, MLIB_SHORT, MLIB_USHORT,
28                  MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE
29
30           o      channels should be between 1 and 4
31
32           o      width should be greater than 0
33
34           o      height should be greater than 0
35
36           o      stride should be no less than width * channels  *  (size  of
37                  type in bytes)
38
39           o      datbuf should not be NULL
40
41
42       Whenever MLIB_FAILURE is returned, the original image data structure is
43       not changed.
44
45
46       If the data buffer in the image data structure is not NULL, it  is  the
47       user's responsibility to free it if necessary.
48

PARAMETERS

50       The function takes the following arguments:
51
52       image       Pointer to the image data structure.
53
54
55       type        Image data type. It can be MLIB_BIT, MLIB_BYTE, MLIB_SHORT,
56                   MLIB_USHORT, MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE.
57
58
59       channels    Number of channels in the image.
60
61
62       width       Width of image in pixels.
63
64
65       height      Height of image in pixels.
66
67
68       stride      Stride of each row of the data space in bytes.
69
70
71       datbuf      Pointer to the image data buffer.
72
73

RETURN VALUES

75       MLIB_SUCCESS is returned if the image data structure  is  set  success‐
76       fully.  MLIB_FAILURE  is returned when the image data structure can not
77       be set according to the parameters supplied.
78

ATTRIBUTES

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

SEE ALSO

94       mlib_ImageCreate(3MLIB),  mlib_ImageCreateSubimage(3MLIB),  mlib_Image‐
95       CreateStruct(3MLIB),                      mlib_ImageResetStruct(3MLIB),
96       mlib_ImageDelete(3MLIB),   mlib_ImageSetFormat(3MLIB),   mlib_ImageSet‐
97       Paddings(3MLIB), attributes(5)
98
99
100
101SunOS 5.11                        2 Mar 2007        mlib_ImageSetStruct(3MLIB)
Impressum