Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RA8875 by
Diff: Bitmap.h
- Revision:
- 32:0e4f2ae512e2
- Parent:
- 31:c72e12cd5c67
- Child:
- 42:7cbdfd2bbfc5
diff -r c72e12cd5c67 -r 0e4f2ae512e2 Bitmap.h --- a/Bitmap.h Mon Jan 20 19:19:48 2014 +0000 +++ b/Bitmap.h Tue Jan 21 03:28:36 2014 +0000 @@ -18,6 +18,8 @@ // // Bitmap file data structures // +// must align to 2-byte boundaries so it doesn't alter the memory image when +// bytes are read from the file system into this footprint. #pragma push #pragma pack(2) @@ -30,8 +32,6 @@ uint32_t bfOffBits; /* Offset to bitmap data */ } BITMAPFILEHEADER; -#define BF_TYPE 0x4D42 /* "MB" */ - typedef struct /**** BMP file info structure ****/ { uint32_t biSize; /* Size of info header */ @@ -48,6 +48,8 @@ } BITMAPINFOHEADER; #pragma pop +#define BF_TYPE 0x4D42 /* "MB" */ + /* * Constants for the biCompression field... */ @@ -65,19 +67,10 @@ uint8_t rgbReserved; /* Reserved */ } RGBQUAD; -typedef struct /**** Bitmap information structure ****/ - { - BITMAPINFOHEADER bmiHeader; /* Image header */ - RGBQUAD bmiColors[256]; /* Image colormap */ - } BITMAPINFO; - - -/* - * Prototypes... - */ - -//extern GLubyte *LoadDIBitmap(const char *filename, BITMAPINFO **info); -//extern int32_t SaveDIBitmap(const char *filename, BITMAPINFO *info, -// GLubyte *bits); +//typedef struct /**** Bitmap information structure ****/ +// { +// BITMAPINFOHEADER bmiHeader; /* Image header */ +// RGBQUAD bmiColors[256]; /* Image colormap */ +// } BITMAPINFO; #endif // _BITMAP_H_