Dependencies:   mbed

Committer:
XkLi
Date:
Tue Oct 11 01:24:18 2011 +0000
Revision:
0:c546b51ecf0b
v1.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
XkLi 0:c546b51ecf0b 1 // Code taken and hacked from EasyBMP library by Paul Macklin
XkLi 0:c546b51ecf0b 2
XkLi 0:c546b51ecf0b 3 #include "NokiaLCD.h"
XkLi 0:c546b51ecf0b 4 #include "SDFileSystem.h"
XkLi 0:c546b51ecf0b 5
XkLi 0:c546b51ecf0b 6 #define DefaultXPelsPerMeter 3780
XkLi 0:c546b51ecf0b 7 #define DefaultYPelsPerMeter 3780
XkLi 0:c546b51ecf0b 8
XkLi 0:c546b51ecf0b 9 typedef unsigned char ebmpBYTE;
XkLi 0:c546b51ecf0b 10 typedef unsigned short ebmpWORD;
XkLi 0:c546b51ecf0b 11 typedef unsigned int ebmpDWORD;
XkLi 0:c546b51ecf0b 12
XkLi 0:c546b51ecf0b 13 typedef struct RGBApixel {
XkLi 0:c546b51ecf0b 14 ebmpBYTE Blue;
XkLi 0:c546b51ecf0b 15 ebmpBYTE Green;
XkLi 0:c546b51ecf0b 16 ebmpBYTE Red;
XkLi 0:c546b51ecf0b 17 ebmpBYTE Alpha;
XkLi 0:c546b51ecf0b 18 } RGBApixel;
XkLi 0:c546b51ecf0b 19
XkLi 0:c546b51ecf0b 20 class BMFH{
XkLi 0:c546b51ecf0b 21 public:
XkLi 0:c546b51ecf0b 22 ebmpWORD bfType;
XkLi 0:c546b51ecf0b 23 ebmpDWORD bfSize;
XkLi 0:c546b51ecf0b 24 ebmpWORD bfReserved1;
XkLi 0:c546b51ecf0b 25 ebmpWORD bfReserved2;
XkLi 0:c546b51ecf0b 26 ebmpDWORD bfOffBits;
XkLi 0:c546b51ecf0b 27
XkLi 0:c546b51ecf0b 28 BMFH();
XkLi 0:c546b51ecf0b 29 };
XkLi 0:c546b51ecf0b 30
XkLi 0:c546b51ecf0b 31 class BMIH{
XkLi 0:c546b51ecf0b 32 public:
XkLi 0:c546b51ecf0b 33 ebmpDWORD biSize;
XkLi 0:c546b51ecf0b 34 ebmpDWORD biWidth;
XkLi 0:c546b51ecf0b 35 ebmpDWORD biHeight;
XkLi 0:c546b51ecf0b 36 ebmpWORD biPlanes;
XkLi 0:c546b51ecf0b 37 ebmpWORD biBitCount;
XkLi 0:c546b51ecf0b 38 ebmpDWORD biCompression;
XkLi 0:c546b51ecf0b 39 ebmpDWORD biSizeImage;
XkLi 0:c546b51ecf0b 40 ebmpDWORD biXPelsPerMeter;
XkLi 0:c546b51ecf0b 41 ebmpDWORD biYPelsPerMeter;
XkLi 0:c546b51ecf0b 42 ebmpDWORD biClrUsed;
XkLi 0:c546b51ecf0b 43 ebmpDWORD biClrImportant;
XkLi 0:c546b51ecf0b 44
XkLi 0:c546b51ecf0b 45 BMIH();
XkLi 0:c546b51ecf0b 46 };
XkLi 0:c546b51ecf0b 47 bool ReadBMPFromFile( const char* FileName , RGBApixel *Colors, NokiaLCD *lcd);