'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageCreate 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageCreate \- image creation .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_image *\fR\fBmlib_ImageCreate\fR(\fBmlib_type\fR \fItype\fR, \fBmlib_s32\fR \fIchannels\fR, \fBmlib_s32\fR \fIwidth\fR, \fBmlib_s32\fR \fIheight\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageCreate()\fR function creates a mediaLib image data structure and allocates memory space for image 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. .sp .LP To obtain the best performance, it is recommended that you use this function to create a mediaLib image whenever possible, as this guarantees alignment. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fItype\fR\fR .ad .RS 12n .rt Image data type. .RE .sp .ne 2 .mk .na \fB\fIchannels\fR\fR .ad .RS 12n .rt Number of channels in the image. .RE .sp .ne 2 .mk .na \fB\fIwidth\fR\fR .ad .RS 12n .rt Width of image in pixels. .RE .sp .ne 2 .mk .na \fB\fIheight\fR\fR .ad .RS 12n .rt Height of image 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_ImageCreateStruct\fR(3MLIB), \fBmlib_ImageCreateSubimage\fR(3MLIB), \fBmlib_ImageDelete\fR(3MLIB), \fBmlib_ImageSetPaddings\fR(3MLIB), \fBattributes\fR(5)