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.
In this reference
- Header and directories – the 8-byte header, directories, 12-byte entries, data types and a byte-by-byte file
- Tags – every TIFF 6.0 field with its type, count and default, and the tags added since
- Tag values – every code: compression schemes, colour spaces, orientation, flags and sample formats
- Image data – strips, tiles, sample packing, and PackBits, fax, LZW, Deflate and JPEG coding
In the explorer
Drop a .tif or .tiff file on the page to open it. The viewer
has a tab for the file and one for each directory (IFD), with the picture, the image’s
properties, every entry with its tag name and meaning, the strips or tiles, the
GeoTIFF keys and a report of the decoding. Every compression of TIFF 6.0 is decoded:
none, Modified Huffman, Group 3 (1D and 2D), Group 4, LZW with its predictor,
PackBits, JPEG (old and new style) and Deflate, in strips or tiles, chunky or planar,
from 1 to 64 bits a sample, as bilevel, grey, palette, RGB, CMYK, YCbCr, CIE L*a*b*,
with associated or unassociated alpha. What is not decoded is listed under Not
described on the family page.
Not described
The gaps of this reference and of the viewer are the same for classic TIFF and BigTIFF, and are listed, as known and unknown, under Not described on the family page.
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 6.0 specification – the Aldus and Adobe specification of 1992 (PDF)
- EXIF and TIFF tags – ExifTool’s list of tag numbers, including later and private ones