TIFF 6.0 Specification
Final—June 3, 1992
ties, but they are not. This warning covers both TIFF field value offsets and fields
that are defined as offsets, such as StripOffsets.
Point to real data.
All strip offsets must reference valid locations. (It is not legal to
use an offset of 0 to mean something special.)
Beware of extra components.
Some TIFF files may have more components per
pixel than you think. A Baseline TIFF reader must skip over them gracefully,
using the values of the SamplesPerPixel and BitsPerSample fields. For example,
it is possible that the data will have a PhotometricInterpretation of RGB but have
4 SamplesPerPixel. See ExtraSamples for further details.
Beware of new field types.
Be prepared to handle unexpected field types such as
floating-point data. A Baseline TIFF reader must skip over such fields gracefully.
Do not expect that BYTE, ASCII, SHORT, LONG, and RATIONAL will always be
a complete list of field types.
Beware of new pixel types.
Some TIFF files may have pixel data that consists of
something other than unsigned integers. If the SampleFormat field is present and
the value is not 1, a Baseline TIFF reader that cannot handle the SampleFormat
value must terminate the import process gracefully.
Notes on Required Fields
ImageWidth, ImageLength.
Both “SHORT” and “LONG” TIFF field types are
allowed and must be handled properly by readers. TIFF writers can use either
type. TIFF readers are not required to read arbitrarily large files however. Some
readers will give up if the entire image cannot fit into available memory. (In such
cases the reader should inform the user about the problem.) Others will probably
not be able to handle ImageWidth greater than 65535.
RowsPerStrip.
SHORT or LONG. Readers must be able to handle any value
between 1 and 2**32-1. However, some readers may try to read an entire strip
into memory at one time. If the entire image is one strip, the application may run
out of memory. Recommendation: Set RowsPerStrip such that the size of each
strip is about 8K bytes. Do this even for uncompressed data because it is easy for
a writer and makes things simpler for readers. Note that extremely wide high-
resolution images may have rows larger than 8K bytes; in this case, RowsPerStrip
should be 1, and the strip will be larger than 8K.
StripOffsets.
SHORT or LONG.
StripByteCounts.
SHORT or LONG.
XResolution, YResolution.
RATIONAL. Note that the X and Y resolutions may
be unequal. A TIFF reader must be able to handle this case. Typically, TIFF pixel-
editors do not care about the resolution, but applications (such as page layout
programs) do care.
ResolutionUnit.
SHORT. TIFF readers must be prepared to handle all three
values for ResolutionUnit.
27