Martin Sturm
/
Lab3
Diff: myBMP/myBMP.h
- Revision:
- 0:c546b51ecf0b
diff -r 000000000000 -r c546b51ecf0b myBMP/myBMP.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/myBMP/myBMP.h Tue Oct 11 01:24:18 2011 +0000 @@ -0,0 +1,47 @@ +// 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);