So your header file would look something like this
Code:
typedef struct
{
int width, height;
int alpha; //etc...
} header;
class BMPimg
{
header* BMPheader;
unsigned char imgData[]; //array that will hold your data
public:
BMPimg(const char* fileName) { //loads file and manipulates private data and header info}
~BMPimg();
int getWidth() { return BMPheader.width; }
int getHeight() { return BMPheader.height; }
unsigned char* retData { return imgData }
//etc....
}
this way when you need to create an image using pointers you do this
Code:
int main()
{
BMPimg* Happyface = new BMPimg("happyface.bmp");
//do what you will with the image such as
glDrawPixels(HappyFace->getWidth(), HappyFace->getHeight(), //etc);
delete HappyFace;
return 0
}