{ short xpos, /* Lower left corner ypos, xsize, /* Size of saved box ysize; }
If ncmap is non-zero, then the color map will follow as ncmap*2^cmaplen 16 bit words. The color map data is left justified in each word.
If the H_COMMENT flag is set, a set of comments will follow. The first 16 bit word gives the length of the comments in bytes. If this is odd, a filler byte will be appended to the comments. The comments are interpreted as a sequence of null terminated strings which should be, by convention, of the form name=value, or just name.
Following the setup information is the Run Length Encoded image. Each instruction consists of an opcode, a datum and possibly one or more following words (all words are 16 bits). The opcode is encoded in the first byte of the instruction word. Instructions come in either a short or long form. In the short form, the datum is in the second byte of the instruction word; in the long form, the datum is a 16 bit value in the word following the instruction word. Long form instructions are distinguished by having the 0x40 bit set in the opcode byte. The instruction opcodes are:
Spencer W. Thomas, Todd Fuqua