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

NAME

6       gluScaleImage - scale an image to an arbitrary size
7
8

C SPECIFICATION

10       GLint gluScaleImage( GLenum format,
11                            GLsizei wIn,
12                            GLsizei hIn,
13                            GLenum typeIn,
14                            const void *dataIn,
15                            GLsizei wOut,
16                            GLsizei hOut,
17                            GLenum typeOut,
18                            GLvoid* dataOut )
19
20

PARAMETERS

22       format   Specifies the  of the pixel data.  The following symbolic val‐
23                ues    are    valid:     GL_COLOR_INDEX,     GL_STENCIL_INDEX,
24                GL_DEPTH_COMPONENT,   GL_RED,   GL_GREEN,  GL_BLUE,  GL_ALPHA,
25                GL_RGB,   GL_RGBA,   GL_BGR,   GL_BGRA,   GL_LUMINANCE,    and
26                GL_LUMINANCE_ALPHA.
27
28       wIn, hIn Specify  in  pixels the width and height, respectively, of the
29                source image.
30
31       typeIn   Specifies  the  data  type  for  dataIn.  Must   be   one   of
32                GL_UNSIGNED_BYTE,   GL_BYTE,   GL_BITMAP,   GL_UNSIGNED_SHORT,
33                GL_SHORT,       GL_UNSIGNED_INT,       GL_INT,       GL_FLOAT,
34                GL_UNSIGNED_BYTE_3_3_2,            GL_UNSIGNED_BYTE_2_3_3_REV,
35                GL_UNSIGNED_SHORT_5_6_5,          GL_UNSIGNED_SHORT_5_6_5_REV,
36                GL_UNSIGNED_SHORT_4_4_4_4,      GL_UNSIGNED_SHORT_4_4_4_4_REV,
37                GL_UNSIGNED_SHORT_5_5_5_1,      GL_UNSIGNED_SHORT_1_5_5_5_REV,
38                GL_UNSIGNED_INT_8_8_8_8,          GL_UNSIGNED_INT_8_8_8_8_REV,
39                GL_UNSIGNED_INT_10_10_10_2,                                and
40                GL_UNSIGNED_INT_2_10_10_10_REV.
41
42       dataIn   Specifies a pointer to the source image.
43
44       wOut, hOut
45                Specify  the  width and height, respectively, in pixels of the
46                destination image.
47
48       typeOut  Specifies  the  data  type  for  dataOut.  Must  be   one   of
49                GL_UNSIGNED_BYTE,   GL_BYTE,   GL_BITMAP,   GL_UNSIGNED_SHORT,
50                GL_SHORT,       GL_UNSIGNED_INT,       GL_INT,       GL_FLOAT,
51                GL_UNSIGNED_BYTE_3_3_2,            GL_UNSIGNED_BYTE_2_3_3_REV,
52                GL_UNSIGNED_SHORT_5_6_5,          GL_UNSIGNED_SHORT_5_6_5_REV,
53                GL_UNSIGNED_SHORT_4_4_4_4,      GL_UNSIGNED_SHORT_4_4_4_4_REV,
54                GL_UNSIGNED_SHORT_5_5_5_1,      GL_UNSIGNED_SHORT_1_5_5_5_REV,
55                GL_UNSIGNED_INT_8_8_8_8,          GL_UNSIGNED_INT_8_8_8_8_REV,
56                GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV.
57
58       dataOut  Specifies a pointer to the destination image.
59

DESCRIPTION

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

NOTES

77       Formats   GL_BGR,   and   GL_BGRA,  and  types  GL_UNSIGNED_BYTE_3_3_2,
78       GL_UNSIGNED_BYTE_2_3_3_REV,                    GL_UNSIGNED_SHORT_5_6_5,
79       GL_UNSIGNED_SHORT_5_6_5_REV,                 GL_UNSIGNED_SHORT_4_4_4_4,
80       GL_UNSIGNED_SHORT_4_4_4_4_REV,               GL_UNSIGNED_SHORT_5_5_5_1,
81       GL_UNSIGNED_SHORT_1_5_5_5_REV,                 GL_UNSIGNED_INT_8_8_8_8,
82       GL_UNSIGNED_INT_8_8_8_8_REV,      GL_UNSIGNED_INT_10_10_10_2,       and
83       GL_UNSIGNED_INT_2_10_10_10_REV  are only available if the GL version is
84       1.2 or greater.
85

ERRORS

87       GLU_INVALID_VALUE is returned if wIn, hIn, wOut, or hOut is negative.
88
89       GLU_INVALID_ENUM is returned if  format,  typeIn,  or  typeOut  is  not
90       legal.
91
92       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
93       GL_UNSIGNED_BYTE_3_3_2 or GL_UNSIGNED_BYTE_2_3_3_REV and format is  not
94       GL_RGB.
95
96       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
97       GL_UNSIGNED_SHORT_5_6_5 or GL_UNSIGNED_SHORT_5_6_5_REV  and  format  is
98       not GL_RGB.
99
100       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
101       GL_UNSIGNED_SHORT_4_4_4_4 or GL_UNSIGNED_SHORT_4_4_4_4_REV  and  format
102       is neither GL_RGBA nor GL_BGRA.
103
104       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
105       GL_UNSIGNED_SHORT_5_5_5_1 or GL_UNSIGNED_SHORT_1_5_5_5_REV  and  format
106       is neither GL_RGBA nor GL_BGRA.
107
108       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
109       GL_UNSIGNED_INT_8_8_8_8 or GL_UNSIGNED_INT_8_8_8_8_REV  and  format  is
110       neither GL_RGBA nor GL_BGRA.
111
112       GLU_INVALID_OPERATION   is   returned   if   typeIn   or   typeOut   is
113       GL_UNSIGNED_INT_10_10_10_2 or GL_UNSIGNED_INT_2_10_10_10_REV and format
114       is neither GL_RGBA nor GL_BGRA.
115

SEE ALSO

117       glDrawPixels(3G),        glReadPixels(3G),       gluBuild1DMipmaps(3G),
118       gluBuild2DMipmaps(3G), gluBuild3DMipmaps(3G),  gluErrorString(3G)
119
120
121
122
123                                                             GLUSCALEIMAGE(3G)
Impressum