#include <gbImageLoader.hpp>
Public Member Functions | |
| gbImageLoader (char const *fname, gbImageType *img_type) | |
| Constructor. | |
| ~gbImageLoader () | |
| Destructor. | |
| int | GetWidth () const |
| Get the image's width. | |
| int | GetHeight () const |
| Get the image's height. | |
| int | GetBpp () const |
| Get the image's color depth. | |
| bool | HasPalette () const |
| Check whether the image has a palette. | |
| void | GetImageData (unsigned char *pData) const |
| Get the image data as read from the file. | |
| void | GetImageData32 (GhulbusGraphics::GBCOLOR *pData) const |
| Get the image data in unmapped GBCOLORs. | |
| void | GetPaletteData (GhulbusGraphics::GBCOLOR *pPal) const |
| Get the palette data. | |
| void | FlipV () |
| Flips the image vertically. | |
Classes | |
| class | gbImageType |
| Interface for image file loaders. More... | |
| GhulbusUtil::gbImageLoader::gbImageLoader | ( | char const * | fname, | |
| gbImageType * | img_type | |||
| ) |
Constructor.
| [in] | fname | Full path to the image file that is to be loaded |
| [in,out] | img_type | The image type loading strategy, specified as gbImageType object; |
| Ghulbus::gbException | GB_FAILED usually indicates a file read error; GB_NOTIMPLEMENTED; | |
| std::bad_alloc |
| int GhulbusUtil::gbImageLoader::GetWidth | ( | ) | const |
Get the image's width.
| int GhulbusUtil::gbImageLoader::GetHeight | ( | ) | const |
Get the image's height.
| int GhulbusUtil::gbImageLoader::GetBpp | ( | ) | const |
Get the image's color depth.
| bool GhulbusUtil::gbImageLoader::HasPalette | ( | ) | const |
Check whether the image has a palette.
| void GhulbusUtil::gbImageLoader::GetImageData | ( | unsigned char * | pData | ) | const |
Get the image data as read from the file.
| [out] | pData | A field of at least size width*height*bpp |
| void GhulbusUtil::gbImageLoader::GetImageData32 | ( | GhulbusGraphics::GBCOLOR * | pData | ) | const |
Get the image data in unmapped GBCOLORs.
| [out] | pData | A field of at least size width*height |
| Ghulbus::gbException | GB_FAILED indicates an unexpected color depth |
dithering(?)
| void GhulbusUtil::gbImageLoader::GetPaletteData | ( | GhulbusGraphics::GBCOLOR * | pPal | ) | const |
Get the palette data.
| [out] | pPal | A field of at least size (2^bpp) |
| Ghulbus::gbException | GB_FAILED indicates that no palette data is present |
1.5.4