cFileLoaderBMP Class Reference

cFileLoaderBMP provides a class to load BMp bitmap images into memory. More...

#include <CFileLoaderBMP.h>

List of all members.

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


Detailed Description

cFileLoaderBMP provides a class to load BMp bitmap images into memory.


Constructor & Destructor Documentation

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

Parameters:
a_fileName Filename of bitmap image.

cFileLoaderBMP::~cFileLoaderBMP (  ) 

Destructor of cFileLoaderBMP.

Destructor of cFileLoaderBMP


Member Function Documentation

bool cFileLoaderBMP::loadBMP ( char *  a_fileName  ) 

Load bitmap image file.

Load a bitmap from a file and represent it correctly in memory.

Parameters:
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


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 09:41:47 2007 for CHAI 3D by  doxygen 1.5.2