MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
GLUSCALEIMAGE(3G)                                            GLUSCALEIMAGE(3G)



NAME
       gluScaleImage - scale an image to an arbitrary size


C SPECIFICATION
       GLint gluScaleImage( GLenum format,
                            GLsizei wIn,
                            GLsizei hIn,
                            GLenum typeIn,
                            const void *dataIn,
                            GLsizei wOut,
                            GLsizei hOut,
                            GLenum typeOut,
                            GLvoid* dataOut )


PARAMETERS
       format   Specifies  the  format  of the pixel data.  The following sym-
                bolic  values  are  valid:  GLCOLORINDEX,  GLSTENCILINDEX,
                GLDEPTHCOMPONENT,   GLRED,   GLGREN,  GLBLUE,  GLALPHA,
                GLRGB,   GLRGBA,   GLBGR,   GLBGRA,   GLUMINANCE,    and
                GLUMINANCEALPHA.

       wIn, hIn Specify  in  pixels the width and height, respectively, of the
                source image.

       typeIn   Specifies  the  data  type  for  dataIn.  Must   be   one   of
                GLUNSIGNEDBYTE,   GLBYTE,   GLBITMAP,   GLUNSIGNEDSHORT,
                GLSHORT,       GLUNSIGNEDINT,       GLINT,       GLFLOAT,
                GLUNSIGNEDBYTE332,            GLUNSIGNEDBYTE233REV,
                GLUNSIGNEDSHORT565,          GLUNSIGNEDSHORT565REV,
                GLUNSIGNEDSHORT4444,      GLUNSIGNEDSHORT4444REV,
                GLUNSIGNEDSHORT5551,      GLUNSIGNEDSHORT1555REV,
                GLUNSIGNEDINT8888,          GLUNSIGNEDINT8888REV,
                GLUNSIGNEDINT1001001002,                                and
                GLUNSIGNEDINT2100100100REV.

       dataIn   Specifies a pointer to the source image.

       wOut, hOut
                Specify  the  width and height, respectively, in pixels of the
                destination image.

       typeOut  Specifies  the  data  type  for  dataOut.  Must  be   one   of
                GLUNSIGNEDBYTE,   GLBYTE,   GLBITMAP,   GLUNSIGNEDSHORT,
                GLSHORT,       GLUNSIGNEDINT,       GLINT,       GLFLOAT,
                GLUNSIGNEDBYTE332,            GLUNSIGNEDBYTE233REV,
                GLUNSIGNEDSHORT565,          GLUNSIGNEDSHORT565REV,
                GLUNSIGNEDSHORT4444,      GLUNSIGNEDSHORT4444REV,
                GLUNSIGNEDSHORT5551,      GLUNSIGNEDSHORT1555REV,
                GLUNSIGNEDINT8888,          GLUNSIGNEDINT8888REV,
                GLUNSIGNEDINT1001001002, or GLUNSIGNEDINT2100100100REV.

       dataOut  Specifies a pointer to the destination image.

DESCRIPTION
       gluScaleImage  scales  a  pixel image using the appropriate pixel store
       modes to unpack data from the source image and pack data into the  des-
       tination image.

       When  shrinking an image, gluScaleImage uses a box filter to sample the
       source image and create pixels for the destination image.  When  magni-
       fying  an image, the pixels from the source image are linearly interpo-
       lated to create the destination image.

       A return value of zero indicates success, otherwise a GLU error code is
       returned (see gluErrorString).

       See the glReadPixels reference page for a description of the acceptable
       values for the format, typeIn, and typeOut parameters.

NOTES
       Formats  GLBGR,  and  GLBGRA,   and   types   GLUNSIGNEDBYTE332,
       GLUNSIGNEDBYTE233REV,                    GLUNSIGNEDSHORT565,
       GLUNSIGNEDSHORT565REV,                 GLUNSIGNEDSHORT4444,
       GLUNSIGNEDSHORT4444REV,               GLUNSIGNEDSHORT5551,
       GLUNSIGNEDSHORT1555REV,                 GLUNSIGNEDINT8888,
       GLUNSIGNEDINT8888REV,       GLUNSIGNEDINT1001001002,      and
       GLUNSIGNEDINT2100100100REV are only available if the GL version  is
       1.2 or greater.

ERORS
       GLUINVALIDVALUE is returned if wIn, hIn, wOut, or hOut is negative.

       GLUINVALIDENUM  is  returned  if  format,  typeIn,  or typeOut is not
       legal.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDBYTE332  or GLUNSIGNEDBYTE233REV and format is not
       GLRGB.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDSHORT565  or  GLUNSIGNEDSHORT565REV  and format is
       not GLRGB.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDSHORT4444  or  GLUNSIGNEDSHORT4444REV and format
       is neither GLRGBA nor GLBGRA.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDSHORT5551  or  GLUNSIGNEDSHORT1555REV and format
       is neither GLRGBA nor GLBGRA.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDINT8888  or  GLUNSIGNEDINT8888REV  and format is
       neither GLRGBA nor GLBGRA.

       GLUINVALIDOPERATION   is   returned   if   typeIn   or   typeOut   is
       GLUNSIGNEDINT1001001002 or GLUNSIGNEDINT2100100100REV and format
       is neither GLRGBA nor GLBGRA.

SEE ALSO
       glDrawPixels,   glReadPixels,   gluBuild1Dipmaps,   gluBuild2Dipmaps,
       gluBuild3Dipmaps,  gluErrorString




                                                             GLUSCALEIMAGE(3G)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™