#include <gbImageLoader.hpp>
Inherited by GhulbusUtil::gbImageType_BMP_T, and GhulbusUtil::gbImageType_TGA_T.
Public Member Functions | |
virtual void | ReadFile (std::ifstream &file, int *width, int *height, int *bpp, unsigned char **pp_data, unsigned int **pp_palette)=0 |
Read image data from file. | |
virtual bool | CheckFile (std::ifstream const &file)=0 |
Check if the file is of a specific image type. | |
virtual | ~gbImageType () |
Destructor. |
virtual void GhulbusUtil::gbImageLoader::gbImageType::ReadFile | ( | std::ifstream & | file, | |
int * | width, | |||
int * | height, | |||
int * | bpp, | |||
unsigned char ** | pp_data, | |||
unsigned int ** | pp_palette | |||
) | [pure virtual] |
Read image data from file.
[in] | file | An open filestream to the image file |
[out] | width | The image's width in pixels |
[out] | height | The image's height in pixels |
[out] | bpp | Bits per pixel |
[in,out] | pp_data | A field containing the image data; Memory will be allocated by ReadFile() itself! |
[in,out] | pp_palette | A field containing palette data; Memory will be allocated by ReadFile() itself! |
std::bad_alloc |
virtual bool GhulbusUtil::gbImageLoader::gbImageType::CheckFile | ( | std::ifstream const & | file | ) | [pure virtual] |
Check if the file is of a specific image type.
[in] | file | An open filestream to the image file |