Fork of David Smart's RA8875 library

Fork of RA8875 by David Smart

Revision:
42:7cbdfd2bbfc5
Parent:
32:0e4f2ae512e2
--- a/Bitmap.h	Sat Feb 08 17:35:45 2014 +0000
+++ b/Bitmap.h	Sun Feb 23 17:58:39 2014 +0000
@@ -23,7 +23,7 @@
 #pragma push
 #pragma pack(2)
 
-typedef struct                 /**** BMP file header structure ****/
+typedef struct                    /**** BMP file header structure ****/
     {
     uint16_t    bfType;           /* Magic number for file */
     uint32_t    bfSize;           /* Size of file */
@@ -73,4 +73,30 @@
 //    RGBQUAD          bmiColors[256]; /* Image colormap */
 //    } BITMAPINFO;
 
+
+#pragma push
+#pragma pack(2)
+
+typedef struct                  /**** ICO file header structure ****/
+    {
+    uint16_t    Reserved_zero;  // Always zero
+    uint16_t    icType;         // 1 for .ico, 2 for .cur
+    uint16_t    icImageCount;   // number of images in the file    
+    } ICOFILEHEADER;
+    
+typedef struct                  /**** ICO file Directory Entry structure (1 or more) ****/
+    {
+    uint8_t     biWidth;          /* Width of image */
+    uint8_t     biHeight;         /* Height of image */
+    uint8_t     biClrUsed;        /* Number of colors used */
+    uint8_t     Reserved_zero;
+    uint16_t    biPlanes;         /* Number of color planes (ICO should be 0 or 1, CUR horz hotspot */
+    uint16_t    biBitCount;       /* Number of bits per pixel (ICO bits per pixel, CUR vert hotspot */
+    uint32_t    biSizeImage;      /* Size of image data */
+    uint32_t    bfOffBits;        /* Offset into file for the bitmap data */
+    } ICODIRENTRY;
+#pragma pop
+
+#define IC_TYPE 0x0001            /* 1 = ICO (icon), 2 = CUR (cursor) */
+
 #endif // _BITMAP_H_