TIFF libraries
Open-source libraries that decode and encode TIFF files. TIFF has many optional features, so support varies: check multi-page, tiles, BigTIFF, 16-bit and floating point samples and the compression methods you need. Most full-featured libraries in other languages wrap libtiff; for GeoTIFF use GDAL or a binding to it.
| Language | Library | Read | Write | Notes |
|---|---|---|---|---|
| C/C++ | libtiff | yes | yes | reference library, every feature, BigTIFF |
| C/C++ | GDAL | yes | yes | GeoTIFF and Cloud Optimized GeoTIFF |
| C# | LibTiff.Net | yes | yes | managed port of libtiff, tag-level control |
| C# | ImageSharp | yes | yes | pure managed, multi-frame; Six Labors Split License |
| C# | Magick.NET | yes | yes | ImageMagick for .NET, multi-page |
| Java | ImageIO | yes | yes | built into the JDK since Java 9 |
| Java | TwelveMonkeys | yes | yes | ImageIO plugin, BigTIFF, more compressions |
| Go | x/image/tiff | yes | yes | Go project package, first page only |
| Go | imaging | yes | yes | resize, crop, convert on top of x/image/tiff |
| Python | Pillow | yes | yes | general imaging, multi-frame, tags |
| Python | tifffile | yes | yes | NumPy arrays, BigTIFF, OME-TIFF, scientific |
| Python | rasterio | yes | yes | GeoTIFF on top of GDAL |
| Ruby | ruby-vips | yes | yes | fast, low memory, pyramids |
| Ruby | MiniMagick | yes | yes | wraps ImageMagick command line |
| Rust | tiff | yes | yes | pure Rust, multi-page, BigTIFF |
| Rust | image | yes | yes | high-level, many formats |
| PHP | Imagick | yes | yes | ImageMagick extension; PHP’s GD has no TIFF |
By language#
- TIFF libraries for C/C++ Open-source C/C++ libraries to read and write TIFF, BigTIFF and GeoTIFF: libtiff and GDAL. Comparison and code examples.
- TIFF libraries for C# Open-source .NET libraries to read and write TIFF images in C#: LibTiff.Net, ImageSharp and Magick.NET. Comparison and code examples.
- TIFF libraries for Java Open-source Java libraries to read and write TIFF images: the JDK's built-in ImageIO TIFF plugin and TwelveMonkeys. Comparison and code examples.
- TIFF libraries for Go Open-source Go libraries to read and write TIFF images: golang.org/x/image/tiff and imaging. Comparison and code examples.
- TIFF libraries for Python Open-source Python libraries to read and write TIFF images: Pillow, tifffile and rasterio (GeoTIFF). Comparison and code examples.
- TIFF libraries for Ruby Open-source Ruby libraries to read and write TIFF images: ruby-vips and MiniMagick. Comparison and code examples.
- TIFF libraries for Rust Open-source Rust crates to read and write TIFF images: tiff and image. Comparison and code examples.
- TIFF libraries for PHP Open-source PHP library to read and write TIFF images: the Imagick extension. Code examples for multi-page TIFF, compression and conversion.