| 41 |
|
/* but the color table should be filled by writer before open call */ |
| 42 |
|
RGBquad palette[3]; /* color palette (extends struct) */ |
| 43 |
|
} BMPHeader; |
| 44 |
– |
|
| 45 |
– |
/* color palette length */ |
| 46 |
– |
#define BMPpalLen(h) ((h)->bpp <= 8 ? 1<<(h)->bpp : 0) |
| 44 |
|
|
| 45 |
|
/* access to bit field triple */ |
| 46 |
|
#define BMPbitField(h) ((uint32 *)(h)->palette) |
| 47 |
|
|
| 48 |
|
/* info buffer access */ |
| 49 |
< |
#define BMPinfo(h) ((char *)((h)->palette + BMPpalLen(h))) |
| 49 |
> |
#define BMPinfo(h) ((char *)((h)->palette + (h)->nColors)) |
| 50 |
|
|
| 51 |
|
/* function return values */ |
| 52 |
|
#define BIR_OK 0 /* all is well */ |