TIFF (.tif, .tiff)
0
Upvotes
3
Views
0
Downloads
1,251
Words
Description
Explain TIFF file structure, compression options, and metadata for archival, professional imaging, and large-scanned documents.
When to Use
Explain TIFF file format and its uses | What is TIFF and when should I use it | Describe TIFF compression options | Explain TIFF metadata (EXIF/IPTC/XMP) | Discuss BigTIFF limits and multi-page TIFF
Use Cases
Explain TIFF structure and tag usage for archival workflows | Compare TIFF compression options for professional imaging | Assess BigTIFF limits for very large datasets | Guide multi-page TIFF usage for scanned documents
SKILL.md Content
---
name: tiff
description: "Explain TIFF file structure, compression options, and metadata for archival, professional imaging, and large-scanned documents."
metadata:
tags: "image-format, tiff, raster-image, compression, metadata, archival, professional-imaging"
source: "https://skilldb.dev/skills/file-formats-skills/tiff"
pack: "file-formats-skills"
category: "Technology & Engineering"
---
# TIFF (.tif, .tiff)
## When to use this skill
Use when the user says things like:
- "Explain TIFF file format and its uses"
- "What is TIFF and when should I use it"
- "Describe TIFF compression options"
- "Explain TIFF metadata (EXIF/IPTC/XMP)"
- "Discuss BigTIFF limits and multi-page TIFF"
You are a file format specialist with deep knowledge of the TIFF image format, its tag-based structure, compression options, and professional imaging workflows.
## Overview
TIFF (Tagged Image File Format) was originally developed by Aldus Corporation (later acquired by Adobe) in 1986 for desktop publishing and scanning workflows. The current specification is TIFF 6.0 (1992), maintained by Adobe. TIFF was designed as a universal container for raster images, using a flexible tag-based architecture that can accommodate virtually any type of image data. Its ability to store uncompressed or losslessly compressed data at high bit depths with full color management makes it the preferred format for professional photography, prepress, and archival imaging. BigTIFF (2007) extended the format beyond the original 4 GB file size limit.
## Technical Specifications
- **File extension(s):** `.tif`, `.tiff`
- **MIME type:** `image/tiff`
- **Compression type:** None (uncompressed), LZW (lossless), ZIP/Deflate (lossless), JPEG (lossy, within TIFF container), CCITT Group 3/4 (fax compression for 1-bit images), PackBits (simple RLE)
- **Color depth:** 1-bit to 64-bit per channel. Common: 8-bit, 16-bit, 32-bit floating point. Supports 1-bit bilevel, grayscale, palette, RGB, CMYK, CIE L*a*b*, and YCbCr.
- **Max dimensions:** TIFF 6.0: limited by 4 GB file size (32-bit offsets). BigTIFF: effectively unlimited (64-bit offsets, files up to 18 exabytes).
- **Transparency:** Alpha channels supported (pre-multiplied or unassociated). Multiple extra channels for spot colors.
- **Multi-page:** Supports multiple images (pages) in a single file (used for multi-page faxes, document scanning)
- **Metadata support:** EXIF, IPTC, XMP, ICC color profiles, custom private tags. The tag-based architecture allows arbitrary metadata.
- **Tiling:** Images can be stored as strips or tiles (tiles enable random access to rectangular regions)
- **Byte order:** Both big-endian (Motorola, "MM") and little-endian (Intel, "II")
## How to Work With It
### Opening & Viewing
- **Professional tools:** Photoshop, Lightroom, Capture One, Affinity Photo (full support)
- **Free tools:** GIMP, IrfanView, XnView, ImageMagick
- **OS support:** Windows (basic support via Photos app), macOS (Preview handles most TIFF variants)
- **Web browsers:** Not supported natively (TIFF must be converted for web use)
### Creating & Editing
- **Photoshop:** Save As > TIFF with LZW or ZIP compression, 16-bit, with ICC profile embedded
- **From camera:** Some high-end cameras output TIFF; more commonly, RAW files are processed and saved as TIFF for archival
- **Compression choice:** LZW for general use, ZIP for slightly better compression, none for maximum compatibility, JPEG-in-TIFF for smaller files with lossy trade-off
- **Command line:** `magick input.jpg -compress LZW -depth 16 output.tiff`
- **Layers:** Photoshop can save layered TIFFs, but layers are stored as Photoshop-specific data; other readers see the flattened composite
### Converting To/From
- **To JPEG (web):** `magick input.tiff -quality 90 output.jpg`
- **To PNG:** `magick input.tiff output.png`
- **To PDF:** `magick input.tiff output.pdf` or `tiff2pdf input.tiff -o output.pdf` (libtiff)
- **Multi-page:** `magick *.tiff -compress LZW multipage.tiff` (combine) or `magick multipage.tiff page_%03d.tiff` (split)
- **Python:** `from PIL import Image; Image.open("in.tiff").save("out.png")`
- **libtiff tools:** `tiffinfo` (inspect), `tiffcp` (copy/merge), `tiffsplit` (split pages)
## Common Use Cases
- Professional photography archival (lossless, high bit depth)
- Print production and prepress (CMYK support, color management)
- Document scanning and OCR workflows (multi-page TIFF)
- Medical imaging (DICOM sometimes wraps TIFF data)
- Satellite imagery and GIS (GeoTIFF extension stores geographic coordinates)
- Scientific imaging (32-bit floating point for precise measurements)
- Museum and library digitization (archival standard)
## Pros & Cons
**Pros:**
- Highest quality raster format for professional workflows
- Supports every color space (RGB, CMYK, Lab, grayscale, spot colors)
- 16-bit and 32-bit float for HDR and wide-gamut content
- Lossless compression options (LZW, ZIP)
- Multi-page support
- Rich metadata (EXIF, IPTC, XMP, ICC)
- Industry standard for print, publishing, and archival
- BigTIFF removes file size limitations
**Cons:**
- Large file sizes even with compression
- Not supported in web browsers
- Complex specification leads to compatibility issues between implementations
- Some TIFF variants may not open in all readers
- Slow to read/write compared to simpler formats
- Overkill for web or casual use
- Layered TIFFs are Photoshop-specific
## Compatibility
| Platform | Support |
|----------|---------|
| Photoshop | Full (including layers, CMYK, 32-bit) |
| Lightroom | Full |
| GIMP | Good (8/16-bit, most compression types) |
| macOS Preview | Good (common variants) |
| Windows Photos | Basic |
| Web browsers | Not supported |
| LibreOffice | Import only |
| GIS tools | GeoTIFF is the standard raster format |
## Practical Usage
### Print Production Workflow
TIFF is the standard delivery format for print-ready images:
1. **Edit** in Photoshop at 16-bit, working in Adobe RGB or ProPhoto RGB
2. **Convert** to CMYK with the appropriate ICC profile for the target press
3. **Save** as TIFF with LZW compression, embedded ICC profile, and no layers
4. **Deliver** to the printer or place into InDesign/QuarkXPress layout
```bash
# ImageMagick: convert RGB TIFF to CMYK with ICC profile
magick input.tiff -profile sRGB.icc -profile USWebCoatedSWOP.icc -compress LZW output-cmyk.tiff
```
### Document Scanning and OCR
Multi-page TIFF is the standard format for scanned document archives. Pair with OCR for searchable archives:
```bash
# Scan to multi-page TIFF (using scanimage on Linux)
scanimage --batch --format=tiff --resolution 300 --mode Gray
# Combine individual TIFFs into multi-page
magick page_*.tiff -compress LZW combined.tiff
# OCR a multi-page TIFF
tesseract combined.tiff output -l eng pdf # produces searchable PDF
```
### GeoTIFF for GIS Workflows
GeoTIFF embeds geographic coordinates and projection information directly in the TIFF file, making it the standard raster format for satellite imagery, elevation models, and map data:
```bash
# Inspect GeoTIFF metadata
gdalinfo satellite.tiff
# Reproject GeoTIFF to a different coordinate system
gdalwarp -t_srs EPSG:4326 input.tiff reprojected.tiff
```
### Scientific and Medical Imaging
TIFF's support for 32-bit floating-point data makes it suitable for scientific measurements where pixel values represent physical quantities (temperature, intensity, elevation) rather than colors.
## Anti-Patterns
**Using TIFF for web delivery.** No web browser supports TIFF. Always convert to JPEG, PNG, or WebP before serving to browsers.
**Choosing uncompressed TIFF "for quality."** LZW and ZIP compression in TIFF are both lossless — they produce byte-identical pixel data after decompression. There is no quality benefit to uncompressed TIFF; you just get larger files. Always use LZW or ZIP.
**Saving layered Photoshop files as TIFF.** While Photoshop can save layers in TIFF, this data is Photoshop-proprietary. Other applications see only the flattened composite. If you need layers, save as PSD. Use TIFF for flat, deliverable images.
**Ignoring byte order compatibility.** TIFF files can be big-endian or little-endian. Most modern systems handle both, but some legacy tools or embedded systems may only support one byte order. Use little-endian ("Intel") for maximum compatibility on modern systems.
**Assuming all TIFF readers handle all TIFF variants.** The TIFF specification is extremely flexible, and no reader supports every combination of compression, color space, and bit depth. Test your specific TIFF configuration against the target readers. A CMYK 32-bit float TIFF with JPEG compression will not open in many viewers.
## Related Formats
- **PSD:** Adobe Photoshop native format; better for layered editing workflows
- **DNG:** Adobe's open RAW format, based on TIFF structure
- **GeoTIFF:** TIFF extension embedding geographic metadata for mapping
- **PNG:** Lossless web-compatible alternative (but limited to RGB, 16-bit max)
- **EXR:** HDR format preferred in VFX (32-bit float, more efficient for HDR than TIFF)
- **JPEG 2000:** Wavelet compression with lossless mode; used in digital cinema and medical imaging
- **PDF:** Often the preferred delivery format for print-ready files