Besides the bitmap header, the
colour map and the
pixel data, Deluxe Paint for the PC writes
sixteen CRNG colour ranges, a TINY thumbnail and, in most
files, a DPPS chunk. Other chunks from the ILBM world may appear too. A
reader that does not know a chunk skips it. All numbers are big-endian.
TINY, the thumbnail
A small copy of the picture, a quarter of its width and height. Every PBM file examined for this site has one. It is described in later write-ups (Wikipedia, ModdingWiki), not in any Electronic Arts document.
| 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 “encoded the same way as BODY”: a byte a pixel, with the bitmap header’s compression, up to the chunk’s own size. |
000004A6 54 49 4E 59 00 00 03 AD 00 50 00 3C B1 00 B1 00
TINY of 941 bytes for a 320 × 240 picture: 80 × 60 pixels, a quarter of each sideThe rows are packed with ByteRun1, as the BODY is: B1 is
−79, so 80 bytes of colour 0, a whole row.
Two quirks were seen. A 320 × 55 picture has a thumbnail of 80 × 13 whose data holds
14 packed rows, one more than its height: 55 ÷ 4 rounded up, which suggests how
Deluxe Paint counts them, but that is an inference. The explorer paints the thumbnail
and reports the extra row’s bytes as bytes after the last row. And in the 1 × 1
palette files the thumbnail’s single row is one byte, not padded to two as the
BODY’s is. The explorer works out a thumbnail’s row length from the data,
as it does the BODY’s, so
such a row reads cleanly.
Which version of Deluxe Paint first wrote TINY is not known.
DPPS, Deluxe Paint for the PC’s settings
A chunk Deluxe Paint for the PC writes after the colour map, 110 bytes in every file seen; most PBM files have one. No document describes it, and the explorer shows it as bytes.
00000330 44 50 50 53 00 00 00 6E 00 02 00 00 00 00 00 00
00000340 00 00 00 00 00 00 01 68 00 00 01 40 00 C8 00 02
00000350 00 0F …
DPPS chunkIts bytes look like perspective settings, as in the Amiga’s
DPPV: they hold 0x01680000, which is
360.0 as a 16.16 fixed-point number and is also DPPV’s usual depth, and
320, 200, the page size or centre. That is an inference; the meaning of each byte is not
known.
CRNG, the colour ranges
A CRange, 8 bytes, as defined in the ILBM document: a range of colours that
Deluxe Paint can cycle, to animate a picture, or use for shading. Deluxe Paint for the
PC writes sixteen in every PBM file, one for each range slot, unused ones included.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | pad1 | Reserved, 0. Deluxe Paint for the PC sometimes 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. |
| 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 ILBM 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.
000003A6 43 52 4E 47 00 00 00 08 00 00 0A AA 00 01 03 07
CCRT, Graphicraft’s colour cycle
Commodore Graphicraft’s colour cycle, from the ILBM document, 14 bytes. Not seen in a PBM; the explorer reads it if it is there.
| 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
The Amiga Deluxe Paint IV’s range (Lee Taran), which can list colours that are not next to each other. Not seen in a PBM; the explorer reads it if it is there.
| 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, which “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. | |
| … | 2 × nregs | DIndex | Each: cell and index, two UBYTEs. |
The ILBM document says “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”; when those hold, RNG_ACTIVE “is a user/program
preference”. 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, and otherwise says which condition is
missing.
GRAB, the hotspot
A Point2D: the point of a brush that sits under the pointer, from the
top-left corner.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | x | Pixels from the left edge. |
| 2 | 2 | WORD | y | Pixels from the top edge. |
DPPV, Deluxe Paint’s perspective
The perspective settings of Deluxe Paint II (PerspState, Dan Silva,
1986), described in the ILBM document and written in Deluxe Paint’s ILBM files, on the
PC as well as the Amiga. In PBM files the PC version writes DPPS instead,
in the files seen. 104 bytes:
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | WORD | rotType | 0 ROT_EULER, 1 ROT_INCR. |
| 2 | 6 | 3 WORDs | iA, iB, iC | Rotation angles, in degrees. |
| 8 | 4 | LongFrac | Depth | The perspective depth; 16.16 fixed point, an inference. |
| 12 | 4 | 2 WORDs | uCenter, vCenter | The centre of perspective. |
| 16 | 2 | WORD | fixCoord | The fixed coordinate. |
| 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 ILBM document defines LongFrac as a LONG and a point as three of
them, which brings the chunk to 104 bytes. The explorer shows every field.
DPI, the resolution
A DPIHeader (Spencer Shanson, 1990): dpi_x, UWORD, and
dpi_y, UWORD, the dots per inch across and down. The ID is
DPI , with a space. Not seen in a PBM.
Text chunks
Plain text, often ending in a zero byte, which the explorer leaves out when it shows
them: ANNO (an annotation), AUTH (the author),
NAME, (c) (the copyright notice) and TEXT.
None was seen in a PBM file; other programs than Deluxe Paint may write them.
CAMG
The Amiga display mode, one ULONG. It says whether an Amiga picture uses hold-and-modify or Extra Half-Brite, which need bitplanes; a PBM has none, so the chunk means nothing here. No PBM file seen has one. If one is there, the explorer shows its mode bits but reads the pixels as bytes all the same.
The mode bits are HIRES 0x8000, SPRITES
0x4000, VP_HIDE 0x2000,
EXTENDED_MODE 0x1000, HAM 0x800,
DUALPF 0x400, GENLOCK_AUDIO 0x100,
EXTRA_HALFBRITE 0x80, PFBA 0x40,
SUPERHIRES 0x20, DOUBLESCAN 0x8,
LACE 0x4 and GENLOCK_VIDEO 0x2.
From AmigaOS 2.0 the value can be a whole ModeID, with a monitor in the upper 16 bits
and EXTENDED_MODE set: under the mask 0xFFFF1000,
0x00000000 default, 0x00011000 NTSC,
0x00021000 PAL, 0x00031000 VGA, 0x00041000
A2024, 0x00051000 Proto, 0x00061000 Euro72,
0x00071000 Euro36, 0x00081000 Super72,
0x00091000 DblNTSC and 0x000A1000 DblPAL.
The ILBM document also has rules for old and bad values. Writers for AmigaOS 1.3
clear the bits that do not describe the picture (0x7102, masking with
0x8EFD), and readers should mask them off only when the upper word is
zero. A value with junk in the upper word and EXTENDED_MODE clear is
thrown away.
DEST, the destination merge
A DestMerge, 8 bytes, from the ILBM document: how planes go into a
deeper bitmap. A PBM has no bitplanes, so the chunk means nothing here; if one is
there, the explorer shows its fields.
| 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. |
| 4 | 2 | UWORD | planeOnOff | The value to fill each destination plane that planePick leaves out. |
| 6 | 2 | UWORD | planeMask | A 1 bit lets that destination plane be changed. |
SPRT, a sprite
One UWORD, the sprite precedence: 0 is drawn in front of all others. Its presence marks the picture as an Amiga sprite, which means nothing for a PBM.
CLUT, a colour lookup table
A ColorLUT (Justin V. McCormick, 1989), 264 bytes: a lookup table for one
channel, which translates or biases 8-bit values.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ULONG | type | 0 CLUT_MONO, 1 CLUT_RED, 2 CLUT_GREEN, 3 CLUT_BLUE, 4 CLUT_HUE, 5 CLUT_SAT; 6 and 7 unused; higher values reserved. |
| 4 | 4 | ULONG | res0 | Reserved. |
| 8 | 256 | UBYTE[256] | lut | The value to use for each input 0 to 255. |
No document says how to apply one. Following Netpbm, the explorer applies
CLUT_RED, CLUT_GREEN and CLUT_BLUE to the colour
map, and CLUT_MONO to a picture with no colour map; CLUT_HUE
and CLUT_SAT are shown but not applied.
PCHG, palette changes line by line
A chunk by Sebastiano Vigna (1991), defined in the ILBM document’s appendix, that changes colour registers line by line. No PBM with one was seen, but it fits a PBM as well as an ILBM: the explorer applies it to the byte-a-pixel rows too. The document’s “PCHG specs 0.6” header differs from the later one Netpbm reads, and the explorer reads both.
| Offset | Size | Type | Later layout | Preliminary 0.6 |
|---|---|---|---|---|
| 0 | 2 | UWORD | Compression: 0 none, 1 Huffman. | |
| 2 | 2 | UWORD | Flags: 1 small lists (PCHGF_12BIT), 2 big lists (PCHGF_32BIT), 4 PCHGF_USE_ALPHA. | |
| 4 | 2 | WORD | StartLine, possibly negative. | |
| 6 | 2 | UWORD | LineCount. | |
| 8 | 2 | UWORD | ChangedLines | MinReg |
| 10 | 2 | UWORD | MinReg | MaxReg |
| 12 | 2 | UWORD | MaxReg | TreeSize |
| 14 | 2 | UWORD | MaxChanges | Reserved |
| 16 | 4 | ULONG | TotalChanges | OriginalSize |
- In the later layout, a compressed chunk adds
CompInfoSize(the tree’s size) andOriginalDataSize, two ULONGs. - The data is
(LineCount + 31) ÷ 32longwords of line mask, one bit a line fromStartLine, then one change list for each set bit. Netpbm and the explorer read the most significant bit of each byte first. - A small list is
ChangeCount16andChangeCount32(UBYTEs), then UWORDs: a register in the top 4 bits (add 16 for the second group) and 4-bit red, green and blue. - A big list is
ChangeCount(UWORD), then 6-byte records:Register, thenAlpha,Red,Blue,Greenas UBYTEs. Alpha is shown, not applied: the document gives it no meaning beyond the flag. - With Huffman compression the data follows a tree of signed 16-bit words, read
from the last word back: a 1 bit reads the word (non-negative: a leaf’s low byte;
negative: move that many bytes back), a 0 bit moves one word back (positive with
0x100set: a leaf), and each leaf returns to the last word. The tree is at most 1,022 bytes, and the bit stream is padded to a multiple of 32 bits.
The explorer applies changes to each row as it draws it. They stay until changed
again, as Netpbm’s reader does. When a file holds more than one kind of per-line
palette, it uses PCHG, then CTBL, then SHAM.
CTBL and DYCP, per-line colours
NewTek’s Dynamic HAM chunks. CTBL is an array of 0rgb UWORDs, 16 a
line (32 bytes), with no header; Netpbm reads it so, and the explorer follows it.
DYCP is “3 longwords (file setup stuff)”, unexplained. Each row replaces
registers 0 to 15 for that line.
SHAM, Sliced HAM
Not in the ILBM document: a UWORD version, then 16 UWORDs of 0rgb colours for each line. Netpbm and the explorer read it. In an interlaced picture one table serves two lines.
CMYK, a colour map in CMYK
Four bytes for each colour number: cyan, magenta, yellow, black, so the number of
colours is ckSize ÷ 4 (Dan Weiss, Deron Kazmaier, Gary Knight, 1991). It
is used in addition to the CMAP. The explorer shows it, and with no
CMAP turns it into RGB by R = (255 − C) × (255 − K) ÷ 255, a
formula the document does not give.
CNAM, names for colours
Two UWORDs, the first and last colour number it names, then a NUL-terminated string for each. The explorer shows each name beside its colour.
XBMI, extended bitmap information
Three UWORDs: the picture type, 0 ILBM_PAL, 1 ILBM_GREY, 2
ILBM_RGB, 3 ILBM_RGBA, 4 ILBM_CMYK, 5
ILBM_CMYKA, 6 ILBM_BW, then the horizontal and vertical
dots per inch. A PBM is always a palette picture, so only ILBM_PAL fits;
the explorer names the type and paints bytes as colour numbers all the same.
EPSF, encapsulated PostScript
Four WORDs, the bounding box (lowerleftx, lowerlefty,
upperrightx, upperrighty), then an ASCII PostScript file.
The explorer shows the box and the text, and can open the PostScript on its own.
PRVW, a miniature preview
A miniature of the picture, “just like an ILBM but ... nested in an ILBM”,
registered by Gary Bonham of Oxxi in 1991. 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.
XSSL, 3-D glasses
Four reserved bytes. Its presence says the picture is for Haitex’s X-Specs 3-D display.
DCOL, direct colour
An unofficial Netpbm chunk: the numbers of red, green and blue planes, and a pad byte. It needs bitplanes, so it means nothing for a PBM.
Chunks for any form
FVER: an AmigaOS version string,$VER: name ver.rev.CHRS: a generic character string.UTF8: UTF-8 text.CSET:CodeSet(LONG, 0 is ECMA Latin 1), then seven reserved LONGs: the character set of theFORM’s text.HLID: Soft-Logik’s HotLink identification, three longwords.INFO: a registry proposal for.infodata. No public specification gives its layout, so it is shown as bytes.JUNK: a chunk readers always ignore.
Other chunks
The explorer shows any other chunk as bytes. The IFF registry’s other ILBM entries
are private to their makers or only reserved (3DCM, 3DPA,
ASDG, BHBA, BHCP, BHSM,
DGVW, DCTV, TMAP, FRED), and no
public specification exists for them. None of the registered chunks from
CLUT on was found in a PBM examined for this site.