'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageCopySubimage 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageCopySubimage \- copy subimage .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageCopySubimage\fR(\fBmlib_image *\fR\fIdst\fR, \fBconst mlib_image *\fR\fIsrc\fR, \fBmlib_s32\fR \fIxd\fR, \fBmlib_s32\fR \fIyd\fR, \fBmlib_s32\fR \fIxs\fR, \fBmlib_s32\fR \fIys\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageCopySubimage()\fR function copies a specified rectangular area from one image to a specified area of another image. The data type of the images can be \fBMLIB_BIT\fR, \fBMLIB_BYTE\fR, \fBMLIB_SHORT\fR, \fBMLIB_USHORT\fR, \fBMLIB_INT\fR, \fBMLIB_FLOAT\fR, or \fBMLIB_DOUBLE\fR. .sp .LP It uses the following equation: .sp .in +2 .nf dst[xd+i][yd+j][i] = src[xs+i][ys+j][i] .fi .in -2 .sp .LP where \fBi = 0, 1, ..., w-1; j = 0, 1, ..., h-1\fR. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIdst\fR\fR .ad .RS 7n .rt Pointer to destination image. .RE .sp .ne 2 .mk .na \fB\fIsrc\fR\fR .ad .RS 7n .rt Pointer to source image. .RE .sp .ne 2 .mk .na \fB\fIxd\fR\fR .ad .RS 7n .rt X coordinate of the area origin in the destination. .RE .sp .ne 2 .mk .na \fB\fIyd\fR\fR .ad .RS 7n .rt Y coordinate of the area origin in the destination. .RE .sp .ne 2 .mk .na \fB\fIxs\fR\fR .ad .RS 7n .rt X coordinate of the area origin in the source. .RE .sp .ne 2 .mk .na \fB\fIys\fR\fR .ad .RS 7n .rt Y coordinate of the area origin in the source. .RE .sp .ne 2 .mk .na \fB\fIw\fR\fR .ad .RS 7n .rt Width of the area to be copied. .RE .sp .ne 2 .mk .na \fB\fIh\fR\fR .ad .RS 7n .rt Height of the area to be copied. .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_ImageCopy\fR(3MLIB), \fBmlib_ImageCopyArea\fR(3MLIB), \fBmlib_ImageCopyMask\fR(3MLIB), \fBmlib_ImageCopyMask_Fp\fR(3MLIB), \fBattributes\fR(5)