Dependencies:   mbed

myBMP/myBMP.h

Committer:
XkLi
Date:
2011-10-11
Revision:
0:c546b51ecf0b

File content as of revision 0:c546b51ecf0b:

// Code taken and hacked from EasyBMP library by Paul Macklin

#include "NokiaLCD.h"
#include "SDFileSystem.h"

#define DefaultXPelsPerMeter 3780
#define DefaultYPelsPerMeter 3780

typedef unsigned char  ebmpBYTE;
typedef unsigned short ebmpWORD;
typedef unsigned int  ebmpDWORD;

typedef struct RGBApixel {
    ebmpBYTE Blue;
    ebmpBYTE Green;
    ebmpBYTE Red;
    ebmpBYTE Alpha;
} RGBApixel; 

class BMFH{
public:
 ebmpWORD  bfType;
 ebmpDWORD bfSize;
 ebmpWORD  bfReserved1;
 ebmpWORD  bfReserved2;
 ebmpDWORD bfOffBits; 

 BMFH();
};

class BMIH{
public:
 ebmpDWORD biSize;
 ebmpDWORD biWidth;
 ebmpDWORD biHeight;
 ebmpWORD  biPlanes;
 ebmpWORD  biBitCount;
 ebmpDWORD biCompression;
 ebmpDWORD biSizeImage;
 ebmpDWORD biXPelsPerMeter;
 ebmpDWORD biYPelsPerMeter;
 ebmpDWORD biClrUsed;
 ebmpDWORD biClrImportant;

 BMIH();
};
bool ReadBMPFromFile( const char* FileName , RGBApixel *Colors, NokiaLCD *lcd);