Introduction
ILBM, the Interleaved Bitmap, is the picture format of the Amiga. It is one form of IFF, the Interchange File Format that Electronic Arts published in January 1985, and Jerry Morrison of Electronic Arts described it in January 1986. Electronic Arts’ Deluxe Paint wrote it from its first release in 1985, on the Amiga and later on the PC and the Atari ST, and most Amiga software reads and writes it.
The Amiga’s display hardware drew pictures from bitplanes: plane 0 holds the lowest bit of every pixel’s colour number, plane 1 the next bit, and so on. ILBM stores the pixels the same way, a row at a time, with one line of each plane in turn. Pictures can have from 1 to 8 planes and a colour map, use the Amiga’s hold-and-modify and Extra Half-Brite modes, or have 24 or 32 planes of direct colour.
Every later version has only added to the format: new display mode bits, more planes, new optional chunks and a new compression value. So every ILBM file is one format, and a reader that skips the chunks it does not know can read them all. Commodore revised the document in 1988, and it is still published in the AmigaOS documentation.
Files on the Amiga often have no extension, or .iff, which is shared
with every other IFF form. On the PC Deluxe Paint used .lbm, which it
also used for its PBM pictures; .ilbm
is rarer. A file dropped on any page of this site opens in the explorer, which shows
every chunk and every row, with the picture, its palette and its colour ranges.
Structure
An ILBM file is one IFF FORM chunk with the form type ILBM.
Every chunk inside it is a four-letter ID, a 4-byte big-endian length and the data,
padded to an even length. The bitmap header comes first and the pixel data last; the
chunks in between can come in any order.
0FORM chunk ID, size and the form typeILBM12 bytes12BMHD the bitmap header: size, bitplanes, masking and compression28 bytes40CMAP the colour map, 3 bytes a colourvaries…CAMG the Amiga display mode, which marks HAM and Extra Half-Brite12 bytes…CRNG, GRAB, DPPV … optional chunks: colour ranges, a brush’s hotspot, Deluxe Paint’s settingsvaries…BODY the rows of interleaved bitplanes, usually packed with ByteRun1varies
The ILBM document gives the chunks as
FORM "ILBM" BMHD [CMAP] [GRAB] [DEST] [SPRT] [CAMG] CRNG* CCRT* [BODY]:
square brackets mark a chunk that may be left out, and a star one that may be
repeated. Only BMHD is required. Later chunks, such as Deluxe Paint’s
DPPV, fit in among the optional ones.
The start of a file
The first 48 bytes of a 320 × 200 picture in 256 colours, saved by Deluxe Paint for
the PC. The FORM header is marked, then comes the BMHD
chunk, then the start of the CMAP, marked. The form’s size,
00 00 1B FC, is 7,164; with the 8-byte header that gives the file’s
7,172 bytes.
00000000 46 4F 52 4D 00 00 1B FC 49 4C 42 4D 42 4D 48 44
00000010 00 00 00 14 01 40 00 C8 00 00 00 00 08 00 01 00
00000020 00 87 05 06 01 40 00 C8 43 4D 41 50 00 00 03 00
FORM, ILBM; a 20-byte BMHD: 320 × 200, 8 planes, ByteRun1, aspect 5:6; a 768-byte CMAPIn this file the colour map is followed by a DPPV chunk at offset
0x330, four CRNG chunks from 0x3A0, and the BODY at 0x3E0,
whose 6,171 bytes are followed by a pad byte.
Telling it apart
The explorer’s parser for this format checks that the file starts with
FORM and that the form type, the four bytes at offset 8, is
ILBM (49 4C 42 4D). It turns the file down if there is no
BMHD chunk, if the BMHD is shorter than 20 bytes, or if the
BODY comes before the BMHD, and the explorer then tries the
parsers for the other formats of the family.
A Deluxe Paint PC bitmap has the form type PBM and an Amiga contiguous
bitmap ACBM. Other IFF files, such as 8SVX sound or ANIM animations, have
other form types and are other formats.
Variants
- Interleaved bitmap (IFF ILBM) – the Amiga’s format: interleaved bitplanes, with HAM, EHB and 24-bit pictures
- Deluxe Paint PC bitmap (IFF PBM) – Deluxe Paint for MS-DOS: one byte a pixel
- Amiga contiguous bitmap (IFF ACBM) – AmigaBASIC’s form: each bitplane stored whole
Links
Software
- GrafX2 – free pixel-art paint program in the style of Deluxe Paint, which opens and saves ILBM; it works in up to 256 colours, so HAM and 24-bit pictures lose colours (Windows, macOS, Linux)
- XnView MP – image viewer and converter that reads ILBM (Windows, macOS, Linux)
- IrfanView – image viewer that opens IFF and LBM pictures (Windows)
- Netpbm – command-line image tools;
ilbmtoppmreads ILBM, with EHB, HAM and 24-bit pictures, andppmtoilbmwrites it (Windows, macOS, Linux) - FFmpeg – command-line converter whose IFF decoder reads ILBM, compression 2 included (Windows, macOS, Linux)
Developers
- libilbm – library that reads and writes ILBM, with Deluxe Paint’s chunks, by Sander van der Burg (C)
- libiff – the IFF chunk library libilbm is built on (C)
- FFmpeg’s IFF decoder – libavcodec’s ILBM reader, the only full description of compression 2 (C)
Reference
- ILBM IFF Interleaved Bitmap – the ILBM document, with Commodore’s revisions and the registered third-party chunks
- EA IFF 85 – Electronic Arts’ 1985 standard for IFF files, as text
- ilbmtoppm – Netpbm’s manual page, with the kinds of ILBM it reads