error = glu.ScaleImageRaw(format, widthIn, heightIn, typeIn, pixelsIn, widthOut, heightOut, typeOut, pixelsOut)
glu.ScaleImageRaw()
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, glu.ScaleImageRaw()
uses a box filter to sample the source image and create pixels
for the destination image. When an image is magnified, the pixels from the source image are linearly interpolated
to create the destination image.
format
must be one of #GL_COLOR_INDEX
, #GL_STENCIL_INDEX
, #GL_DEPTH_COMPONENT
, #GL_RED
, #GL_GREEN
, #GL_BLUE
, #GL_ALPHA
,
#GL_RGB
, #GL_RGBA
, #GL_LUMINANCE
, and #GL_LUMINANCE_ALPHA
.
typeIn
and typeOut
must be one of #GL_UNSIGNED_BYTE
, #GL_BYTE
, #GL_BITMAP
, #GL_UNSIGNED_SHORT
, #GL_SHORT
, #GL_UNSIGNED_INT
,
#GL_INT
, or #GL_FLOAT
.
A return value of 0 indicates success. Otherwise glu.ScaleImage() returns a GLU error code that indicates what the problem is (See glu.ErrorString for details.).
Please note that this command operates directly with memory pointers. There is also a version which works with tables instead of memory pointers, but this is slower of course. See glu.ScaleImage for details. See Working with pointers for details on how to use memory pointers with Hollywood.
Please consult an OpenGL reference manual for more information.
pixelsIn
(see above)pixelsOut
(see above)