scaleimage.3gl 5.5 KB

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