'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageRotateIndex 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageRotateIndex \- rotate color-indexed image .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageRotateIndex\fR(\fBmlib_image *\fR\fIdst\fR, \fBconst mlib_image *\fR\fIsrc\fR, \fBmlib_d64\fR \fIangle\fR, \fBmlib_d64\fR \fIxcenter\fR, \fBmlib_d64\fR \fIycenter\fR, \fBmlib_filter\fR \fIfilter\fR, \fBmlib_edge\fR \fIedge\fR, \fBconst void *\fR\fIcolormap\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageRotateIndex()\fR function rotates the source image about a user-defined rotation center in user-defined radians. .sp .LP The width and height of the destination image can be different from the width and height of the source image. The \fB(xcenter, ycenter)\fR 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. .sp .LP The source and destination images must be single-channel images. .sp .LP The image data type must be \fBMLIB_BYTE\fR or \fBMLIB_SHORT\fR. .sp .LP The center of the upper-left corner pixel of an image is located at \fB(0.5, 0.5)\fR. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIdst\fR\fR .ad .RS 12n .rt Pointer to destination image. .RE .sp .ne 2 .mk .na \fB\fIsrc\fR\fR .ad .RS 12n .rt Pointer to source image. .RE .sp .ne 2 .mk .na \fB\fIangle\fR\fR .ad .RS 12n .rt Angle of rotation. The angle is measured in radians clockwise. .RE .sp .ne 2 .mk .na \fB\fIxcenter\fR\fR .ad .RS 12n .rt X coordinate of rotation center in the source image. .RE .sp .ne 2 .mk .na \fB\fIycenter\fR\fR .ad .RS 12n .rt Y coordinate of rotation center in the source image. .RE .sp .ne 2 .mk .na \fB\fIfilter\fR\fR .ad .RS 12n .rt Type of resampling filter. It can be one of the following: .sp .in +2 .nf MLIB_NEAREST MLIB_BILINEAR MLIB_BICUBIC MLIB_BICUBIC2 .fi .in -2 .RE .sp .ne 2 .mk .na \fB\fIedge\fR\fR .ad .RS 12n .rt Type of edge condition. It can be one of the following: .sp .in +2 .nf MLIB_EDGE_DST_NO_WRITE MLIB_EDGE_DST_FILL_ZERO MLIB_EDGE_OP_NEAREST MLIB_EDGE_SRC_EXTEND MLIB_EDGE_SRC_PADDED .fi .in -2 .RE .sp .ne 2 .mk .na \fB\fIcolormap\fR\fR .ad .RS 12n .rt Internal data structure for inverse color mapping. This data structure is generated by the \fBmlib_ImageColorTrue2IndexInit()\fR function. .RE .SH RETURN VALUES .sp .LP The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_ImageRotate\fR(3MLIB), \fBmlib_ImageRotate_Fp\fR(3MLIB), \fBattributes\fR(5)