Introduction
Classic TIFF is the layout described by the TIFF 6.0 specification of 1992, and the
one almost every .tif and .tiff file uses. Its offsets are
32-bit, which limits a file to 4 GB; larger images use
BigTIFF.
A file can hold several pages, any of a long list of compression methods, high bit depths and many colour spaces, all described by numbered tags.
Structure
A TIFF file starts with an 8-byte header. The first two bytes give the byte order of
the whole file: II for little-endian (Intel) or MM for
big-endian (Motorola). The number 42 follows, then the offset of the first image file
directory (IFD).
An IFD is a count of entries, then 12 bytes per entry, then the offset of the next IFD (zero for the last). Each entry is a tag number, a data type, a count and either the value itself, when it fits in 4 bytes, or the offset where the value is stored. Tags give the width, height, bits per sample, compression and the offsets and lengths of the strips or tiles that hold the pixels. Each page of a multi-page file has its own IFD.
0Header byte order, 42, offset of the first IFD8 bytes…IFD repeated for each page or imagevaries+0Entry count2 bytes+2Entries tag, type, count, value or offset12 bytes each…Next IFD offset zero at the end4 bytes
…Strips or tiles the image data, found through the tagsvaries
Telling it apart
The file starts with 49 49 2A 00 (II, 42) or
4D 4D 00 2A (MM, 42). A
BigTIFF file has 43 in place of 42.
Also used for
Variants
- Tagged Image File Format (classic) – the usual TIFF layout, with 32-bit offsets and files up to 4 GB
- BigTIFF – TIFF with 64-bit offsets, for files larger than 4 GB
Links
Software
- Adobe Photoshop – image editor that opens and saves TIFF, including layers (Windows, macOS)
- GIMP – free image editor that opens and saves TIFF (Windows, macOS, Linux)
- Krita – free painting program that opens and saves TIFF (Windows, macOS, Linux)
- IrfanView – image viewer that shows multi-page TIFFs (Windows)
- XnView MP – image viewer and batch converter (Windows, macOS, Linux)
- ImageMagick – command-line tools that convert to and from TIFF (Windows, macOS, Linux)
- QGIS – free geographic information system that opens GeoTIFF (Windows, macOS, Linux)
Developers
Reference
- TIFF tag reference – AWare Systems’ list of every TIFF tag and its meaning