This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Mathematica Import/Export Format

TIFF (.tiff, .tif)

Registered MIME type: image/tiff
TIFF raster image format.
Commonly used in image manipulation applications, page layout applications, scanners and other imaging devices, and for the archiving of images.
Suitable for high-color-depth images.
TIFF is an acronym for Tagged Image File Format.
Binary format.
Supports multiple color resolutions, color encodings, and compression methods.
Supports arbitrary bit depths of up to 16 bits per channel, and also 32 bits per channel.
Can store multiple images.
Supports alpha channels.
Introduced in the 1980s by Aldus as a standard format for desktop scanners.
  • Import["file.tiff"] imports a TIFF file, returning a single image or a list of images.
  • Export["file.tiff", expr] exports graphics or any other expression as an image to a TIFF file.
  • Export["file.tiff", {g1, g2, ...}] exports a list of graphics as a multi-image TIFF file.
  • Import["file.tiff"] returns an expression of the form Graphics[Raster[data], opts], where data is an array of color indices.
  • Export["file.tiff", expr] creates a TIFF image with the same image size as the displayed form of expr.
  • Because TIFF is a raster image format, all fonts are rasterized on export.
  • Import reduces 32-bit images to a 16-bit representation.
  • Import["file.tiff", elem] imports the specified element from a TIFF file.
  • Import["file.tiff", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.tiff", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file", "TIFF"] or Import["file", {"TIFF", elem, ...}].
  • Export["file.tiff", expr, elem] creates a TIFF file by treating expr as specifying element elem.
  • Export["file.tiff", {expr1, expr2, ...}, {{elem1, elem2, ...}}] treats each expri as specifying the corresponding elemi.
  • Export["file.tiff", expr, opt1->val1, ...] exports expr with the specified option elements taken to have the specified values.
  • Export["file.tiff", {elem1->expr1, elem2->expr2, ...}, "Rules"] uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
  • In the notebook front end, Insert ► Picture and the Open menu allow import of a TIFF file into a cell.
  • Save Selection As exports the selected part of a notebook as a TIFF file.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation elements:
"Animation"multi-image TIFF represented as an animation object
"Graphics"the first image in the file, given as graphics
"GrayLevels"array of normalized gray-level values
"GraphicsList"all images as a list of graphics
  • Import by default uses "Graphics" for simple TIFF files and "GraphicsList" for multi-image TIFF files.
  • Import of a multi-image TIFF with element "Graphics" gives the first image.
  • Export by default generates a multi-image TIFF if the expression supplied is a list of Graphics objects.
  • Export with element "Graphics" always generates a single-image TIFF.
"Background"background color shown in transparent image regions
"BitDepth"bits used to represent each color channel in the file
"ImageCount"number of images in the file
"ImageEncoding"how images are compressed in the file
"ImageSize"raster dimensions
  • Data representation elements:
"ColorMap"color-reduction palette
"Data"array of color values, represented as integers
"ImageSize"overall image size
"RawData"array of color map indices
"RGBColorArray"array of RGBColor objects
  • For multi-image TIFFs, the above data representation elements are taken to be lists of the respective expressions.
  • Metadata elements:
"Author"person who created the file
"CameraTopOrientation"orientation of the camera when the picture was taken
"Comments"user comments
"CopyrightNotice"copyright information as a string
"Device"model specification of the camera or input device
"DeviceManufacturer"maker of the camera or input device
"ImageCreationDate"date and time the original picture was taken, given as a DateList specification
  • General options:
BackgroundAutomaticbackground color shown in transparent image regions
ByteOrdering-1ordering of bytes in the file
ImageResolutionAutomaticresolution used for rendering the graphics
ImageSizeAutomaticoverall image size
"ImageTopOrientation"Toporientation of the image as stored in the file
"ColorSpace"Automaticcolor encoding to be used in the file
"CompressionLevel"Automaticcompression level, given as a number between 0 and 1
"ImageEncoding"Nonehow images are compressed in the file
"DifferencingPredictor"Falsewhether to use horizontal differencing when using LZW or ZIP compression
"ColorSeparation"Falsewhether to store color channels in separate planes
  • The following settings for "ImageEncoding" are supported:
Noneno compression
"JPEG"lossy JPEG compression
"LZW"lossless LZW compression
"PackBits"PackBits run-length encoding method
"ZIP"lossless ZIP image data compression