GR_IMAGE_HDR

Name

GR_IMAGE_HDR -- Image header

Synopsis

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;
  

Description

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.

Note

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.

Fields

TypeNameDescription
intwidthThe width of the image in pixels.
intheightThe height of the image in pixels.
intplanesThe number of color planes in the image.
intbppThe number if bits per pixel in the image.
intpitchThe number of bytes per line in the image.
intbytesperpixelThe number of bytes per pixel in the image.
intcompressionThe compression algorithm used in the image.
intpalsizeThe number pallete entries used by the image.
GR_COLORtranscolorThis 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*paletteA pointer to the image's color palette.
unsigned char*imagebitsA pointer to a bitmap array containing the image data.

See Also

GrDrawImageBits(), GR_IMAGE_INFO.