1GLUSCALEIMAGE(3G)                OpenGL Manual               GLUSCALEIMAGE(3G)
2
3
4

NAME

6       gluScaleImage - scale an image to an arbitrary size
7

C SPECIFICATION

9       GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn,
10                           GLenum typeIn, const void * dataIn, GLsizei wOut,
11                           GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
12

PARAMETERS

14       format
15           Specifies the format of the pixel data. The following symbolic
16           values are valid: GLU_COLOR_INDEX, GLU_STENCIL_INDEX,
17           GLU_DEPTH_COMPONENT, GLU_RED, GLU_GREEN, GLU_BLUE, GLU_ALPHA,
18           GLU_RGB, GLU_RGBA, GLU_BGR, GLU_BGRA, GLU_LUMINANCE, and
19           GLU_LUMINANCE_ALPHA.
20
21       wIn, hIn
22           Specify in pixels the width and height, respectively, of the source
23           image.
24
25       typeIn
26           Specifies the data type for dataIn. Must be one of
27           GLU_UNSIGNED_BYTE, GLU_BYTE, GLU_BITMAP, GLU_UNSIGNED_SHORT,
28           GLU_SHORT, GLU_UNSIGNED_INT, GLU_INT, GLU_FLOAT,
29           GLU_UNSIGNED_BYTE_3_3_2, GLU_UNSIGNED_BYTE_2_3_3_REV,
30           GLU_UNSIGNED_SHORT_5_6_5, GLU_UNSIGNED_SHORT_5_6_5_REV,
31           GLU_UNSIGNED_SHORT_4_4_4_4, GLU_UNSIGNED_SHORT_4_4_4_4_REV,
32           GLU_UNSIGNED_SHORT_5_5_5_1, GLU_UNSIGNED_SHORT_1_5_5_5_REV,
33           GLU_UNSIGNED_INT_8_8_8_8, GLU_UNSIGNED_INT_8_8_8_8_REV,
34           GLU_UNSIGNED_INT_10_10_10_2, or GLU_UNSIGNED_INT_2_10_10_10_REV.
35
36       dataIn
37           Specifies a pointer to the source image.
38
39       wOut, hOut
40           Specify the width and height, respectively, in pixels of the
41           destination image.
42
43       typeOut
44           Specifies the data type for dataOut. Must be one of
45           GLU_UNSIGNED_BYTE, GLU_BYTE, GLU_BITMAP, GLU_UNSIGNED_SHORT,
46           GLU_SHORT, GLU_UNSIGNED_INT, GLU_INT, GLU_FLOAT,
47           GLU_UNSIGNED_BYTE_3_3_2, GLU_UNSIGNED_BYTE_2_3_3_REV,
48           GLU_UNSIGNED_SHORT_5_6_5, GLU_UNSIGNED_SHORT_5_6_5_REV,
49           GLU_UNSIGNED_SHORT_4_4_4_4, GLU_UNSIGNED_SHORT_4_4_4_4_REV,
50           GLU_UNSIGNED_SHORT_5_5_5_1, GLU_UNSIGNED_SHORT_1_5_5_5_REV,
51           GLU_UNSIGNED_INT_8_8_8_8, GLU_UNSIGNED_INT_8_8_8_8_REV,
52           GLU_UNSIGNED_INT_10_10_10_2, or GLU_UNSIGNED_INT_2_10_10_10_REV.
53
54       dataOut
55           Specifies a pointer to the destination image.
56

DESCRIPTION

58       gluScaleImage scales a pixel image using the appropriate pixel store
59       modes to unpack data from the source image and pack data into the
60       destination image.
61
62       When shrinking an image, gluScaleImage uses a box filter to sample the
63       source image and create pixels for the destination image. When
64       magnifying an image, the pixels from the source image are linearly
65       interpolated to create the destination image.
66
67       A return value of zero indicates success, otherwise a GLU error code is
68       returned (see gluErrorString()).
69
70       See the glReadPixels() reference page for a description of the
71       acceptable values for the format, typeIn, and typeOut parameters.
72

NOTES

74       Formats GLU_BGR, and GLU_BGRA, and types GLU_UNSIGNED_BYTE_3_3_2,
75       GLU_UNSIGNED_BYTE_2_3_3_REV, GLU_UNSIGNED_SHORT_5_6_5,
76       GLU_UNSIGNED_SHORT_5_6_5_REV, GLU_UNSIGNED_SHORT_4_4_4_4,
77       GLU_UNSIGNED_SHORT_4_4_4_4_REV, GLU_UNSIGNED_SHORT_5_5_5_1,
78       GLU_UNSIGNED_SHORT_1_5_5_5_REV, GLU_UNSIGNED_INT_8_8_8_8,
79       GLU_UNSIGNED_INT_8_8_8_8_REV, GLU_UNSIGNED_INT_10_10_10_2, and
80       GLU_UNSIGNED_INT_2_10_10_10_REV are only available if the GL version is
81       1.2 or greater.
82

ERRORS

84       GLU_INVALID_VALUE is returned if wIn, hIn, wOut, or hOut is negative.
85
86       GLU_INVALID_ENUM is returned if format, typeIn, or typeOut is not
87       legal.
88
89       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
90       GLU_UNSIGNED_BYTE_3_3_2 or GLU_UNSIGNED_BYTE_2_3_3_REV and format is
91       not GLU_RGB.
92
93       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
94       GLU_UNSIGNED_SHORT_5_6_5 or GLU_UNSIGNED_SHORT_5_6_5_REV and format is
95       not GLU_RGB.
96
97       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
98       GLU_UNSIGNED_SHORT_4_4_4_4 or GLU_UNSIGNED_SHORT_4_4_4_4_REV and format
99       is neither GLU_RGBA nor GLU_BGRA.
100
101       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
102       GLU_UNSIGNED_SHORT_5_5_5_1 or GLU_UNSIGNED_SHORT_1_5_5_5_REV and format
103       is neither GLU_RGBA nor GLU_BGRA.
104
105       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
106       GLU_UNSIGNED_INT_8_8_8_8 or GLU_UNSIGNED_INT_8_8_8_8_REV and format is
107       neither GLU_RGBA nor GLU_BGRA.
108
109       GLU_INVALID_OPERATION is returned if typeIn or typeOut is
110       GLU_UNSIGNED_INT_10_10_10_2 or GLU_UNSIGNED_INT_2_10_10_10_REV and
111       format is neither GLU_RGBA nor GLU_BGRA.
112

SEE ALSO

114       gluBuild1DMipmaps(), gluBuild2DMipmaps(), gluBuild3DMipmaps(),
115       gluErrorString(), glDrawPixels(), glReadPixels()
116
118       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
119       under the SGI Free Software B License. For details, see
120       http://oss.sgi.com/projects/FreeB/.
121

AUTHORS

123       opengl.org
124
125
126
127opengl.org                        06/10/2014                 GLUSCALEIMAGE(3G)
Impressum