CRasterImage::Load

int Load( const char* FileName, int StorageType = GL_RGB, int ImageType = IMAGE_BY_FILE_EXTENSION );

Parameters

FileName Name of the file the image will be loaded from.
StorageType Storage type used to store the decompressed image. Can be one of the following values:
GL_RGB specifies the GL_RGB format and GL_BYTE type
GL_RGBA specifies the GL_RGBA format and GL_BYTE type. The alpha values will be initialized to 0xff by the Load method
ImageType Type of the image file. Can be one of the following values:
IMAGE_BY_FILE_EXTENSION The Load method determines the image type by the file extension. If the file extension is .JPG, then the JPEG decompression will be used to load the image. If the extension is .GIF then the GIF decompression will be used to load the image. If the file extension is .BMP then the Microsoft BMP decompression will be used to load the image. If the file extension is .TGA then the TARGA decompression will be used to load the image.
IMAGE_JPEG The JPEG decompression will be used to load the image
IMAGE_GIF The GIF decompression will be used to load the image
IMAGE_BMP The BMP decompression will be used to load the image
IMAGE_TARGA The TARGA decompression will be used to load the image

Return Value

The return value is TRUE if Load method succeeded. The return value is FALSE if Load method failed.

Remarks

The Load method loads the image data from the file to the memory. The image is loaded from the file and stored into memory using either 3-byte RGB or 4-byte RGBA pixel format - depending on specified StorageType parameter. Previous content the object is destroyed by the Load method call.

Following JPEG file pixel-formats are supported:

Animated GIF files and TGA files with alpha channel are not supported.

See Also

CRasterImage class methods