mediaLib Library Functions mlibImageRotate(3MLIB)
NAME
mlibImageRotate - rotate image
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageRotate(mlibimage *dst, const mlibimage *src,
mlibd64 angle, mlibd64 xcenter, mlibd64 ycenter, mlibfilter filter,
mlibedge edge);
DESCRIPTION
The mlibImageRotate() function rotates a source image
around a user-defined rotation center in the user-defined
radians.
The width and height of the destination image can be dif-
ferent from the width and height of the source image. The
(xcenter, ycenter) point of the source image is mapped to
the center of the destination image. You should ensure that
the destination buffer is large enough to hold the resulting
bounding box to avoid clipping part of the image.
The data type of the images can be MLIBIT, MLIBYTE,
MLIBSHORT, MLIBUSHORT, or MLIBINT.
The center of the upper-left corner pixel of an image is
located at (0.5, 0.5).
PARAMETERS
The function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
angle Angle of rotation. The angle is measured in radi-
ans clockwise.
xcenter X coordinate of rotation center in the source
image.
ycenter Y coordinate of rotation center in the source
image.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageRotate(3MLIB)
filter Type of resampling filter. It can be one of the
following:
MLIBNEAREST
MLIBILINEAR
MLIBICUBIC
MLIBICUBIC2
edge Type of edge condition. It can be one of the fol-
lowing:
MLIBEDGEDSTNOWRITE
MLIBEDGEDSTFILZERO
MLIBEDGEOPNEAREST
MLIBEDGESRCEXTEND
MLIBEDGESRCPADED
RETURN VALUES
The function returns MLIBSUCES if successful. Otherwise
it returns MLIBFAILURE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageRotateFp(3MLIB), mlibImageRotateIndex(3MLIB),
attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|