Scales an image to an arbitrary size.
OpenGL C bindings library: libGL.a
int gluScaleImage(GLenum Format, GLint WidthIn, GLint HeightIn, GLenum TypeIn, const void *DataIn, GLint WidthOut, GLint HeightOut, GLenum TypeOut, void *DataOut)
The gluScaleImage subroutine 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, the gluScaleImage subroutine 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 interpolated linearly to create the destination image.
A return value of zero indicates success; otherwise, a GLU error code is returned. (See the gluErrorString subroutine for standard GLU error codes.)
See the glReadPixels subroutine for a description of valid values for the Format, TypeIn, and TypeOut parameters.
See the glReadPixels subroutine for a description of valid values for the Format, TypeIn, and TypeOut parameters.
0 | Indicates the scaling succeeded. If the subroutine fails, a GLU error code is returned. (See the gluErrorString subroutine for standard GLU error codes.) |
/usr/include/GL/gl.h | Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL. |
The glDrawPixels subroutine, glReadPixels subroutine, gluBuild1DMipmaps subroutine, gluBuild2DMipmaps subroutine, gluErrorString subroutine.