Name
glu.ScaleImageRaw -- scale an image to an arbitrary size
Synopsis
error = glu.ScaleImageRaw(format, widthIn, heightIn, typeIn, pixelsIn,
           widthOut, heightOut, typeOut, pixelsOut)
Function
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.

Inputs
format
specifies the format of the pixel data (see above)
widthIn
specifies the width of the source image that is scaled
heightIn
specifies the height of the source image that is scaled
typeIn
specifies the data type for pixelsIn (see above)
pixelsIn
specifies a pointer to the source image
widthOut
specifies the width of the destination image
heightOut
specifies the height of the destination image
typeOut
specifies the data type for pixelsOut (see above)
pixelsOut
specifies a pointer to the destination image
Results
error
error code or 0 for success

Show TOC