Bitmap.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //**************************************************************************
  2. //
  3. // Filename : bitmap.h
  4. //
  5. // Purpose : bitmap format
  6. //
  7. // Modification history :
  8. //
  9. // 20nov96:HJH - Creation
  10. //
  11. //**************************************************************************
  12. #ifndef _bitmap_h
  13. #define _bitmap_h
  14. //**************************************************************************
  15. //
  16. // Includes
  17. //
  18. //**************************************************************************
  19. #include "types.h"
  20. //**************************************************************************
  21. //
  22. // Defines
  23. //
  24. //**************************************************************************
  25. //**************************************************************************
  26. //
  27. // Typedefs
  28. //
  29. //**************************************************************************
  30. typedef struct sgpBmHeadertag
  31. {
  32. UINT32 uiNumBytes; // number of bytes of the bitmap, including the
  33. // memory for all variables in this structure plus
  34. // all the memory in bitmap
  35. UINT32 uiWidth; // width of bitmap in pixels
  36. UINT32 uiHeight; // height of bitmap in pixels
  37. UINT8 uiBitDepth; // 8, 16, 24, or 32
  38. UINT8 uiNumPalEntries; // if uiBitDepth is 8, non-zero, else 0
  39. } SGPBmHeader;
  40. typedef struct sgpBitmaptag
  41. {
  42. SGPBmHeader header;
  43. UINT8 uiData[1]; // if uiNumPalEntries != 0
  44. // uiNumPalEntries*3 (rgb) bytes for palette
  45. // if uiBitDepth == 8
  46. // uiWidth * uiHeight bytes
  47. // else if uiBitDepth == 16
  48. // uiWidth * uiHeight * 2 bytes
  49. // else if uiBitDepth == 24
  50. // uiWidth * uiHeight * 3 bytes
  51. // else if uiBitDepth == 32
  52. // uiWidth * uiHeight * 4 bytes
  53. } SGPBitmap;
  54. #endif