Tagged Image File Format

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Tagged Image File Format
Filename extension .tiff, .tif
Internet media type image/tiff, image/tiff-fx
Type code TIFF
Uniform Type Identifier public.tiff
Developed by Aldus, now Adobe Systems
Type of format Image file formats
Extended to Exif, DCF, TIFF/EP

Tagged Image File Format (abbreviated TIFF) is a file format for storing images, including photographs and line art. It is now under the control of Adobe Systems. Originally created by the company Aldus[1] for use with what was then called "desktop publishing", the TIFF format is widely supported by image-manipulation applications, by publishing and page layout applications, by scanning, faxing, word processing, optical character recognition and other applications.[2] Adobe Systems, which acquired Aldus, now holds the copyright to the TIFF specification. TIFF has not had a major update since 1992, though several Aldus/Adobe technical notes have been published with minor extensions to the format, and several specifications, including TIFF/EP, have been based on the TIFF 6.0 specification.

Contents

[edit] History

The phrases "Tagged Image File Format" and "Tag Image File Format" were used as the subtitle to some early versions of the TIFF specification; the current specification, TIFF 6.0, does not use either subtitle phrase; the name is now simply "TIFF".

TIFF was originally created as an attempt to get desktop scanner vendors of the mid-1980s to agree on a common scanned image file format, rather than have each company promote its own proprietary format. In the beginning, TIFF was only a binary image format (only two possible values for each pixel), since that was all that desktop scanners could handle. As scanners became more powerful, and as desktop computer disk space became more plentiful, TIFF grew to accommodate grayscale images, then color images. Today, TIFF is a popular format for high-color-depth images, along with JPEG and PNG. Adobe Systems, which acquired the PageMaker publishing program from Aldus, now controls the TIFF specification.

[edit] Flexible options

TIFF is a flexible, adaptable file format for handling images and data within a single file, by including the header tags (size, definition, image-data arrangement, applied image compression) defining the image's geometry. For example, a TIFF file can be a container holding compressed JPEG and RLE (run-length encoding) images. A TIFF file also can include a vector-based Clipping path (outlines, croppings, image frames). The ability to store image data in a lossless format makes a TIFF file a useful image archive, because, unlike standard JPEG files, a TIFF file using lossless compression (or none) may be edited and re-saved without losing image quality. Of course this is not the case when using the TIFF as a container holding compressed JPEG. Other TIFF options are layers and pages.

Although the currently accepted standard format, when TIFF was introduced its extensibility provoked compatibility problems. Programmers were free to specify new tags and options — but not every implemented program supported every tag created. As a result, TIFF became the lowest common denominator image file. Today, most TIFF images and readers remain based upon uncompressed 32-bit CMYK or 24-bit RGB images.

TIFF offers the option of using LZW compression, a lossless data-compression technique for reducing a file's size. Until 2004, this option's use was limited, because the LZW technique then was under several patents; however, these patents have expired.

Every TIFF begins with a 2-byte indicator of byte order: "II" for little endian and "MM" for big endian byte ordering. The next 2 bytes represent the number 42, selected "for its deep philosophical significance". The 42-reading depends upon the byte order indicated by the 2-byte indicator. All words, double words, etc., in the TIFF file are read based per the indicated byte order. The TIFF 6.0 Specification (Section 7: Additional baseline TIFF Requirements) says that compliant TIFF readers must support both byte orders (II and MM), however, TIFF writers may choose the byte order convenient for their image. The image-processing community's joke about the early TIFF's standardized-consistency problems is Thousands of Incompatible File Formats. [3]

The TIFF file format uses 32-bit offsets, and as such, file size is limited to 4 GiB (4,294,967,296 bytes).

[edit] In document imaging

The TIFF format is the standard in document imaging and document management systems using CCITT Group IV 2D compression, which supports black-and-white (bitonal, monochrome) images. In high-volume storage scanning, documents are scanned in black and white (not in color or in grayscale) to conserve storage capacity. An average A4 scanning produces 30 kBs of data at 200 ppi (pixels per inch of resolution) and 50 kB of data at 300 ppi; 300 ppi is more common than 200 ppi.

The TIFF format can save multi-page documents to a single TIFF file rather than a series of files for each scanned page. Multi-page support and 2D compression of bitonal images led to the TIFF's becoming the standard storage format for facsimiles, especially on Fax Servers.

[edit] In scientific imaging

The inclusion of the SampleFormat tag in TIFF 6.0 allows TIFF files to handle advanced pixel data types, including integer images with more than 8 bits per channel and floating point images. This tag made TIFF 6.0 a viable format for scientific image processing where extended precision is required. An example is the use of TIFF to store images acquired using scientific CCD cameras that provide up to 16 bits per photosite of intensity resolution.

Storing a sequence of images in a single TIFF file is also possible, and is allowed under TIFF 6.0, provided the rules for multi-page images are followed.

[edit] Private tags

Developers can apply for a block of "private tags" to enable them to include their own proprietary information inside a TIFF file without causing problems for file interchange. TIFF readers are required to ignore tags that they do not recognize, and a developer's private tags are guaranteed not to clash with anyone else's tags or with the standard set of tags defined in the specification.

[edit] Exploits

The TIFF file format is unusual in comparison to other image formats, in that it is composed of small descriptor blocks containing offsets into the file which point to the actual pixel image data (composed of bands of pixel rows). This means that incorrect offset values can cause programs to attempt to read erroneous portions of the file or attempt to read past the physical end of file. Like most other image file formats, improperly encoded packet or line lengths within the file can cause poorly written rendering programs to overflow their internal buffers. Properly-written image rendering programs generally avoid such pitfalls.

Multiple buffer overflows have been found in Libtiff.[4][5][6] Some of these have also been used to execute unsigned code on the PlayStation Portable,[7] as well as run third party applications on the iPhone and iPod Touch.[citation needed]

[edit] See also

[edit] Notes

  1. ^ Versions 4 and 5 of the TIFF specification included the sentence "This memorandum has been prepared jointly by Aldus and Microsoft in conjunction with leading scanner and printer manufacturers"; there was a TIFF co-marketing and developer support effort with Microsoft during this time, though Microsoft was not a technical contributor to the specification. Version 6 (1993) of the TIFF specification dropped the Microsoft reference. TIFF Revision 5.0 TIFF Revision 6.0
  2. ^ TIFF was chosen as the native format for raster graphics in the NeXTstep operating system; this TIFF support carried over into Mac OS X.
  3. ^ Trauth, Martin H. (2006). MATLAB Recipes For Earth Sciences. Springer. p. 198. ISBN 3540279830. 
  4. ^ libTIFF BitsPerSample Tag Buffer Overflow Vulnerability Release Date:2005-05-11 - Secunia Advisories
  5. ^ Stack-based buffer overflow in libTIFF before 3.7.2 allows remote attackers to execute arbitrary code via a TIFF file with a malformed BitsPerSample tag. - CVE - CVE-2005-1544 (under review) Assigned (20050514)
  6. ^ libTIFF Multiple VulnerabilitiesRelease Date: 2006-08-02 - Secunia Advisories
  7. ^ Sony PSP TIFF Image Viewing Code Execution Vulnerability Release Date: 2006-08-31 - Secunia Advisories

[edit] External links

  • Adobe TIFF Resources page: Adobe links to the specification and main TIFF resources
  • LibTIFF Home Page: Widely used library used for reading and writing TIFF files as well as TIFF file processing command line tools
  • TIFF File Format FAQ and TIFF Tag Reference: Everything you always wanted to know about the TIFF File Format but were afraid to ask
  • The BigTIFF File Format Proposal: Breaking the 4 gigabyte boundary
  • TIFF description at Digital Preservation (The Library of Congress)
  • TIFF Revision 4.0: Specification for revision 4.0, in HTML (warning: for historical purposes only, the TIFF 6.0 spec contains the full 4.0 revision)
  • TIFF Revision 5.0: Specification for revision 5.0, in HTML (warning: for historical purposes only, the TIFF 6.0 spec contains the full 5.0 revision)
  • TIFF Revision 6.0: Specification for revision 6.0, in PDF (warning: there is an outdated and flawed section (jpeg compression), corrected in supplements, and there are additions to this PDF too – for the full specification, see link to Adobe TIFF Resources)
Personal tools