| 26 |
|
|
| 27 |
|
/* Allocated BMP header data */ |
| 28 |
|
typedef struct { |
| 29 |
< |
/* the following fields may be altered before open call */ |
| 29 |
> |
/* the following fields may be altered before the open call */ |
| 30 |
|
int yIsDown; /* scanlines proceed downward? */ |
| 31 |
|
int32 hRes; /* horizontal resolution pixels/meter */ |
| 32 |
|
int32 vRes; /* vertical resolution pixels/meter */ |
| 33 |
|
int nColors; /* total color palette size */ |
| 34 |
|
int impColors; /* number of colors actually used */ |
| 35 |
< |
/* the following fields should not be altered after allocation */ |
| 35 |
> |
int compr; /* compression */ |
| 36 |
|
int32 width; /* bitmap width (pixels) */ |
| 37 |
|
int32 height; /* bitmap height (pixels) */ |
| 38 |
+ |
/* the following fields must not be altered after allocation */ |
| 39 |
|
int bpp; /* bits per sample (1,4,8,16,24,32) */ |
| 39 |
– |
int compr; /* compression */ |
| 40 |
|
uint32 infoSiz; /* info buffer size (bytes) */ |
| 41 |
< |
/* the color table should be filled by writer before open call */ |
| 41 |
> |
/* but the color table should be filled by writer before open call */ |
| 42 |
|
RGBquad palette[3]; /* color palette (extends struct) */ |
| 43 |
|
} BMPHeader; |
| 44 |
|
|
| 78 |
|
typedef struct { |
| 79 |
|
/* the scanline data is filled in by caller before each write */ |
| 80 |
|
uint8 *scanline; /* caller-prepared scanline data */ |
| 81 |
+ |
/* modify yscan only if seek is defined & data is uncompressed */ |
| 82 |
|
int yscan; /* scanline for next write */ |
| 83 |
< |
/* the following fields should not be altered by the caller */ |
| 83 |
> |
/* the following fields should not be altered directly */ |
| 84 |
|
BMPHeader *hdr; /* allocated header */ |
| 85 |
|
uint32 fbmp; /* beginning of bitmap data */ |
| 86 |
|
uint32 fpos; /* current file position */ |