TL;DR:
Java’s ImageIO has partial TIFF support, but it regressed between Java 8 and Java 11 and images that wrote correctly in Java 8 may fail in later versions. For reliable TIFF output, you need an external library. The two main options are Apache Imaging (free, open source) and JDeli (pure Java, commercial).
Does Java support TIFF natively?
Partially. ImageIO can write basic TIFF files, but support is incomplete and has known gaps. Java 11 removed TIFF functionality that existed in Java 8, so code that worked before may silently produce incorrect output or throw an exception on newer runtimes:
// This may return false or produce a broken file depending on
// your Java version and the image type
File file = new File("/path/to/output.tif");
boolean result = ImageIO.write(bufferedImage, "TIFF", file);
// result = false on some Java 11+ configurations
If you need reliable, version-independent TIFF output, use an external library.
Which Java TIFF library should you use?
| ImageIO (native) | Apache Imaging | JDeli | |
|---|---|---|---|
| Pure Java (no native binaries) | ✓ | ✓ | ✓ |
| Works as ImageIO plugin | ✓ | ✗ | ✓ |
| Direct API | ✗ | ✓ | ✓ |
| Full TIFF spec coverage | ✗ (partial) | ✗ (partial) | ✗ (partial) |
| Consistent across Java 8 / 11+ | ✗ (regression) | ✓ | ✓ |
| Encoder options (compression, colour) | Limited | Limited | ✓ |
| Supports other formats (AVIF, HEIC, WebP…) | ✗ | ✗ | ✓ |
| Cost | Free | Free | Commercial |
| Support | Community | Apache / community | Included |
Apache Imaging is a reasonable starting point if you have straightforward TIFF requirements and are not concerned about the Java version regression. JDeli is the better choice for production use, legacy code bases, server environments, or if you need consistent output across Java versions and broader format support.
Option 1: Write TIFF with native ImageIO
If you are still on Java 8 or your TIFF requirements are simple, native ImageIO may be sufficient:
File file = new File("/path/to/output.tif");
boolean written = ImageIO.write(bufferedImage, "TIFF", file);
if (!written) {
// No suitable ImageIO writer found — check Java version and image type
throw new IOException("Failed to write TIFF: no suitable writer found");
}
Check the return value. ImageIO.write() returns false rather than throwing when it cannot write, so failures are easy to miss.
Option 2: Add full TIFF support to ImageIO (no code changes)
JDeli registers itself as an ImageIO plugin. Once it is on the classpath your existing ImageIO.write() calls use JDeli automatically, with no code changes required.
Maven
<dependency>
<groupId>com.idrsolutions</groupId>
<artifactId>jdeli</artifactId>
<version>[JDELI_VERSION]</version>
</dependency>
Gradle
implementation 'com.idrsolutions:jdeli:[JDELI_VERSION]'
Alternatively, download the trial jar and add it to your classpath manually. See the ImageIO configuration guide for setup details.
Once JDeli is on the classpath:
// Your existing ImageIO code — no changes needed
File file = new File("/path/to/output.tif");
ImageIO.write(bufferedImage, "TIFF", file);
Option 3: Write TIFF directly with the JDeli API
The JDeli API gives you more control and does not depend on ImageIO’s plugin registration order.
- Add JDeli to your class or module path. (download the trial jar)
- Create a
FileorOutputStreamfor the output. - Call
JDeli.write()with your image, format, and output target.
// String format
JDeli.write(bufferedImage, "tiff", new File("/path/to/output.tif"));
// Type-safe enum (preferred)
JDeli.write(bufferedImage, OutputFormat.TIFF, new File("/path/to/output.tif"));
Controlling output with TiffEncoderOptions
For production use, pass a TiffEncoderOptions object to control compression and other output settings:
TiffEncoderOptions options = new TiffEncoderOptions();
JDeli.write(bufferedImage, options, new File("/path/to/output.tif"));
See the JDeli TIFF documentation for the full list of encoder options.
Frequently asked questions
Why does my TIFF code work in Java 8 but fail in Java 11?
Java 11 removed some TIFF codec functionality that was present in Java 8. The result is that ImageIO.write() may return false or produce incorrect output for certain image types. Using an external library such as JDeli or Apache Imaging avoids this problem entirely.
What is JDeli?
JDeli is a pure Java image library from IDR Solutions. It has no native binaries, supports reading, writing, and converting TIFF and other formats (AVIF, HEIC, WebP, and more), and works as both an ImageIO plugin and a standalone API.
Is Apache Imaging a good alternative?
Apache Imaging is a reasonable free option for basic TIFF writing. It is pure Java and actively maintained. Its TIFF support is more limited than JDeli’s and it does not function as an ImageIO plugin.
Can I read TIFF files in Java with JDeli?
Yes. See our companion article: how to read TIFF files in Java.
Is JDeli pure Java?
Yes. JDeli has no native binaries and makes no calls to platform-specific libraries. This makes it straightforward to deploy on any Java-supported platform, including containerised and server environments.
Other useful TIFF resources
As experienced Java developers, we help you work with images in Java and bring over a decade of hands-on experience with many image file formats.
Are you a Java Developer working with Image files?
// Read an image
BufferedImage bufferedImage = JDeli.read(avifImageFile);
// Write an image
JDeli.write(bufferedImage, "avif", outputStreamOrFile);// Read an image
BufferedImage bufferedImage = JDeli.read(dicomImageFile);// Read an image
BufferedImage bufferedImage = JDeli.read(heicImageFile);
// Write an image
JDeli.write(bufferedImage, "heic", outputStreamOrFile);// Read an image
BufferedImage bufferedImage = JDeli.read(jpegImageFile);
// Write an image
JDeli.write(bufferedImage, "jpeg", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(jpeg2000ImageFile);
// Write an image
JDeli.write(bufferedImage, "jpx", outputStreamOrFile);
// Write an image
JDeli.write(bufferedImage, "pdf", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(pngImageFile);
// Write an image
JDeli.write(bufferedImage, "png", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(tiffImageFile);
// Write an image
JDeli.write(bufferedImage, "tiff", outputStreamOrFile);
// Read an image
BufferedImage bufferedImage = JDeli.read(webpImageFile);
// Write an image
JDeli.write(bufferedImage, "webp", outputStreamOrFile);
What is JDeli?
JDeli is a commercial Java Image library that is used to read, write, convert, manipulate and process many different image formats.
Why use JDeli?
To handle many well known formats such as JPEG, PNG, TIFF as well as newer formats like AVIF, HEIC and JPEG XL in java with no calls to any external system or third party library.
What licenses are available?
We have 3 licenses available:
Server for on premises and cloud servers, Distribution for use in a named end user applications, and Custom for more demanding requirements.
How does JDeli compare?
We work hard to make sure JDeli performance is better than or similar to other java image libraries. Check out our benchmarks to see just how well JDeli performs.

How can I convert a TIFF image to a JPEG using jDeli.
we are on the process of writing tiff decoder (tiff encoder is already available)
once it is finished we will post examples of how to do conversions on our website.
i recommend keep an eye on JDeli release notes (there are plenty of features on the way)
At the moment you can read a Tif with JAI as a BufferedImage and write out with JDeli
Thanks Mark. I tried it out. I am using the com.twelvemonkeys.imageio:imageio-tiff:3.1.1 implementation for ImageIO. Some images are turning out black after the conversion.
Is the issue in JDeli ot twelvemonkeys?
Sorry, I do not have much experience with image transformations. So, I am not sure if it caused by reading the image using ImageIO or using jDeli for transforming it.
If you read the BufferedImage with TwelveMonkeys and then write out with ImageIO.write() as a png, is it correct?
Added the code below. I have tried this out with 4 Tiff images. Just one image is turning out black. Others are getting converted fine.
public void transform(InputStream in, OutputStream out, Map params) throws IOException {
try {
BufferedImage image = ImageIO.read(in);
JpegEncoder encoder = new JpegEncoder();
encoder.write(image,out);
} catch (Exception e){
e.printStackTrace();
}
}
If you use ImageIO.write() rather than JDeli to write out the images, are they correct?
Our Tiff Decoder is Alive Click here to download
Hi All,
Is there a code for Tiff writer in Linux/Ubuntu?
Thank you in advance
Our JDeli library (which is in Java so runs on Linux/Ubuntu) includes a TiffEncoder and you can also look at tools like tifflib