bmp.h 975 B

12345678910111213141516171819202122232425262728293031323334353637
  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. typedef struct {
  12. short type;
  13. long size;
  14. short reserved1;
  15. short reserved2;
  16. long offbits;
  17. } Filehdr;
  18. typedef struct {
  19. long size; /* Size of the Bitmap-file */
  20. long lReserved; /* Reserved */
  21. long dataoff; /* Picture data location */
  22. long hsize; /* Header-Size */
  23. long width; /* Picture width (pixels) */
  24. long height; /* Picture height (pixels) */
  25. short planes; /* Planes (must be 1) */
  26. short bpp; /* Bits per pixel (1, 4, 8 or 24) */
  27. long compression; /* Compression mode */
  28. long imagesize; /* Image size (bytes) */
  29. long hres; /* Horizontal Resolution (pels/meter) */
  30. long vres; /* Vertical Resolution (pels/meter) */
  31. long colours; /* Used Colours (Col-Table index) */
  32. long impcolours; /* Important colours (Col-Table index) */
  33. } Infohdr;