typedef struct { int width; int height; int planes; int bpp; int pitch; int bytesperpixel; int compression; int palsize; GR_COLOR transcolor; GR_PALENTRY *palette; unsigned char *imagebits; } GR_IMAGE_HDR; |
A GR_IMAGE_HDR structure defines a nano-X image. This structure is the image header. It in turn points to a palette array and a bitmap array that combined contain the image data.
![]() | You use this structure with the GrDrawImageBits() function. The utility application convbmp that comes with Microwindows will build GR_IMAGE_HDR structures that may be compiled into your application. |
Type | Name | Description |
---|---|---|
int | width | The width of the image in pixels. |
int | height | The height of the image in pixels. |
int | planes | The number of color planes in the image. |
int | bpp | The number if bits per pixel in the image. |
int | pitch | The number of bytes per line in the image. |
int | bytesperpixel | The number of bytes per pixel in the image. |
int | compression | The compression algorithm used in the image. |
int | palsize | The number pallete entries used by the image. |
GR_COLOR | transcolor | This field defines a color that if contained in the image will appear transparent. When the image is drawn any pixels that are of this color are not drawn, thus letting the existing screen iage through. Set this field to -1 if no transparent color is desired. |
GR_PALENTRY* | palette | A pointer to the image's color palette. |
unsigned char* | imagebits | A pointer to a bitmap array containing the image data. |