gluScaleImage
NAME
gluScaleImage -- scale an image to an arbitrary size
C SPECIFICATION
int gluScaleImage(GLenum format,
GLint widthin,
GLint heightin,
GLenum typein,
const void *datain,
GLint widthout,
GLint heightout,
GLenum typeout,
void *dataout)
PARAMETERS
- format
-
Specifies the format of the pixel data. The following symbolic values are
valid: GL_COLOR_INDEX, GL_STENCIL_INDEX,
GL_DEPTH_COMPONENT, GL_RED, GL_GREEN,
GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
- widthin, heightin
-
Specify the width and height, respectively, of the source image that is
scaled.
- typein
-
Specifies the data type for datain. Must be one of GL_UNSIGNED_BYTE,
GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT,
GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.
- datain
-
Specifies a pointer to the source image.
- widthout, heightout
-
Specify the width and height, respectively, of the destination image.
- typeout
-
Specifies the data type for dataout. Must be one of GL_UNSIGNED_BYTE,
GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT,
GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.
- 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.
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 indicating what the problem was (see
gluErrorString).
Please refer to the
glReadPixels reference page for a
description of the acceptable values for the format, typein,
and typeout parameters.
SEE ALSO
glDrawPixels,
glReadPixels,
gluBuild1DMipmaps,
gluBuild2DMipmaps,
gluErrorString
back to the OpenGL index page
© 1995 Uwe Behrens All rights reserved