Besides the bitmap header, the
colour chunks and the
pixel data, an ILBM can hold any number of
other chunks. A reader that does not know one skips it. The ILBM document defines
GRAB, DEST, SPRT, CRNG and
CCRT, and lists chunks registered by other programs. Deluxe Paint writes
CRNG and DPPV in most of its pictures. All numbers are
big-endian.
GRAB, the hotspot
A Point2D: the point of a brush that sits under the pointer, measured
from the top-left corner of the picture.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | x | Pixels from the left edge. |
| 2 | 2 | WORD | y | Pixels from the top edge. |
Example: 00 3C 00 2D is the point 60, 45.
DEST, the destination merge
A DestMerge, 8 bytes: how the picture’s planes go into a bitmap with a
different number of planes.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 1 | UBYTE | depth | The number of planes in the original source. |
| 1 | 1 | UBYTE | pad1 | Unused, 0. |
| 2 | 2 | UWORD | planePick | Where the stored planes go: each 1 bit, from the lowest, takes the next stored plane. The number of 1 bits should equal nPlanes. |
| 4 | 2 | UWORD | planeOnOff | The value to fill each destination plane that planePick leaves out: 0 or 1 for every pixel. |
| 6 | 2 | UWORD | planeMask | A 1 bit lets that destination plane be changed. |
Only the lowest depth bits of each mask mean anything. Without a
DEST, planePick and planeMask are taken as
2nPlanes − 1. None was among the files examined for this
site.
SPRT, a sprite
One UWORD, the sprite precedence: 0 is drawn in front of all others. Its presence says the picture is meant as a sprite; a 2-plane sprite would use colour 0 as the transparent colour. It is rare.
CRNG, Deluxe Paint’s colour range
A CRange, 8 bytes: a range of colours that Deluxe Paint can cycle, to
animate a picture, or use for shading. “Deluxe Paint normally writes 4 CRNG
chunks.”
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | pad1 | Reserved, 0. Deluxe Paint for the PC leaves other values here. |
| 2 | 2 | WORD | rate | The cycling speed: 16,384 is 60 steps a second, so steps a second = rate × 60 ÷ 16,384. 8,192 is 30 a second, and about 273 is 1 a second. |
| 4 | 2 | WORD | flags | Bit 0, RNG_ACTIVE: cycling is on. Bit 1, RNG_REVERSE: cycle downwards. |
| 6 | 1 | UBYTE | low | The first colour number of the range. |
| 7 | 1 | UBYTE | high | The last colour number. |
The document warns that one program sets RNG_ACTIVE but uses a rate of
36 to mean “inactive”. The explorer shows such a range as off.
000003A0 43 52 4E 47 00 00 00 08 2D 47 13 32 00 00 80 8F
000003B0 43 52 4E 47 00 00 00 08 00 00 0A AA 00 00 00 00
The first range has junk in pad1 (2D 47), a rate of 4,914,
or 18 steps a second, cycling off, and colours 128 to 143. The second has a rate of
2,730, 10 steps a second, and colours 0 to 0: an unused slot.
CCRT, Graphicraft’s colour cycle
A CycleInfo, 14 bytes, from Commodore’s Graphicraft. The document says new
programs should write CRNG instead.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | direction | 0: do not cycle; 1: forwards; −1: backwards. |
| 2 | 1 | UBYTE | start | The first colour number. |
| 3 | 1 | UBYTE | end | The last colour number. |
| 4 | 4 | LONG | seconds | The time between steps: whole seconds. |
| 8 | 4 | LONG | microseconds | The time between steps: microseconds. |
| 12 | 2 | WORD | pad | Reserved, 0. |
DRNG, Deluxe Paint IV’s colour range
Deluxe Paint IV’s range, by Lee Taran, lets a range list colours that are not next to each other. Its cells are given either as colours or as colour numbers.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 1 | UBYTE | min | The first cell of the range. |
| 1 | 1 | UBYTE | max | The last cell. |
| 2 | 2 | WORD | rate | The speed, as in CRNG. |
| 4 | 2 | WORD | flags | “1=RNG_ACTIVE,4=RNG_DP_RESERVED”; the document adds that “The RNG_DP_RESERVED flags should always be 0!!!”. |
| 6 | 1 | UBYTE | ntrue | The number of DColor entries. |
| 7 | 1 | UBYTE | nregs | The number of DIndex entries. |
| 8 | 4 × ntrue | DColor | Each: cell, r, g, b, four UBYTEs: a cell given as a colour. | |
| … | 2 × nregs | DIndex | Each: cell and index, two UBYTEs: a cell given as a colour number. |
The document limits RNG_ACTIVE: “A range should only have the
RNG_ACTIVE if it: contains at least one color register; has a defined rate; has more
than one color and/or color register”, and “If the above conditions are met then
RNG_ACTIVE is a user/program preference.” So the explorer shows a
DRNG as cycling only when RNG_ACTIVE is set,
nregs is at least 1, the rate is above 0, and ntrue + nregs
is at least 2. Otherwise it shows the range as off and says which condition is
missing.
DPPV, Deluxe Paint’s perspective
Deluxe Paint II’s perspective settings (PerspState, Dan Silva, 1986),
saved so that the next session can carry on. Deluxe Paint writes it in most of its
pictures, on the Amiga and the PC, and it is 104 bytes long in every file examined for
this site. The fields, in the document’s order:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | rotType | 0 ROT_EULER, 1 ROT_INCR. |
| 2 | 2 | WORD | iA | Rotation angle, in degrees. |
| 4 | 2 | WORD | iB | Rotation angle, in degrees. |
| 6 | 2 | WORD | iC | Rotation angle, in degrees. |
| 8 | 4 | LongFrac | Depth | The perspective depth. |
| 12 | 2 | WORD | uCenter | The centre of perspective, across. |
| 14 | 2 | WORD | vCenter | The centre of perspective, down. |
| 16 | 2 | WORD | fixCoord | The fixed coordinate; the document gives no more. |
| 18 | 2 | WORD | angleStep | The large angle step. |
| 20 | 12 | UPoint | grid | The grid: three LongFracs, x, y, z. |
| 32 | 12 | UPoint | gridReset | The grid reset point. |
| 44 | 12 | UPoint | gridBrCenter | The grid brush centre. |
| 56 | 12 | UPoint | permBrCenter | The permanent brush centre. |
| 68 | 36 | LongFrac[3][3] | rot | The rotation matrix, nine LongFracs, row by row. |
The document defines the types: typedef LONG LongFrac;, a
LFPoint of LongFrac x, y, z, an APoint of three
LongFracs, and UPoint as a union of the two. So every point is 12 bytes,
which brings the chunk to 20 + 48 + 36 = 104 bytes. ROT_EULER is 0 and
ROT_INCR is 1. The explorer shows every field, each point and each
element of the matrix. That a LongFrac is a 16.16 fixed-point number is an inference
from the values seen:
00000338 00 00 FF A0 00 00 00 00 01 68 00 00 01 40 00 62
00000348 00 02 00 5A …
rotType 0, iA −96, iB 0, iC 0, Depth 0x01680000 (360.0), centre 320, 98, fixCoord 2, angleStep 90DPPS, Deluxe Paint for the PC’s settings
A chunk written by Deluxe Paint for the PC, 110 bytes long in every file seen. It
was found in its PBM pictures; the ILBM files from
PC projects that were examined carry DPPV instead. No document describes
it, and the explorer shows it as bytes. Its bytes look like perspective settings, for
example the value 0x01680000 (360.0, as in DPPV’s depth) and
320, 200 (the page centre), but that is an inference.
DPI, the resolution
A DPIHeader (Spencer Shanson, 1990). The ID is DPI , with a
space.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UWORD | dpi_x | Horizontal dots per inch. |
| 2 | 2 | UWORD | dpi_y | Vertical dots per inch. |
TINY, a thumbnail
A small copy of the picture: a UWORD width and a UWORD height, then pixel data “encoded the same way as BODY”, using the bitmap header’s compression, up to the chunk’s own size. It is described in later write-ups (Wikipedia, ModdingWiki), not in Electronic Arts’ or Commodore’s documents.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UWORD | width | The thumbnail’s width in pixels. |
| 2 | 2 | UWORD | height | Its height. |
| 4 | the rest | bytes | pixels | Rows as in the BODY. |
Deluxe Paint for the PC writes it in its PBM pictures; no ILBM among the files
examined for this site had one. For an ILBM, the explorer reads it as planar rows with
the bitmap header’s number of planes and no mask; that is an inference. With
compression 2 it reads the thumbnail’s planes from VDAT chunks, as the
BODY’s are.
Text chunks
Plain text, often ending in a zero byte, which the explorer leaves out when it shows them:
| ID | Holds |
|---|---|
ANNO | An annotation, often naming the program, such as “$VER: Written by ASDG’s Art Department Professional IFF3.0.4 (31.10.98)”. |
AUTH | The author. |
NAME | The picture’s name. |
(c) | The copyright notice. |
TEXT | Any text that goes with the picture. |
CLUT, a colour lookup table
A ColorLUT (Justin V. McCormick, 1989), 264 bytes: a lookup table for one
channel, used with deep or grey pictures.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ULONG | type | Which channel: 0 CLUT_MONO, 1 CLUT_RED, 2 CLUT_GREEN, 3 CLUT_BLUE, 4 CLUT_HUE, 5 CLUT_SAT; 6 and 7 unused; higher values are reserved (CLUT_RESERVED_BITS, 0xFFFFFFF8); the explorer reports a type with those bits set. |
| 4 | 4 | ULONG | res0 | Reserved. |
| 8 | 256 | UBYTE[256] | lut | The table: the value to use for each input value 0 to 255. |
43 4C 55 54 00 00 01 08 00 00 00 00 00 00 00 00 00 01 02 03 …
CLUT written by Art Department Professional: type 0 (mono), an identity tableThe document says the table translates or biases 8-bit values, and that it leaves
16- and 32-bit tables to a separate chunk. It does not say how a reader should apply
one, so the explorer follows Netpbm: CLUT_RED, CLUT_GREEN
and CLUT_BLUE adjust the colour map and the channels of deep pictures,
and CLUT_MONO adjusts a grey picture with no colour map. Hold-and-modify
pictures ignore every table. CLUT_HUE and CLUT_SAT are
shown but not applied.
PCHG, palette changes line by line
A property chunk by Sebastiano Vigna (1991) that changes colour registers as the
picture is drawn, line by line, so a picture can show more colours than one
CMAP holds. The CMAP still gives the first line’s colours;
in the document’s words, “CMAP and PCHG don’t interfere”. The ILBM document’s text is
“PCHG specs 0.6 (28.11.91)”, a preliminary version; Netpbm’s reader uses a later,
slightly different header. Both are 20 bytes.
| Offset | Size | Type | Later layout | Preliminary 0.6 layout |
|---|---|---|---|---|
| 0 | 2 | UWORD | Compression: 0 PCHG_COMP_NONE, 1 PCHG_COMP_HUFFMAN. The document spells it HUFFMANN. | |
| 2 | 2 | UWORD | Flags: 1 PCHGF_12BIT (PCHGF_4BIT in 0.6): small change lists. 2 PCHGF_32BIT: big change lists. 4 PCHGF_USE_ALPHA: the alpha bytes mean something. | |
| 4 | 2 | WORD | StartLine: the line the mask starts at, “a (possibly negative) offset from the top of the screen”. | |
| 6 | 2 | UWORD | LineCount: how many lines the mask covers. | |
| 8 | 2 | UWORD | ChangedLines: how many lines have changes. | MinReg |
| 10 | 2 | UWORD | MinReg: the lowest register changed. | MaxReg: the highest register changed. |
| 12 | 2 | UWORD | MaxReg: the highest register changed. | TreeSize: the Huffman tree’s size in bytes. |
| 14 | 2 | UWORD | MaxChanges: the most changes on one line. | Reserved |
| 16 | 4 | ULONG | TotalChanges: changes in the whole chunk. | OriginalSize: the unpacked data’s size; without compression, the chunk less this header. |
In the later layout a compressed chunk has a second header after this one, a
PCHGCompHeader of two ULONGs, CompInfoSize (the tree’s size
in bytes) and OriginalDataSize (the unpacked size). The explorer tells
the layouts apart by checking which sizes fit the chunk, and names them both in the
structure tree.
Then comes the data: a line mask, then a change list for each set bit of it.
With PCHG_COMP_HUFFMAN, the data is Huffman-packed and unpacks to the
stated size, the bit stream padded to a multiple of 32 bits. Compression 0 means the
data follows as it is.
- The line mask:
(LineCount + 31) ÷ 32longwords, one bit a line fromStartLine; a set bit means that line has changes. The document says “Bit 0 corresponds to line StartLine”. Netpbm reads the most significant bit of each byte first, and so does the explorer. - Small lists (
PCHGF_12BIT):ChangeCount16andChangeCount32(UBYTEs), then that many UWORDs. Each word holds a register number in its top 4 bits (add 16 for theChangeCount32words) and a 12-bit colour in its lower bits: 4 bits each of red, green and blue. - Big lists (
PCHGF_32BIT):ChangeCount(UWORD), then that many 6-byteBigPaletteChangerecords:Register(UWORD), then the UBYTEsAlpha,Red,Blue,Green, in that order. Alpha counts only withPCHGF_USE_ALPHA. - Writing rules: no more than 7 changes a line, and in an interlaced picture changes only on even lines.
The Huffman tree
The tree is an array of 16-bit signed words, read from the last word back. At a
node, a 1 bit reads the word there: a non-negative word is a leaf, its low byte the
result, and a negative word moves that many bytes back. A 0 bit moves one word back:
if the word found there is positive and has the 0x100 bit set, it is a
leaf; otherwise it is the next node. After a leaf, go back to the last word. The
tree is at most 1,022 bytes.
Lines before the top of the picture (a negative StartLine) are applied
before the first row. The explorer applies changes to the palette as each row is
drawn, also to hold-and-modify base colours and half-bright colours, and they
stay until changed again, as Netpbm’s reader does. A row can name registers past the
CMAP, and the palette grows to hold them. The document gives alpha no
meaning beyond the flag, so the explorer shows it and does not apply it.
When a file holds more than one kind of per-line palette, the explorer uses
PCHG, then CTBL, then SHAM, the order Netpbm
uses.
CTBL and DYCP, NewTek’s Dynamic HAM
NewTek’s Digi-View stored one row of colour registers for each picture line:
CTBL, “array of words, one for each color (0rgb)”, is 16 UWORDs a line
(32 bytes), each 4-bit red, green and blue, with no header and no line count; the
chunk’s size says how many lines it covers. Netpbm reads it so, and the explorer
follows it. DYCP is “3 longwords (file setup stuff)”: three ULONGs the
document does not explain, shown as they are.
Each row replaces registers 0 to 15 for that line.
SHAM, Sliced HAM
Not in the ILBM document, but the same idea as CTBL: a UWORD version,
then 16 UWORDs (32 bytes) of 0rgb colours for each line. Netpbm reads it, and the
explorer applies it the same way: in an interlaced picture (the CAMG
LACE bit) one table serves two lines, so it applies on even rows. The
PCHG specification notes that “SHAM is hardwired to 200 lines”.
CMYK, a colour map in CMYK
A proposed chunk (Dan Weiss, Deron Kazmaier, Gary Knight, 29 August 1991, Soft-Logik),
with four bytes for each colour number, in order: cyan, magenta, yellow, black. The
number of colours is ckSize ÷ 4. It is “the same as the CMAP chunk” with
four components and is used in addition to it. The explorer shows the map and, with
no CMAP, turns it into RGB by the plain formula R = (255 − C) × (255 −
K) ÷ 255, which the document does not specify.
CNAM, names for colours
By the same authors. Two UWORDs, the first and last colour number it names, then a NUL-terminated string for each. The chunk may be repeated for other groups. The explorer shows each name beside its colour in the palette.
XBMI, extended bitmap information
By the same authors. Three UWORDs, one word (two bytes) each:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | UWORD | Picture type | 0 ILBM_PAL palette indexes, 1 ILBM_GREY greyscale, 2 ILBM_RGB, 3 ILBM_RGBA, 4 ILBM_CMYK, 5 ILBM_CMYKA, 6 ILBM_BW, a 1-bit picture where white is 0 and black is 1. |
| 2 | 2 | UWORD | X DPI | Horizontal dots per inch. |
| 4 | 2 | UWORD | Y DPI | Vertical dots per inch. |
The explorer names the type and paints by it. ILBM_CMYK (32 planes) and
ILBM_CMYKA (40 planes) are treated as cyan, magenta, yellow, black and
alpha, 8 planes each, lowest bit first, an inference from the RGB deep order, and
turned into RGB by the same formula. ILBM_BW with one plane paints white
for 0 and black for 1 when no CMAP says otherwise.
ILBM_RGB and ILBM_RGBA are painted as usual.
EPSF, encapsulated PostScript
An Encapsulated PostScript copy of the picture, used by Pixelations’ PixelScript clip art (Kevin Saltzman):
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | lowerleftx | The bounding box: lower left x. |
| 2 | 2 | WORD | lowerlefty | Lower left y. |
| 4 | 2 | WORD | upperrightx | Upper right x. |
| 6 | 2 | WORD | upperrighty | Upper right y. |
| 8 | the rest | CHAR[] | PostScript | An ASCII PostScript file. |
The explorer shows the bounding box and the PostScript text, and can open it as a file of its own.
PRVW, a miniature preview
Registered in September 1991 by Gary Bonham of Oxxi. “PRVW is just like an ILBM but
is nested in an ILBM. It is a miniature version of the picture.” He “didn’t call it
ILBM because he didn’t want editors and parsers getting confused and delving in”,
and did not use a CAT because “they blow up DPaint”. The document does
not say how its contents begin. The explorer accepts a form type first or goes
straight to the chunks, reads them with their own BMHD and
CMAP, and shows the miniature as a picture.
XSSL, 3-D glasses
From Haitex. “Finding an XSSL chunk in an ILBM indicates that the ILBM is to be displayed as a 3-D image with the X-Specs product from Haitex.” The chunk “contains four (4) bytes of reserved data”. The explorer names it and shows the four bytes.
DCOL, direct colour
An unofficial chunk used by Netpbm to mark direct-colour ILBMs: four bytes, the
numbers of red, green and blue planes and a pad byte. The planes then run red first,
lowest bit first, then green, then blue, each channel scaled to the largest. The
explorer reads it and paints such pictures; Netpbm stops if a CLUT is also
present, and the explorer ignores the CLUT there.
Chunks for any form
From the IFF chunk registry, usable in any FORM:
| ID | Holds |
|---|---|
FVER | An AmigaOS version string, of the pattern $VER: name ver.rev, such as $VER: workbench.catalog 53.12. |
CHRS | A generic character string. Newer programs that find a UTF8 chunk read that instead. |
UTF8 | UTF-8 text (Ilkka Lehtoranta). |
CSET | CodeSet (LONG): 0 is ECMA Latin 1, the Amiga’s standard set; other values were left to the AmigaOS team. Then seven reserved LONGs. It says what character set the text in this FORM uses (Martin Taillefer). |
HLID | Soft-Logik’s HotLink identification, 12 bytes: two longwords of publication ID and one of its version. |
INFO | A proposal in the registry for data usually found in a file’s .info file. No public specification gives its layout, so the explorer shows it as bytes. |
JUNK | A chunk readers always ignore. |
The explorer names and shows each of them.
Other chunks
The explorer shows any chunk it does not decode as bytes. Some found in real files:
| ID | What is known |
|---|---|
XAMG, XMAP | Found together in LightWave 3D’s 24-plane brushes. XAMG holds 0x800, the HAM bit, and XMAP 48 bytes, a 16-colour map. They look like a CAMG and a CMAP renamed so that readers do not take the deep picture for HAM; that is an inference. |
DPXT | 64 bytes, from TrueBrilliance. Unknown. |
ASDG | 16 bytes, 00 00 00 02 80 00 80 00 80 00 80 00 80 00 80 00 in the files seen, written with Art Department Professional’s ANNO. Unknown. |
The registry’s other ILBM entries are private to their makers or only reserved: the
Haitex 3DCM and 3DPA, ASDG’s ASDG and
FRED, Photon Paint’s BHBA, BHCP and
BHSM, NewTek’s DGVW, DCTV and the transparency
map TMAP. No public specification exists for them.
None of the registered chunks on this page, from PCHG on, was among the
files examined for this site; the explorer’s readers for them were checked against
files built for the test.