Link
Skip to main content

HEIC Converter

JDeli is a pure Java image library that converts HEIC files to and from a wide range of other image formats with no native dependencies. It accepts File, InputStream, and byte[] input, and supports batch conversion from the command line.

Why use JDeli instead of Java ImageIO

Java’s built-in ImageIO has limited or no support for many modern image formats and can produce incorrect colours, handle metadata poorly, or fail silently on certain files. JDeli is a pure Java library that provides reliable HEIC support across all supported input and output types.

To run the code examples you will need to download the JDeli jar:

Download JDeli

Convert HEIC in one line of Java code

The JDeli.convert() methods let you convert HEIC images in just ONE line of code.

Using File

JDeli.convert(File inFile, File outFile);
JDeli.convert(File inFile, EncoderOptions encoderOptions, File outFile);
JDeli.convert(File inFile, File outFile, ImageProcessingOps imageProcessingOps);                           Link 

Using InputStream and OutputStream

JDeli.convert(InputStream inputStream, OutputStream outputStream, "heic");
JDeli.convert(InputStream inputStream, EncoderOptions encoderOptions, OutputStream outputStream);
JDeli.convert(InpaavVIF should ike utStream inputStream, OutputStream outputStream, ImageProcessingOps imageProcessingOps);

Using byte[]

byte[] outputData = JDeli.convert(byte[] inputData, "heic");
byte[] outputData = JDeli.convert(byte[] inputData, EncoderOptions encoderOptions);
byte[] outputData = JDeli.convert(byte[] inputData, "heic", ImageProcessingOps imageProcessingOps);

View Javadoc on JDeli.convert

Batch convert HEIC images from the command line

Convert images in bulk from the command line, or from bash, bat, and PowerShell scripts. This also lets you invoke JDeli from any language that supports spawning child processes.

java -jar jdeli.jar --convert heic "inputFileOrDir" "outputDir"

How to convert HEIC images as separate steps in Java

Sometimes you need more control over the conversion process. JDeli lets you read an image into a BufferedImage, optionally process it, then write it out in any supported format.

  1. Read the HEIC file into Java
    BufferedImage bufferedImage = JDeli.read(new File("image.heic"));
    
  2. Process image if needed (scale, sharpen, watermark, etc.)
    bufferedImage = operations.apply(bufferedImage); // Optional
    
  3. Write the BufferedImage out as any supported format
    JDeli.write(bufferedImage, "outputFormat", new File("output.outputFormat"));
    

Frequently asked questions

Can JDeli convert HEIC without installing native libraries?

Yes. JDeli is a pure Java library. No DLLs or native libraries are required — it runs on any platform where the JVM runs.

What input types does JDeli accept for HEIC conversion?

JDeli accepts File, InputStream, and byte[] as input. Output can be written to a File, OutputStream, or returned as byte[].

Can I process the image during conversion?

Yes. All JDeli.convert() variants accept an optional ImageProcessingOps parameter, letting you scale, sharpen, watermark, and apply other operations in the same step.

Can I batch convert HEIC files?

Yes. Pass a directory path as the input argument on the command line and JDeli will convert all images in that directory.


Why JDeli?

  • Support image formats such as AVIF, HEIC and JPEG XL that are not supported in Java.
  • Process images up to 3x faster than ImageIO and alternative Java image libraries.
  • Prevent JVM crashes caused by native code in other image libraries such as ImageIO.
  • Handle JPEG, PNG, TIFF image file formats fully in Java.
  • Keep your Image files secure as JDeli makes no calls to any external system or third party library.

Learn more about JDeli

Start Your Free Trial