bmp.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #define BMP_RGB 0
  2. #define BMP_RLE8 1
  3. #define BMP_RLE4 2
  4. #define BMP_BITFIELDS 3
  5. typedef struct {
  6. uchar red;
  7. uchar green;
  8. uchar blue;
  9. uchar alpha;
  10. } Rgb;
  11. #define Filehdrsz 14
  12. typedef struct {
  13. short type;
  14. long size; /* file size, not structure size */
  15. short reserved1;
  16. short reserved2;
  17. long offbits;
  18. } Filehdr;
  19. typedef struct {
  20. long size; /* Size of the Bitmap-file */
  21. long lReserved; /* Reserved */
  22. long dataoff; /* Picture data location */
  23. long hsize; /* Header-Size */
  24. long width; /* Picture width (pixels) */
  25. long height; /* Picture height (pixels) */
  26. short planes; /* Planes (must be 1) */
  27. short bpp; /* Bits per pixel (1, 4, 8 or 24) */
  28. long compression; /* Compression mode */
  29. long imagesize; /* Image size (bytes) */
  30. long hres; /* Horizontal Resolution (pels/meter) */
  31. long vres; /* Vertical Resolution (pels/meter) */
  32. long colours; /* Used Colours (Col-Table index) */
  33. long impcolours; /* Important colours (Col-Table index) */
  34. } Infohdr;