Java TIFF Library — Read, Write & Convert TIFF Files
Read, write, convert, and process single and multi-page TIFF in pure Java. Faster than ImageIO, no native code, with dedicated commercial support.
JDeli is a commercial, pure-Java image library that reads, writes, and converts TIFF files with no native code or third-party dependencies. It handles single and multi-page TIFF, every common compression, and works as a drop-in ImageIO replacement. Java's built-in TIFF plugin exists, but JDeli decodes and encodes it several times faster and gives you dedicated support when a file will not open.
Read, Write and Convert TIFF files in pure Java with JDeli
Copy-paste solutions to the tasks Java developers search for: read a TIFF to a BufferedImage, convert TIFF to JPG or PDF,
read every page of a multi-page TIFF, merge images into one multi-page file, set the compression, and batch convert from the command line.
// Read TIFF files
JDeli.read(File tiffFile);
JDeli.read(byte[] tiffData);
JDeli.read(InputStream tiffStream);// Write TIFF files
// To a File
JDeli.write(myBufferedImage, "tiff", new File("output.tiff"));
// To an OutputStream
JDeli.write(myBufferedImage, "tiff", outputStream);
// To a byte array (returns the encoded bytes)
byte[] tiffData = JDeli.write(myBufferedImage, "tiff");// Convert to and from TIFF files
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inStream, OutputStream outStream, String format);
byte[] outputData=JDeli.convert(byte[] inputData, String format);// Convert TIFF to JPG (swap "jpg" for "png" to get PNG)
JDeli.convert(new File("input.tiff"), new File("output.jpg"));
JDeli.convert(tiffStream, jpgStream, "jpg");
byte[] jpgData = JDeli.convert(tiffData, "jpg");// Convert TIFF to PDF. A multi-page TIFF becomes a multi-page PDF automatically.
JDeli.convert(new File("input.tiff"), new File("output.pdf"));// Read every page of a multi-page TIFF
File tiff = new File("multipage.tiff");
TiffDecoder decoder = new TiffDecoder();
int pageCount = decoder.getImageCount(tiff);
for (int page = 0; page < pageCount; page++) {
BufferedImage image = decoder.readImageAt(page, tiff);
// process each page (index is zero-based)
}// Merge multiple images into one multi-page TIFF
TiffEncoderOptions options = new TiffEncoderOptions();
options.setCompressionFormat(TiffCompressionFormat.LZW);
TiffEncoder encoder = new TiffEncoder(options);
for (BufferedImage image : pages) {
encoder.append(image, "multipage.tiff");
}// Choose the TIFF compression: LZW, JPEG, DEFLATE or UNCOMPRESSED
TiffEncoderOptions options = new TiffEncoderOptions();
options.setCompressionFormat(TiffCompressionFormat.LZW);
JDeli.write(myBufferedImage, options, new File("output.tiff"));// Batch convert a directory of images to TIFF from the command line.
// Also how you call JDeli from any language that can spawn a process.
java -jar jdeli.jar --convert tiff "inputFileOrDir" "outputDir"TIFF Benchmarks
Measured with JMH on GitHub. Run them yourself — the code is public and the tests work on the trial version.
Throughput mode, 25 measurement iterations, units in operations per second — higher is better. JDeli, ImageIO, and Apache Commons Imaging compared at equivalent settings.
TIFF Reading (ops/s)
| Library | Throughput (ops/s) | Error |
|---|---|---|
| JDeli | 11.298 | ± 0.363 |
| Java ImageIO | 7.976 | ± 0.140 |
| Apache Commons Imaging | 6.601 | ± 0.119 |
JDeli decodes TIFF roughly 42% faster than ImageIO and 71% faster than Apache Commons Imaging.
TIFF Writing (ops/s)
| Library / Mode | Throughput (ops/s) | Error |
|---|---|---|
| JDeli — uncompressed | 99.850 | ± 3.051 |
| JDeli — JPEG | 25.160 | ± 1.732 |
| JDeli — better speed | 13.116 | ± 0.026 |
| JDeli — LZW | 9.473 | ± 0.027 |
| JDeli — deflate | 6.361 | ± 0.017 |
| JDeli — better compression | 5.484 | ± 0.007 |
| ImageIO — uncompressed | 9.213 | ± 0.029 |
| ImageIO — JPEG | 7.788 | ± 0.084 |
| ImageIO — Deflate | 4.533 | ± 0.054 |
| ImageIO — LZW | 4.265 | ± 0.043 |
| Apache Commons Imaging | 4.140 | ± 0.070 |
JDeli is faster than ImageIO at every matched compression: roughly 3x on JPEG, 2x on LZW and Deflate, and about 10x uncompressed. The trade-off is the usual one — the faster, lighter compression modes produce larger files, so pick the mode that fits your storage and throughput budget.
Problems with TIFF files in Java
Java developers commonly run into several frustrating and time-consuming problems:
Complex Compression Options
TIFF supports multiple compression types (LZW, PackBits, JPEG), and handling them correctly can be error-prone and inconsistent.
Multi-Page Management
Processing multi-page TIFFs often requires additional logic to navigate or convert pages, adding complexity for developers.
Large File Sizes
TIFF files, especially multi-page or high-resolution images, can be extremely large, creating storage and performance issues.
Metadata Handling
TIFF metadata can vary widely and is not always standardized, making extraction or modification challenging.
TIFF Format Support in Depth
What is the TIFF format?
TIFF (Tagged Image File Format) is a flexible container designed for professional imaging, publishing, and archiving. It supports lossless and lossy compression, high bit depths, and multiple images in one file, which is why it stays common in medical imaging, scanning, and print. That flexibility is also what makes it awkward to handle correctly in Java.
Multi-page TIFF
A single TIFF can hold many images, which is how scanners and fax systems store multi-page documents.
JDeli reads any page with TiffDecoder.getImageCount() and readImageAt(pageIndex, file), and builds multi-page files by appending each BufferedImage with TiffEncoder.
Splitting a multi-page TIFF into single files and merging single files into one are both a short loop.
Compression control
TiffEncoderOptions lets you pick the compression: LZW, JPEG, Deflate, or uncompressed.
You choose the trade-off between file size and speed explicitly instead of accepting whatever a library defaults to, which matters when TIFFs are large and stored in volume.
Reading TIFF
JDeli decodes TIFF to a standard BufferedImage with a single call, reading from a byte[], File, or InputStream.
Once decoded, the image is an ordinary Java object you can process, display, or write out as any other supported format.
Writing and converting
JDeli.write() encodes a BufferedImage to TIFF, and JDeli.convert() turns a TIFF into JPG, PNG, or any other supported output in one call.
A command-line mode batch converts a whole directory, which is also how you drive JDeli from a non-Java process.
Metadata
JDeli reads and writes EXIF and XMP metadata in TIFF files, and copies metadata across automatically when it converts a TIFF to another format. Capture details and orientation survive the round trip instead of being silently dropped.
Java TIFF Library Comparison
An honest comparison of the realistic ways to handle TIFF in a Java application.
| Feature | JDeli | ImageIO (built-in TIFF) | Apache Commons Imaging |
|---|---|---|---|
| TIFF read | ✅ Yes | ✅ Yes (Java 9+) | ✅ Yes |
| TIFF write | ✅ Yes | ✅ Yes | ⚠️ Limited |
| Multi-page TIFF | ✅ Read and write | ⚠️ Verbose ImageReader/ImageWriter API | ⚠️ Read only |
| Read speed (ops/sec) | ✅ 11.30 | 7.98 | 6.60 |
| Write speed, JPEG (ops/sec) | ✅ 25.16 | 7.79 | 4.14 (default) |
| Cross-format convert | ✅ One-line API | ⚠️ Manual read then write | ⚠️ Manual read then write |
| ImageIO compatible | ✅ Drop-in plugin | ✅ Is ImageIO | ❌ Own API |
| Image processing | ✅ Resize, crop, rotate, etc. | ❌ Decode/encode only | ❌ Decode/encode only |
| License | Commercial (paid) | Bundled with the JDK (free) | Apache 2.0 (free) |
| Commercial support | ✅ Dedicated team, bug fixes in days | ❌ JDK release cycle | ❌ Community only |
Key takeaway: unlike AVIF or HEIC, TIFF does work in stock Java, so the honest question is not whether ImageIO can read TIFF but how well. ImageIO and Apache Commons Imaging are free and fine for simple cases. JDeli is worth paying for when TIFF is central to your product: it is several times faster, has a cleaner multi-page and conversion API, and comes with a support team that fixes format bugs in days.
Why Use JDeli for TIFF?
ImageIO can read and write TIFF, so this is not about filling a gap. It is about speed, a simpler API for the hard parts, and support.
Faster read and write
JDeli's pure-Java TIFF codec beats ImageIO on every configuration we benchmark, from around 42% faster reads to roughly 10x faster uncompressed writes. When TIFF throughput is on your critical path, that is the difference JDeli buys you.
Multi-page without the boilerplate
ImageIO's multi-page TIFF support means dropping down to ImageReader, ImageWriter, and IIOImage by hand. JDeli reads a page with an index and builds a multi-page file by appending images, so the common document workflows are a few lines.
One API for every format
The same read, write, and convert calls handle TIFF, JPEG, PNG, HEIC, AVIF, and more. Converting a scanned TIFF to JPG or PNG is one call, with metadata carried across automatically.
No code rewrite
JDeli ships as an ImageIO plugin, so existing ImageIO.read() and ImageIO.write() code picks up JDeli's faster TIFF codec without changing the calls. Add the plugin JAR and your TIFF handling speeds up in place.
Pure Java, no native code
JDeli is one JAR that runs anywhere the JVM runs, with no native binaries to install per platform and no JNI layer that can fault outside the JVM. A malformed TIFF gives you an exception you can catch, not a dead process.
Maintained on a schedule
JDeli ships a release every 6 weeks with a daily pre-release JAR for customers, and format bugs are typically fixed within days of a reproducible report. That is a different level of responsiveness than a JDK cycle or a community project.
Already using ImageIO for TIFF?
ImageIO's built-in TIFF support works, but it is slower and its multi-page API is painful.
JDeli's ImageIO plugin
drops in a faster, more robust TIFF codec and your existing image-handling code stays exactly the same.
Trusted by Companies around the World
JDeli handles not only HEIC but other types of file formats as well.
- Joselito M. (Senior Applications Developer at Omaha National)
Frequently asked questions
Does Java ImageIO support TIFF?
Partially. Java’s ImageIO has basic TIFF read support but no multi-page handling and inconsistent compression coverage. LZW, PackBits, and JPEG compression can behave differently across JDK versions. JDeli adds full multi-page support and consistent handling of all standard TIFF compression types.
How do I read a multi-page TIFF in Java?
Call JDeli.getPageCount(file) to get the page count, then JDeli.read(file, pageIndex) to read each page as a BufferedImage. Page indexes are zero-based. See Read multi-page TIFF in Java for a full example.
Can I convert a PDF to TIFF in Java?
JDeli does not read PDF files. To convert PDF pages to TIFF in Java, use JPedal. See Convert PDF to TIFF in Java.
How do I convert TIFF to JPG in Java?
Call JDeli.convert(new File("input.tiff"), new File("output.jpg")). JDeli infers the output format from the file extension and handles multi-page TIFFs by converting the first page. See Convert TIFF to JPG in Java for a full example.
How do I convert TIFF to PDF in Java?
Call JDeli.convert(new File("input.tiff"), new File("output.pdf")). JDeli infers the output format from the file extension. See Convert TIFF to PDF in Java for a full example.
Why use JDeli for TIFF image support?
1.
2.
3.