Link
Skip to main content

Convert multipage TIFF to single TIFF files

JDeli is able to convert individual TIFF images into a single multipage TIFF file.

Read/Write methods for converting from Multipage TIFF into a single TIFF file

  1. Read multipage TIFF image into Java (also handles other supported images
TiffDecoder decoder = new TiffDecoder();
BufferedImage image = decoder.read(imageData);
  1. Process image if needed

  2. Write out Java image to a multiple image TIFF files.

for (int i = 0; i <= decoder.getPageCount(); i++) {
    BufferedImage image = decoder.read(i);
    TiffEncoderOptions options = new TiffEncoderOptions();
    
    //set any options in options instance - examples below
    options.setCompressionFormat(TiffCompressionFormat.DEFLATE);
    options.setXmpMetaData("xmp metadata");
    
    //write out
    JDeli.write(image, options, outputStreamOrFile);
}

This uses the TiffDecoder class


Why JDeli?

  • Support image formats such as AVIF, HEIC and JPEG XL (AVIF soon) 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