Current File : //usr/man/man3mlib/mlib_ImageCreateSubimage.3mlib
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved 
.TH mlib_ImageCreateSubimage 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageCreateSubimage \- subimage creation
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>

\fBmlib_image *\fR\fBmlib_ImageCreateSubimage\fR(\fBmlib_image *\fR\fIimg\fR, \fBmlib_s32\fR \fIx\fR,
     \fBmlib_s32\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageCreateSubimage()\fR function creates a mediaLib image data structure for a subimage based on a source image. Note that the memory space of the source image data is used for the subimage data. The data type of the image can be \fBMLIB_BIT\fR, \fBMLIB_BYTE\fR, \fBMLIB_SHORT\fR, \fBMLIB_USHORT\fR, \fBMLIB_INT\fR, \fBMLIB_FLOAT\fR, or \fBMLIB_DOUBLE\fR.
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIimg\fR\fR
.ad
.RS 7n
.rt  
Pointer to source image.
.RE

.sp
.ne 2
.mk
.na
\fB\fIx\fR\fR
.ad
.RS 7n
.rt  
X coordinate of subimage origin in the source.
.RE

.sp
.ne 2
.mk
.na
\fB\fIy\fR\fR
.ad
.RS 7n
.rt  
Y coordinate of subimage origin in the source.
.RE

.sp
.ne 2
.mk
.na
\fB\fIw\fR\fR
.ad
.RS 7n
.rt  
Width of the subimage in pixels.
.RE

.sp
.ne 2
.mk
.na
\fB\fIh\fR\fR
.ad
.RS 7n
.rt  
Height of the subimage in pixels.
.RE

.SH RETURN VALUES
.sp
.LP
The function returns a pointer to the \fBmlib_image\fR data structure.
.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_ImageCreate\fR(3MLIB), \fBmlib_ImageCreateStruct\fR(3MLIB), \fBmlib_ImageDelete\fR(3MLIB), \fBmlib_ImageSetPaddings\fR(3MLIB), \fBattributes\fR(5)