CRasterImage::GetImageData

void* GetImageData( void );

Return Value

Pointer to the current objectís image data. Image data are stored in continuos buffer. Buffer size is (image_width * image_height * PixelSize) bytes. PixelSize is three for GL_RGB storage, four for GL_RGBA storage type. Image data are stored by rows, bottom row of the image is stored as first row in the buffer, top image row is stored as last row in the buffer.

Note that you must use 1 byte row alignment while using returned image data buffer directly by the OpenGL functions (glTextImage2D for example). The COpenGL class initializes 1 byte row alignment settings by default, when not using COpenGL class, please insert

glPixelStorei( GL_PACK_ALIGNMENT, 1 );
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );

commands to your initialization code.

Remarks

Use the GetImageData method to retrieve pointer to the current object image data.

See Also

CRasterImage class methods