| Current File : //usr/man/man3mlib/mlib_ImageAffineTable_Fp.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_ImageAffineTable_Fp 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageAffineTable_Fp \- affine transformation on an image with table-driven interpolation
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_ImageAffineTable_Fp\fR(\fBmlib_image *\fR\fIdst\fR,
\fBconst mlib_image *\fR\fIsrc\fR, \fBconst mlib_d64 *\fR\fImtx\fR,
\fBconst void *\fR\fIinterp_table\fR, \fBmlib_edge\fR \fIedge\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageAffineTable_Fp()\fR function does affine transformation on a floating-point image with table-driven interpolation.
.sp
.LP
The following equation represents the affine transformation:
.sp
.in +2
.nf
xd = a*xs + b*ys + tx
yd = c*xs + d*ys + ty
.fi
.in -2
.sp
.LP
where a point with coordinates \fB(xs, ys)\fR in the source image is mapped to a point with coordinates \fB(xd, yd)\fR in the destination image.
.sp
.LP
The data type of the images can be \fBMLIB_FLOAT\fR or \fBMLIB_DOUBLE\fR.
.sp
.LP
The width and height of the destination image can be different from the width and height of the source image.
.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 16n
.rt
Pointer to destination image.
.RE
.sp
.ne 2
.mk
.na
\fB\fIsrc\fR\fR
.ad
.RS 16n
.rt
Pointer to source image.
.RE
.sp
.ne 2
.mk
.na
\fB\fImtx\fR\fR
.ad
.RS 16n
.rt
Transformation matrix. \fBmtx[0]\fR holds \fBa\fR; \fBmtx[1]\fR holds \fBb\fR; \fBmtx[2]\fR holds \fBtx\fR; \fBmtx[3]\fR holds \fBc\fR; \fBmtx[4]\fR holds \fBd\fR; \fBmtx[5]\fR holds \fBty\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fIinterp_table\fR\fR
.ad
.RS 16n
.rt
Pointer to an interpolation table. The table is created by the \fBmlib_ImageInterpTableCreate()\fR function.
.RE
.sp
.ne 2
.mk
.na
\fB\fIedge\fR\fR
.ad
.RS 16n
.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
.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_ImageInterpTableCreate\fR(3MLIB), \fBmlib_ImageInterpTableDelete\fR(3MLIB), \fBmlib_ImageAffineTable\fR(3MLIB), \fBmlib_ImageAffine\fR(3MLIB), \fBmlib_ImageAffine_Fp\fR(3MLIB), \fBattributes\fR(5)