TIFF 6.0 Specification
Final—June 3, 1992
Figure 1
Header
0
Byte Order
X
Directory Entry
Tag
2
42
X+2
Type
4
A
6
Offset of 0th IFD
X+4
Count
X+8
Value or Offset
IFD
A
B
Number of Directory Entries
A+2
Directory Entry 0
Value
A+14
Directory Entry 1
A+26
Directory Entry 2
A+2+B*12
Offset of next IFD
Image File Directory
An
Image File Directory
(IFD) consists of a 2-byte count of the number of direc-
tory entries (i.e., the number of fields), followed by a sequence of 12-byte field
entries, followed by a 4-byte offset of the next IFD (or 0 if none). (Do not forget to
write the 4 bytes of 0 after the last IFD.)
There must be at least 1 IFD in a TIFF file and each IFD must have at least one
entry.
See Figure 1.
IFD Entry
Each 12-byte IFD entry has the following format:
Bytes 0-1
Bytes 2-3
Bytes 4-7
The Tag that identifies the field.
The field Type.
The number of values,
Count
of the indicated Type.
14