Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gluscaleimage(3G) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



gluScaleImage(3G)              OpenGL Reference              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 symbolic
              values are valid:  GLCOLORINDEX, GLSTENCILINDEX,
              GLDEPTHCOMPONENT, GLRED, GLGREEN, GLBLUE, GLALPHA, GLRGB,
              GLRGBA, GLLUMINANCE, GLLUMINANCEALPHA, and GLABGREXT.

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

     typeIn   Specifies the data type for dataIn. Must be one of
              GLUNSIGNEDBYTE, GLBYTE, GLBITMAP, GLUNSIGNEDSHORT,
              GLSHORT, GLUNSIGNEDINT, GLINT, GLFLOAT,
              GLUNSIGNEDBYTE332EXT, GLUNSIGNEDSHORT4444EXT,
              GLUNSIGNEDSHORT5551EXT, GLUNSIGNEDINT8888EXT, or
              GLUNSIGNEDINT1010102EXT.

     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,
              GLUNSIGNEDBYTE332EXT, GLUNSIGNEDSHORT4444EXT,
              GLUNSIGNEDSHORT5551EXT, GLUNSIGNEDINT8888EXT, or
              GLUNSIGNEDINT1010102EXT.

     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
     destination image.



                                                                        Page 1





gluScaleImage(3G)              OpenGL Reference              gluScaleImage(3G)



     When shrinking an image, gluScaleImage uses a box filter to sample the
     source image and create pixels for the destination image.  When
     magnifying an image, the pixels from the source image are linearly
     interpolated 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.

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

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

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

     GLUINVALIDOPERATION is returned if typeIn or typeOut is
     GLUNSIGNEDSHORT4444EXT and format is neither GLRGBA nor
     GLABGREXT.

     GLUINVALIDOPERATION is returned if typeIn or typeOut is
     GLUNSIGNEDSHORT5551EXT and format is neither GLRGBA nor
     GLABGREXT.

     GLUINVALIDOPERATION is returned if typeIn or typeOut is
     GLUNSIGNEDINT8888EXT and format is neither GLRGBA nor
     GLABGREXT.

     GLUINVALIDOPERATION is returned if typeIn or typeOut is
     GLUNSIGNEDINT1010102EXT and format is neither GLRGBA nor
     GLABGREXT.

     GLUINVALIDOPERATION is returned if format is GLABGREXT and the
     GLEXTabgr extension is not supported.

     GLUINVALIDOPERATION is returned if typeIn or typeOut is either
     GLUNSIGNEDBYTE332EXT, GLUNSIGNEDSHORT4444EXT,
     GLUNSIGNEDSHORT5551EXT, GLUNSIGNEDINT8888EXT or
     GLUNSIGNEDINT1010102EXT and the GLEXTpackedpixels extension is
     not supported.

SEE ALSO
     glDrawPixels, glReadPixels, gluBuild1DMipmaps, gluBuild2DMipmaps,
     gluErrorString








                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026