.IFF
Interleaved Bitmap (IFF ILBM)
Introduction
ILBM is the picture format of the Amiga. It is one form of IFF, the Interchange File Format that Electronic Arts published in 1985, and it was made popular by Deluxe Paint. Amiga graphics hardware drew images from bitplanes, one bit of each pixel’s colour number per plane, and ILBM stores pixels the same way.
A file usually has the extension .iff, or .lbm on the PC,
where Deluxe Paint II Enhanced also saved a simpler variant called PBM with one byte per
pixel. The .iff extension is shared with every other IFF form, such as 8SVX
sound.
Software
Structure
An ILBM file is an IFF FORM chunk with the form type ILBM.
Every chunk is a four-letter ID, a 4-byte big-endian length and the data, padded to an
even length. BMHD, the bitmap header, gives the width, height, number of
bitplanes, masking and compression. CMAP holds the palette as 3 bytes per
colour, and CAMG the Amiga display mode, which marks the special HAM and Extra
Half-Brite modes.
BODY holds the pixels row by row. Each row is stored as one line of each
bitplane in turn, each line padded to a multiple of 16 bits. With compression 1 every line
is packed with ByteRun1, a simple run-length encoding. Optional chunks include
CRNG for Deluxe Paint’s colour cycling and GRAB for a brush’s
handle.
0FORM chunk ID, length, form typeILBM12 bytes12BMHD size, bitplanes, masking, compression28 bytes40CMAP palette, 3 bytes per colourvaries…CAMG, CRNG, GRAB … optional chunksvaries…BODY interleaved bitplane rowsvaries