Name
glu.ScaleImage -- scale an image to an arbitrary size
Synopsis
err, pixelsOut = glu.ScaleImage(format, widthIn, heightIn, pixelsIn,
                    widthOut, heightOut)
Function
This function does the same as glu.ScaleImageRaw() except that the pixel data is not passed and returned as a raw memory buffer but as a table containing width*height*depth number of elements describing a pixel each. This is of course not as efficient as using raw memory buffers because the table's pixel data has to be copied to a raw memory buffer first and then has to be mapped to a table again.

See glu.ScaleImageRaw for more details on the parameters accepted by this function.

Note that glu.ScaleImage() expects data of type #GL_FLOAT inside the pixelsIn table. #GL_FLOAT pixel data will also be written to the return table pixelsOut.

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
pixelsIn
specifies a table containing the pixel data of the source image
widthOut
specifies the width of the destination image
heightOut
specifies the height of the destination image
Results
error
error code or 0 for success
pixelsOut
table containing the scaled image data

Show TOC