Listing 1. GR_IMAGE_HDR/MWIMAGEHDR Structure
typedef struct {
int width; /* image width in pixels*/
int height; /* image height in pixels*/
int planes; /* image planes, set to 1*/
int bpp; /* image bpp, 1, 4, 8, 24*/
/* or 32*/
int bytesperpixel; /* # bytes per pixel*/
int compression; /* compression,*/
/* algorithm usually 0*/
int palsize; /* image palette size,*/
/* 0 for truecolor*/
long transcolor; /* image transparent*/
/* color or –1 if none*/
MWPALENTRY *palette; /* image palette*/
MWUCHAR *imagebits; /* image bits, dword*/
/* right aligned*/
} MWIMAGEHDR, GR_IMAGE_HDR;