This is a code which generates the various zoomed versions of an image stored in an SD card and displays it on a Nokia LCD based on the keys pressed on a capacitive touch pad.

Dependencies:   FatFileSystem mbed

Fork of Lab3 by Martin Sturm

Committer:
abarve9
Date:
Thu Oct 11 06:10:31 2012 +0000
Revision:
1:6048138606a0
Parent:
0:c546b51ecf0b
This is an image zooming program which reads an image stored in an SD card and displays the various zoomed versions of the image based on the key pressed in the capacitive touch sensor.

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);