1mlib_ImageResetStruct(3MLIBm)ediaLib Library Functionmslib_ImageResetStruct(3MLIB)
2
3
4

NAME

6       mlib_ImageResetStruct - reset image data structure
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageResetStruct(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_ImageResetStruct()  function  resets  a  mediaLib  image data
19       structure using parameters supplied by the user.
20
21
22       The mlib_ImageResetStruct() function returns MLIB_FAILURE if  the  sup‐
23       plied 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
40       Whenever MLIB_FAILURE is returned, the original image data structure is
41       not changed.
42
43
44       When  datbuf  is  NULL,  the  original  data  buffer  is  reused.    If
45       mlib_ImageIsUserAllocated(image)==0,  such  as  the case the image data
46       structure was created by mlib_ImageCreate(), and the data  buffer  size
47       required  by  the  parameters  supplied  is  larger  than the original,
48       MLIB_FAILURE is returned.
49
50
51       When datbuf is not NULL,  if  mlib_ImageIsUserAllocated(image)==0,  the
52       original  data  buffer  is freed, otherwise the original data buffer is
53       not freed.  If datbuf points to the original data  buffer,  it  is  not
54       freed.
55

PARAMETERS

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

RETURN VALUES

82       MLIB_SUCCESS is returned if the image data structure is reset  success‐
83       fully.  MLIB_FAILURE  is returned when the image data structure can not
84       be reset according to the parameters supplied.
85

ATTRIBUTES

87       See attributes(5) for descriptions of the following attributes:
88
89
90
91
92       ┌─────────────────────────────┬─────────────────────────────┐
93       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
94       ├─────────────────────────────┼─────────────────────────────┤
95       │Interface Stability          │Committed                    │
96       ├─────────────────────────────┼─────────────────────────────┤
97       │MT-Level                     │MT-Safe                      │
98       └─────────────────────────────┴─────────────────────────────┘
99

SEE ALSO

101       mlib_ImageCreate(3MLIB),  mlib_ImageCreateSubimage(3MLIB),  mlib_Image‐
102       CreateStruct(3MLIB),                        mlib_ImageSetStruct(3MLIB),
103       mlib_ImageDelete(3MLIB),   mlib_ImageSetFormat(3MLIB),   mlib_ImageSet‐
104       Paddings(3MLIB), attributes(5)
105
106
107
108SunOS 5.11                        2 Mar 2007      mlib_ImageResetStruct(3MLIB)
Impressum