Purpose
Opcode format | Opcode | Operand Format | Comments |
Extended ASCII | (Image | <ws>"<TFormat>"<ws><IId>[<ws><ICol>,<IRow><ws><IX1>,<IY1><ws><IX2>,<IY2>\
[(Colormap <ws><ICount>[<ws><IRi>,<IGi>,<IBi>,<IAi>]+[<ws>])]]\ [(<ws><IDSize><ws>[<HData>]+)]) |
Draws an image |
Extended Binary | 0x0002 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><Bcount>\
[<BRi><BGi><BBi><BAi>]+<LDSize>[<BData>]+} |
A bitonal colormapped image. |
- | 0x0003 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><Bcount>\
[<BRi><BGi><BBi><BAi>]+<LDSize>[<BData>]+} |
A Group3X compressed bitonal colormapped image |
- | 0x0004 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><LDSize>[<BGIndex>]+} | A color-indexed image. |
- | 0x0005 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><Bcount>\
[<BRi><BGi><BBi><BAi>]+<LDSize>[<BLIndex>]+} |
A colormapped image. |
- | 0x0006 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><LDSize>\
[<BRn><BGn><BBn>]+} |
An RGB image. |
- | 0x0007 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><LDSize>\
[<BRn><BGn><BBn><BAn>]+} |
An RGBA image |
- | 0x0008 | <USCol><USRow><LX1><LY1><LX2><LY2><LId><LDSize>[<BData>]+} | A JPEG compressed RGB image. |
Row The number of rows in the pixel array
X1,Y1 A logical coordinate indicating the lower-left corner of the image to be drawn
X2,Y2 A logical coordinate indicating the upper-right corner of the image to be drawn
Id An integer identifier that may be used by other opcodes to refer to this image (as with texture mapping). A value of zero may be used for images that will not be refered to.
Count The number of colors to be defined in this Color Map. Legal values range from 1 to 256, when using the ASCII version, or 0 to 255 when using the binary form—with zero indicating a colormap of size 256.
Ri, Gi, Bi, Ai The definition of the ith color (the red, green, blue, and alpha components) in the Color Map.
Format A description of how data in the Data array is to be interpreted.
DSize The length (in bytes) of the Data sequence that follows
Data A sequence of encoded data that represents the colors of the image pixels, see below for encoding details.
GIndex An index into the global colormap (as defined by Set Color Map) that defines the color of the nth pixel.
LIndex An index into the local colormap (as defined by the Ri, Gi, Bi, Ai parameters) that defines the color of the nth pixel.
Rn, Gn, Bn, An The color definition of the nth pixel (the red, green, blue, and alpha components).
For the extended binary opcode versions of Draw Image the image data format is specified by the opcode itself. For the extended ASCII opcode form of Draw Image, the Format qualifier may be one of the following:
Bitonal
The Group 3X format differs from CCITT Group 3 compression in that each raster is considered individually, is prepended by a two bit code, and may be stored in one of three ways. The application generating the WHIP! data may try compressing each raster with three available methods and then store the most efficient result. The first two bits of each compressed raster indicate the compression method that was selected by the WHIP! data generating application as follows:
00 (Normal CCITT Group 3 compression of the raster was used)