home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / graphics / sprtools_1 / h / bmp next >
Text File  |  1995-02-02  |  2KB  |  50 lines

  1. /************************************************************************
  2.  *                                    *
  3.  * bmp.h                                *
  4.  *                                    *
  5.  * Windows 3 BMP format header file                    *
  6.  *                                    *
  7.  * Version 3.00 (02-Feb-1995)                                           *
  8.  *                                                                      *
  9.  * Palette entries follow header structure, format 0x00RRGGBB        *
  10.  *                                                                      *
  11.  ************************************************************************/
  12.  
  13.  
  14.  
  15. typedef struct
  16. {
  17.         BYTE    id[2];            /* 2 bytes ID 'BM'                 */
  18.         DWORD    file_size;        /* file size                       */
  19.         WORD    resurved1;              /* resurved                        */
  20.     WORD    resurved2;              /* resurved                        */
  21.         DWORD    bitmap_offset;          /* offset to bitmap data           */
  22.         DWORD    subheader_size;         /* sub header size                 */
  23.  
  24.         DWORD    width;                  /* width in pixels                 */
  25.         DWORD    height;                 /* height in pixels                */
  26.         WORD    bit_planes;             /* bit planes (1)                  */
  27.         WORD    bits_per_pixel;         /* bits per pixel                  */
  28.         DWORD    compression;            /* compression scheme (0)          */
  29.         DWORD    bitmap_size;            /* size of bitmap data             */
  30.         DWORD    X_pix_per_meter;        /* X pixels per meter              */
  31.         DWORD    Y_pix_per_meter;        /* Y pixels per meter              */
  32.         DWORD    palette_entries;        /* palette entries or 0 for >8 bpp */
  33.         DWORD    colours;                /* mumber of colours               */
  34. } bmp_hdr_str;
  35.  
  36. typedef struct
  37. {
  38.         WORD    width;                  /* width in pixels                 */
  39.         WORD    height;                 /* height in pixels                */
  40.         WORD    bit_planes;             /* bit planes (1)                  */
  41.         WORD    bits_per_pixel;         /* bits per pixel                  */
  42. } bmp_shdr2_str;
  43.  
  44.  
  45. int bmp_whdr_descr[]   = { 1,1, 4, 2,2, 4,4, 4,4, 2,2, 4, 4, 4,4, 4,4, -1 };
  46. int bmp_rhdr_descr[]   = { 1,1, 4, 2,2, 4,4, -1};
  47. int bmp_shdr1_descr[] = { 4,4, 2,2, 4, 4, 4,4, 4,4, -1 };
  48. int bmp_shdr2_descr[] = { 2,2, 2,2, -1 };
  49.  
  50.