mediaLib Library Functions mlibImageSetStruct(3MLIB)
NAME
mlibImageSetStruct - set image data structure
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageSetStruct(mlibimage *image, mlibtype type,
mlibs32 channels, mlibs32 width, mlibs32 height, mlibs32 stride,
const void *datbuf);
DESCRIPTION
The mlibImageSetStruct() function sets a mediaLib image
data structure using parameters supplied by the user.
The mlibImageSetStruct() function returns MLIBFAILURE if
the supplied parameters do not pass the following sanity
checks:
o image should not be NUL
o type should be MLIBIT, MLIBYTE, MLIBSHORT,
MLIBUSHORT, MLIBINT, MLIBFLOAT, or MLIBDOUBLE
o channels should be between 1 and 4
o width should be greater than 0
o height should be greater than 0
o stride should be no less than width * channels *
(size of type in bytes)
o datbuf should not be NUL
Whenever MLIBFAILURE is returned, the original image data
structure is not changed.
If the data buffer in the image data structure is not NUL,
it is the user's responsibility to free it if necessary.
PARAMETERS
The function takes the following arguments:
image Pointer to the image data structure.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageSetStruct(3MLIB)
type Image data type. It can be MLIBIT, MLIBYTE,
MLIBSHORT, MLIBUSHORT, MLIBINT, MLIBFLOAT,
or MLIBDOUBLE.
channels Number of channels in the image.
width Width of image in pixels.
height Height of image in pixels.
stride Stride of each row of the data space in bytes.
datbuf Pointer to the image data buffer.
RETURN VALUES
MLIBSUCES is returned if the image data structure is set
successfully. MLIBFAILURE is returned when the image data
structure can not be set according to the parameters sup-
plied.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageCreate(3MLIB), mlibImageCreateSubimage(3MLIB),
mlibImageCreateStruct(3MLIB), mlibImageResetStruct(3MLIB),
mlibImageDelete(3MLIB), mlibImageSetFormat(3MLIB),
mlibImageSetPaddings(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|