TIFF The Standard in the Graphic Arts

TIFF is the image file format preferred in the graphic arts industry. Photo-editing software, paint programs, and desktop-publishing applications use TIFF because it is a powerful and flexible image format. However, this very flexibility is sometimes the undoing of TIFF. This standard supports black-and-white binary images, 8-bit grayscale images, 8-bit palette color images, 16-bit RGB color images, 24bit RGB color images, as well as specialized graphics needs such as 32-bit CMYK color. TIFF files can be written in the PC's Intel little-endian byte order as well as Apple's Motorola big-endian byte order. TIFF even supports data in floating-point format, and allows proprietary data formats. In addition, the image data can be uncompressed, or it can be compressed using run-length-limited (RLE), Lemple-Ziv-Welch (LZW), or JPEG compression. Expecting one program to read every possible type of TIFF file is asking a great deal!

Furthermore, a TIFF file can store just one image or multiple images, and the images can be stored whole, broken into strips, or broken into tiles. The most common use for a second file is to store a thumbnail image for quick viewing.

The TIFF header is eight bytes long and begins with an identifier, either the characters 11 for Intel byte order, or MM for Motorola byte order. In the example shown in Table 3.3, the byte order is Intel ("II" = 49 49 hexadecimal). The byte order is crucial because all of the numbers that follow are hexadecimal. To load an image, the file must be interpreted correctly. Next comes the version number, which is always 42 (2 A 0 0 in Intel byte order and 0 0 2A in Motorola byte order), followed by the offset in bytes to the first image file directory. The offset tells the TIFF reader how far into the file to look; in the Table 3.3 example, the program will look for the first image file directory that begins at the byte number 8 in the file (the Intel integer 08 00 00 00 equals 8), recalling, of course, that the first byte in the file is byte number 0.

An image file directory (IFD) is a subheader that provides information specific to each of the individual images that may be stored in the TIFF file. The IFD begins with the number of tags that describe the image (there are 15 tags in the example) followed by the tags, each 12 bytes long. The first two bytes are the tag number; the second two bytes are the field, which defines the type of data in the tag (3 = short integer, 4 = long integer, 5 = 32-bit fraction); the next four bytes tell how many data items the tag describes (always 1 in the example); and the last four bytes are either the value of the tag; or if the value is longer than four bytes, the byte offset to the location of the value in the file. In the example, all of the tags have their values except tags 11A hex and 1 IB hex, which give the byte offset to these data (two 32-bit fractions) located after the image in the tailer. Each IFD ends with the offset to the next IFD; an IFD of zero means there are no more IFDs.

Tags describe the image characteristics, such as tag 10 0 hex with the number of samples per line and tag 101 hex with the number of lines in the image. Bytes marked with XX XX XX XX must be replaced by appropriate hexadecimal values. In the example, the image is divided into strips each containing one line of

Section 3.8: TIFF: The Standard in the Graphic Arts

Table 3.3 Basic Grayscale TIFF Header






Was this article helpful?

0 0
Learn Photoshop Now

Learn Photoshop Now

This first volume will guide you through the basics of Photoshop. Well start at the beginning and slowly be working our way through to the more advanced stuff but dont worry its all aimed at the total newbie.

Get My Free Ebook

Post a comment