#include <CFileLoaderBMP.h>
Public Member Functions | |
cFileLoaderBMP () | |
Constructor of cFileLoaderBMP. | |
cFileLoaderBMP (char *a_fileName) | |
Constructor of cFileLoaderBMP. Load a bitmap file. | |
~cFileLoaderBMP () | |
Destructor of cFileLoaderBMP. | |
bool | loadBMP (char *iFileName) |
Load bitmap image file. | |
unsigned char * | pBitmap () const |
Get pinter to bitmap. | |
unsigned int | getWidth () |
Get width of image. | |
unsigned int | getHeight () |
Get height of image. | |
unsigned short | getBpp () |
Get the number of bits per pixels. | |
string | getLastErrorMesg (void) |
Read last error message. | |
bool | isLoaded () |
Has any image been loaded? | |
Private Member Functions | |
void | reset (void) |
Reset internal variables. This function is called by the constructor. | |
bool | convert24 (char *) |
convert bitmap from GBR to RGB. 24 bits images. | |
bool | convert8 (char *) |
convert bitmap from GBR to RGB. 8 bits images. | |
Private Attributes | |
BITMAPFILEHEADER | m_bmfh |
Header file information. | |
BITMAPINFOHEADER | m_bmih |
Header file information. | |
unsigned int | m_byteWidth |
The width in bytes of the image. | |
RGBQUAD * | m_colors |
color data | |
bool | m_loaded |
Has image been loaded correctly? | |
unsigned int | m_width |
Width of image. | |
unsigned int | m_height |
Height of image. | |
unsigned short | m_bpp |
Bits per pixel. | |
string | m_errorMsg |
Last error message. | |
unsigned char * | m_pBitmap |
pixel data |
cFileLoaderBMP::cFileLoaderBMP | ( | ) |
Constructor of cFileLoaderBMP.
Constructor of cFileLoaderBMP
cFileLoaderBMP::cFileLoaderBMP | ( | char * | a_fileName | ) |
Constructor of cFileLoaderBMP. Load a bitmap file.
Constructor loads the bitmap when it is created
a_fileName | Filename of bitmap image. |
cFileLoaderBMP::~cFileLoaderBMP | ( | ) |
Destructor of cFileLoaderBMP.
Destructor of cFileLoaderBMP
bool cFileLoaderBMP::loadBMP | ( | char * | a_fileName | ) |
Load bitmap image file.
Load a bitmap from a file and represent it correctly in memory.
a_fileName | Filename of image bitmap. |
void cFileLoaderBMP::reset | ( | void | ) | [private] |
Reset internal variables. This function is called by the constructor.
This function initializes all variables in class.
bool cFileLoaderBMP::convert24 | ( | char * | tempData | ) | [private] |
convert bitmap from GBR to RGB. 24 bits images.
Convert format from GBR to RGB - 24bits images
bool cFileLoaderBMP::convert8 | ( | char * | tempData | ) | [private] |
convert bitmap from GBR to RGB. 8 bits images.
Convert format from GBR to RGB - 8bits images