TIFF is a tag-based file format designed to promote universal interchanges of digital image data. Because TIFF files do not have a single way to store image data, there are many versions of TIFF. LEADTOOLS supports the most common TIFF formats.
The usual file extension is TIFF or TIF.
TIFF files use 32-bit offsets, so they are limited to 4GB. A newer version of this file format, BigTIFF, uses 64-bit offsets and can create files larger than 4GB. Not all TIFF readers support BigTIFF files. TIFF and BigTIFF pages cannot be mixed within the same file: all the pages in the file must be either TIFF or BigTIFF. However, you can use CompactFile to convert between TIFF and BigTIFF files without recompressing the image data.
You can identify BigTIFF files by examining the Leadtools.Codecs.CodecsTiffImageInfo.IsBigTiff property. If the file is a BigTiff, this value will be true.
Save BigTIFF files by setting Leadtools.Codecs.CodecsTiffSaveOptions.BigTiff to true before saving. Saving a file with Leadtools.Codecs.CodecsTiffSaveOptions.BigTiff set to false results in the file being saved as a TIFF file. The default value is false (TIFF file format).
BigTIFF and TIFF files have the same capabilities. For simplicity, for the rest of this document "TIFF" will refer to both TIFF and BigTIFF files.
TIFF files can contain many comment fields of various types. Use the ReadComment method to read comments in an existing file. Before writing a file, use the Comments property to set an array of comments to be saved in the file.
NOTE: TIFF is one of the very few file formats that can contain regions. The region is saved automatically when an image with a region is saved as TIFF. To do so, you must have an unlocked (Document/Medical license. For more information, refer to Saving a Region.
LEADTOOLS also supports the ability to save a vector image as a DXF within a TIFF.
LEAD supports loading and saving multipage files in this format.
The CompactFile method lets you compact TIFF files. It also lets you copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file.
LEADTOOLS can read and write TIFF files that use RGB, CMYK, YCbCr, or CieLAB color space. LEADTOOLS can also read and write files with many compression types. See the table below to see which compressions, color spaces and bits/pixel can be saved with LEADTOOLS. Note that not all combinations of compressions and color spaces are possible.
For files with CieLAB color space, CodecsImageInfo.Format is set to RasterImageFormat.Tif and CodecsImageInfo.CodecsColorSpace is set to CodecsColorSpaceType.CieLab.
NOTE: LEADTOOLS can read TIFF files with CieLAB color space but does not support saving such files.
LEADTOOLS can also read and write files with Lossless JPEG compression for 8-, 12-, and 16-bit grayscale and 24-bit color space.
LEADTOOLS can read and write 12-, 16-, and 32-bit grayscale. (Document and Medical Imaging toolkits)
Only TIFF and DICOM file formats are capable of saving images that have been window-leveled. Images can be window-leveled by using WindowLevel and specifying RasterWindowLevelMode.PaintAndProcessing for the flags parameter, or by loading an image from a file format that supports window-leveling. If a window-leveled image is saved as any other file format, the image data will be converted before being saved. For more information, refer to Saving Window-Leveled Images.
The file constants associated with this file format are:
Constant | Read Support | Write Support | Description |
Tif | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | Tagged Image File Format, with no compression and with RGB color space. |
TifCmyk | 24, 32 BPP | 24, 32 BPP | Tagged Image File Format, with no compression and with CMYK color space. |
TifYcc | 24 BPP | 24 BPP | Tagged Image File Format, with no compression and with YCbCr color space. |
TifPackbits | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32 BPP | Tagged Image File Format with PackBits Compression and RGB color space. |
TifPackbitsCmyk | 24, 32 BPP | 24, 32 BPP | Tagged Image File Format with PackBits Compression and CMYK color space. |
TifPackbitsYcc | 24 BPP | 24 BPP | Tagged Image File Format with PackBits Compression and YCbCr color space. |
TifLzw | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | Tagged Image File Format with LZW Compression and RGB color space. |
TifLzwCmyk | 24, 32 BPP | 24, 32 BPP | Tagged Image File Format with LZW Compression and CMYK color space |
TifLzwYcc | 24 BPP | 24 BPP | Tagged Image File Format with LZW Compression and YCbCr color space. |
TifJpeg | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | Tagged Image File Format with JPEG compression and YUV 4:4:4 color space Lossless. |
TifJpeg422 | 24 BPP | 24 BPP | Tagged Image File Format with JPEG compression and YUV 4:2:2 color space. |
TifJpeg411 | 24 BPP | 24 BPP | Tagged Image File Format with JPEG compression and YUV 4:1:1 color space. |
TifJpegCmyk | 24 BPP | 24 BPP | Tagged Image File Format with JPEG compression and CMYK 4:4:4 color space. |
TifJpegCmyk422 | 24 BPP | 24 BPP | Tagged Image File Format with JPEG compression and CMYK 4:4:4 color space. |
TifJpegCmyk411 | 24 BPP | 24 BPP | Tagged Image File Format with JPEG compression and CMYK 4:1:1 color space. |
TifCmp | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | Tagged Image File Format with CMP Compression |
TifJbig | 1, 2, 3, 4, 5, 6, 7, 8, 12 (Grayscale), 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 12 (Grayscale), 16, 24, 32 BPP | Tagged Image File Format with JBIG Compression. |
TifJbig2 | 1 BPP | 1 BPP | Tagged Image File Format with JBIG2 Compression. |
TifJ2k | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | Tagged Image File Format with JPEG 2000 Compression. This file format contains only a stream of image data. |
TifCmw | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | 8, 12 (Grayscale), 16 BPP (Grayscale) 24 BPP | Tagged Image File Format with Wavelet CMP Compression. |
GeoTiff | 16 BPP (Grayscale) | 16 BPP (Grayscale) | GeoTIFF file format. |
Exif | 24 BPP | 24 BPP | Exif file containing a TIFF image with no compression and with RGB color space. |
ExifYcc | 24 BPP | 24 BPP | Exif file containing a TIFF image with no compression and with YCbCr color space. |
ExifJpeg422 | 24 BPP | 24 BPP | Exif file containing a JPEG compressed image. |
ExifJpeg411 | 24 BPP | 24 BPP | Exif 2.0 file containing a JPEG compressed image. |
Ccitt | 1 BPP | 1 BPP | Tagged Image File Format compressed using CCITT. |
CcittGroup31Dim | 1 BPP | 1 BPP | Tagged Image File Format compressed using CCITT, group 3, 1 dimension. |
CcittGroup32Dim | 1 BPP | 1 BPP | Tagged Image File Format compressed using CCITT, group 3, 2 dimensions. |
CcittGroup4 | 1 BPP | 1 BPP | Tagged Image File Format compressed using CCITT, group 4. |
TifUnknown | NA | NA | Tagged Image File Format with unknown compression. |
TifMrc | 24 BPP | 24 BPP | Tagged Image File Format with MRC compression. |
TifLeadMrc | 24 BPP | 24 BPP | Tagged Image File Format with LEAD MRC compression. |
TifZip | 1, 2, 3, 4, 5, 6, 7, 8, 12 (Grayscale), 16, 24, 32 BPP | None | Tagged Image File Format with ZIP compression. |
The LEADTOOLS Android SDK supports the TIFF format.
Required DLL: Leadtools.Codecs.Tif.dll. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.
For loading or saving CMYK files or LAB color space files, you will also need Leadtools.ColorConversion.dll.
Related Formats: CMP - LEAD Compressed, CMP - LEAD 1-Bit Format, EXIF - Exif Formats, JPG - JPEG Compressed, JP2 - JPEG 2000 Compressed, TIFX - Xerox Internet Fax File Format.
Extension | Module | Value | Win32 | Win64 | Net32 | Net64 | Linux | Android | Apple | UWP | MimeType | Friendly Name |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Ccitt | TIF | 25 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CCITT |
CcittGroup31Dim | TIF | 27 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CCITT Group 3 1-Dimensional |
CcittGroup32Dim | TIF | 28 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CCITT Group 3 2-Dimensional |
CcittGroup4 | TIF | 29 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CCITT Group 4 |
Exif | TIF | 96 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | Exif RGB colorspace with no compression |
ExifJpeg411 | JPG | 101 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | Exif with JPEG 4-1-1 Compression |
ExifJpeg422 | JPG | 98 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | Exif with JPEG 4-2-2 Compression |
ExifYcc | TIF | 97 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | Exif YCbCr colorspace with no compression |
GeoTiff | TIF | 174 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | GeoTIFF - TIFF format |
TifCmp | JPG | 138 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | TIFF - LEAD CMP Compression |
TifCmyk | TIF | 85 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CMYK colorspace with no compression |
TifCmw | TIF | 167 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with LEAD Wavelet CMP Compression |
TifYcc | TIF | 93 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF YCbCr colorspace with no compression |
TifLzw | TIF | 17 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with LZW Compression |
TifLzwCmyk | TIF | 86 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CMYK colorspace with LZW Compression |
TifLzwYcc | TIF | 94 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF YCbCr colorspace with LZW Compression |
TifJ2k | TIF | 166 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with JPEG2000 Compression |
TifJbig | TIF | 139 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF - JBIG Compression |
TifLeadMrc | TIF | 315 | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with LEAD MRC Compression | ||||
TifJbig2 | TIF | 187 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with JBIG2 Compression |
TifJpeg411 | TIF | 22 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with JPEG Compression 4-1-1 |
TifJpeg422 | TIF | 24 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with JPEG Compression 4-2-2 |
TifJpegCmyk | JPG | 394 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | TIFF with JPEG Compression CMYK 4-4-4 |
TifJpegCmyk411 | JPG | 395 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | TIFF with JPEG Compression CMYK 4-1-1 |
TifJpegCmyk422 | JPG | 396 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/jpeg | TIFF with JPEG Compression CMYK 4-2-2 |
TifMrc | TIF | 177 | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with standard MRC Compression | ||||
TifPackBits | TIF | 87 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF RGB colorspace with PackBits Compression |
TifPackBitsCmyk | TIF | 88 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF CMYK colorspace with PackBits Compression |
TifPackbitsYcc | TIF | 95 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF YCbCr colorspace with PackBits Compression |
TifUnknown | TIF | 141 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF - Unknown image data |
TifZip | TIF | 189 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | image/tiff | TIFF with ZIP Compression |
For a complete list for supported file formats, see Summary of All Supported File Formats.
For details of the file formats supported across products and platforms, refer to File Format Comparison Chart.