1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 6 March 1997
.ds Re Release 1.2.0
.ds Dp May 02 11:53
.ds Dm 37 scaleimag
.ds Xs 38480 7 scaleimage.gl
.TH GLUSCALEIMAGE 3G
.SH NAME
.B "gluScaleImage
\- scale an image to an arbitrary size
.SH C SPECIFICATION
GLint \f3gluScaleImage\fP(
GLenum \fIformat\fP,
.nf
.ta \w'\f3GLint \fPgluScaleImage( 'u
GLsizei \fIwIn\fP,
GLsizei \fIhIn\fP,
GLenum \fItypeIn\fP,
const void \fI*dataIn\fP,
GLsizei \fIwOut\fP,
GLsizei \fIhOut\fP,
GLenum \fItypeOut\fP,
GLvoid* \fIdataOut\fP )
.fi
.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fItypeOut\fP\ \ 'u
\f2format\fP
Specifies the of the pixel data.
The following symbolic values are valid:
\%\f3GL_COLOR_INDEX\fP,
\%\f3GL_STENCIL_INDEX\fP,
\%\f3GL_DEPTH_COMPONENT\fP,
\%\f3GL_RED\fP,
\%\f3GL_GREEN\fP,
\%\f3GL_BLUE\fP,
\%\f3GL_ALPHA\fP,
\%\f3GL_RGB\fP,
\%\f3GL_RGBA\fP,
\%\f3GL_BGR\fP,
\%\f3GL_BGRA\fP,
\%\f3GL_LUMINANCE\fP, and
\%\f3GL_LUMINANCE_ALPHA\fP.
.TP
\f2wIn\fP, \f2hIn\fP
Specify in pixels the width and height, respectively, of the source image.
.TP
\f2typeIn\fP
Specifies the data type for \f2dataIn\fP. Must be one of
\%\f3GL_UNSIGNED_BYTE\fP,
\%\f3GL_BYTE\fP,
\%\f3GL_BITMAP\fP,
\%\f3GL_UNSIGNED_SHORT\fP,
\%\f3GL_SHORT\fP,
\%\f3GL_UNSIGNED_INT\fP,
\%\f3GL_INT\fP,
\%\f3GL_FLOAT\fP,
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP,
\%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP,
\%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP,
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP, and
\%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP.
.TP
\f2dataIn\fP
Specifies a pointer to the source image.
.TP
\f2wOut\fP, \f2hOut\fP
Specify the width and height, respectively, in pixels of the destination image.
.TP
\f2typeOut\fP
Specifies the data type for \f2dataOut\fP. Must be one of
\%\f3GL_UNSIGNED_BYTE\fP,
\%\f3GL_BYTE\fP,
\%\f3GL_BITMAP\fP,
\%\f3GL_UNSIGNED_SHORT\fP,
\%\f3GL_SHORT\fP,
\%\f3GL_UNSIGNED_INT\fP,
\%\f3GL_INT\fP,
\%\f3GL_FLOAT\fP,
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP,
\%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP,
\%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP,
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP, or
\%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP.
.TP
\f2dataOut\fP
Specifies a pointer to the destination image.
.SH DESCRIPTION
\%\f3gluScaleImage\fP scales a pixel image using the appropriate pixel store modes to
unpack data from the source image and pack data into the destination image.
.P
When shrinking an image, \%\f3gluScaleImage\fP 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.
.P
A return value of zero indicates success, otherwise a GLU error code is returned (see \%\f3gluErrorString\fP).
.P
See the \f3glReadPixels\fP reference page for a description of
the acceptable values for the \f2format\fP, \f2typeIn\fP, and \f2typeOut\fP parameters.
.SH NOTES
Formats \%\f3GL_BGR\fP, and \%\f3GL_BGRA\fP, and types
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP,
\%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP,
\%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP,
\%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP,
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP,
\%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP,
\%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP,
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP, and
\%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP are only available if the GL version
is 1.2 or greater.
.SH ERRORS
\%\f3GLU_INVALID_VALUE\fP is returned if \f2wIn\fP, \f2hIn\fP, \f2wOut\fP, or \f2hOut\fP
is negative.
.P
\%\f3GLU_INVALID_ENUM\fP is returned if \f2format\fP, \f2typeIn\fP, or \f2typeOut\fP is not
legal.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_BYTE_3_3_2\fP or \%\f3GL_UNSIGNED_BYTE_2_3_3_REV\fP
and \f2format\fP is not \%\f3GL_RGB\fP.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_SHORT_5_6_5\fP or \%\f3GL_UNSIGNED_SHORT_5_6_5_REV\fP
and \f2format\fP is not \%\f3GL_RGB\fP.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_SHORT_4_4_4_4\fP or \%\f3GL_UNSIGNED_SHORT_4_4_4_4_REV\fP
and \f2format\fP is neither \%\f3GL_RGBA\fP nor \%\f3GL_BGRA\fP.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_SHORT_5_5_5_1\fP or \%\f3GL_UNSIGNED_SHORT_1_5_5_5_REV\fP
and \f2format\fP is neither \%\f3GL_RGBA\fP nor \%\f3GL_BGRA\fP.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_INT_8_8_8_8\fP or \%\f3GL_UNSIGNED_INT_8_8_8_8_REV\fP
and \f2format\fP is neither \%\f3GL_RGBA\fP nor \%\f3GL_BGRA\fP.
.P
\%\f3GLU_INVALID_OPERATION\fP is returned if \f2typeIn\fP or \f2typeOut\fP is
\%\f3GL_UNSIGNED_INT_10_10_10_2\fP or \%\f3GL_UNSIGNED_INT_2_10_10_10_REV\fP
and \f2format\fP is neither \%\f3GL_RGBA\fP nor \%\f3GL_BGRA\fP.
.SH SEE ALSO
\f3glDrawPixels(3G)\fP, \f3glReadPixels(3G)\fP, \%\f3gluBuild1DMipmaps(3G)\fP, \%\f3gluBuild2DMipmaps(3G)\fP,
\%\f3gluBuild3DMipmaps(3G)\fP,
.BR
\%\f3gluErrorString(3G)\fP
|