Deprecated: Read and write image data from and to TIFF files.
Clone or download
Latest commit af9d700 Nov 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
tifffile Release 0.15.1 Jul 23, 2018
.gitignore Release 0.13.2 Jan 17, 2018
.travis.yml Add futures dep Jan 10, 2018
HISTORY.rst Bump version, check for replaced functions Jun 15, 2015
LICENSE Initial Commit Oct 11, 2014 update to 0.13.4 Jan 17, 2018
Makefile Release 0.14.0 Feb 20, 2018
README.rst Update README.rst Nov 30, 2018 Postpone numpy import to build stage Jul 19, 2018 Do not test extension module on 2.6 or 3.2 Aug 24, 2015


This repository is deprecated and not directly tied to the released package on PyPI.


Read and write image data from and to TIFF files.

Image and metadata can be read from TIFF, BigTIFF, OME-TIFF, STK, LSM, NIH, SGI, ImageJ, MicroManager, FluoView, SEQ and GEL files. Only a subset of the TIFF specification is supported, mainly uncompressed and losslessly compressed 2**(0 to 6) bit integer, 16, 32 and 64-bit float, grayscale and RGB(A) images, which are commonly used in bio-scientific imaging. Specifically, reading JPEG and CCITT compressed image data or EXIF, IPTC, GPS, and XMP metadata is not implemented. Only primary info records are read for STK, FluoView, MicroManager, and NIH image formats.

TIFF, the Tagged Image File Format, is under the control of Adobe Systems. BigTIFF allows for files greater than 4 GB. STK, LSM, FluoView, SGI, SEQ, GEL, and OME-TIFF, are custom extensions defined by Molecular Devices (Universal Imaging Corporation), Carl Zeiss MicroImaging, Olympus, Silicon Graphics International, Media Cybernetics, Molecular Dynamics, and the Open Microscopy Environment consortium respectively.

For command line usage run python --help

Author:Christoph Gohlke
Organization:Laboratory for Fluorescence Dynamics, University of California, Irvine



  • If using conda, conda install tifffile -c conda-forge.
  • Otherwise, pip install tifffile.


This is a mirror of the code at For any development concerns, please email Christoph Gohlke at cgohlke at

The API is not stable yet and might change between revisions.

Tested on little-endian platforms only.

Other Python packages and modules for reading bio-scientific TIFF files:


  • Egor Zindy, University of Manchester, for cz_lsm_scan_info specifics.
  • Wim Lewis for a bug fix and some read_cz_lsm functions.
  • Hadrien Mary for help on reading MicroManager files.


  1. TIFF 6.0 Specification and Supplements. Adobe Systems Incorporated.
  2. TIFF File Format FAQ.
  3. MetaMorph Stack (STK) Image File Format.
  4. Image File Format Description LSM 5/7 Release 6.0 (ZEN 2010). Carl Zeiss MicroImaging GmbH. BioSciences. May 10, 2011
  5. File Format Description - LSM 5xx Release 2.0.
  6. The OME-TIFF format.
  7. UltraQuant(r) Version 6.0 for Windows Start-Up Guide.
  8. Micro-Manager File Formats.
  9. Tags for TIFF and Related Specifications. Digital Preservation.


>>> data = numpy.random.rand(5, 301, 219)
>>> imsave('temp.tif', data)
>>> image = imread('temp.tif')
>>> numpy.testing.assert_array_equal(image, data)
>>> with TiffFile('temp.tif') as tif:
...     images = tif.asarray()
...     for page in tif:
...         for tag in page.tags.values():
...             t =, tag.value
...         image = page.asarray()

Known build errors

On Windows, the error Error:unable to find vcvarsall.bat means that distutils is not correctly configured to use the C compiler. Modify (or create, if not existing) the configuration file distutils.cfg (located for example at C:\Python27\Lib\distutils\distutils.cfg) to contain: