GRFX

From Just Solve the File Format Problem
Revision as of 16:31, 19 March 2015 by Felix (Talk | contribs)

Jump to: navigation, search
File Format
Name GRFX
Ontology

GRFX is a raster graphics file format used for storing logos and splash screens in some AMI BIOSes.

Structure

All number values are little-endian.

The file begins with this structure:

Name Length and type Description
magic 4 bytes Always 'G' 'R' 'F' 'X'.
 ??? 2 bytes Unknown; always 01 01 in files known to this author.
hlen uint16_t Length of this header; usually 8.

After this header, another structure follows.

Name Length and type Description
 ??? 4 bytes Unknown; usually all zero.
hlen uint16_t Length of this structure. Always 78 (0x4e) in files known to this author.
 ??? 2 bytes Unknown; often zero, but 14 00 and 2e 00 are also known to this author.
 ??? 2 bytes Unknown; often zero, but 9f 00 and 8c 00 are also known to this author.
width uint16_t Image width in pixels.
height uint16_t Image width in pixels.
 ??? 2 bytes Unknown; probably a bitfield. Often 00 80, although 01 80 and 03 80 are also known to this author.
 ??? 2 bytes Unknown; often zero, although 0f 00 is also known to this author.
colours uint16_t Number of colours. Always 16 in files known to this author.
 ??? 1 byte Unknown; always zero in files known to this author. Most probably just padding.
magic 3 bytes Always 'I' 'M' 'A' ("AMI" in reverse)
palette uint16_t [16 * 3] EGA palette; a series of triples of colour intensities of red, green and blue (in order), each in the range of 0 to 63.
 ??? 2 bytes Unknown; always zero in files known to this author.
ident 4 bytes Image identifier; four ASCII capital letters stored in reverse order. Common values are 'S' 'I' 'M' 'A' ("AMIS", small AMI logo) and 'L' 'I' 'M' 'A' ("AMIL", large AMI logo)

After this structure, the bitmap data follows. Pixels are stored row by row, each row stores pixels left to right. Each byte contains data for two pixels; the more significant 4 bits store the left pixel of the pair.

It is not known to this author how the file format is supposed to behave for bitmap widths not divisible by two, or for palette sizes other than 16.

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox