Link

Read TIFF image in Java

You can read TIFF image files in Java with JDeli’s TIFF Decoder.

Key information:

  • 100% Java solution. No dlls or dependencies on native code
  • Compression: CCITT 3,4, Pack bit, LZW, Adobe Deflate, JPEG technote2 and Deflate
  • Colorspace: bilevel, grayscale, rgb, argb, cmyk, acmyk, ycbcr
  • Bits Per Sample: 1 to 32
  • Byte Ordering: Little and Big Endian
  • Other: Single, Multi-file, Tiling, Planar (Chunky, Separated), Predictor, 16/32-bit floating samples

Quick start:

BufferedImage image = JDeli.read(tiffImageFile);

or

TiffDecoder decoder = new TiffDecoder();
BufferedImage image = decoder.read(tiffData);

See the full Javadoc.

Read Multi Image tiff files

This needs the TiffDecoder class

File file = new File("/path/to/file");
TiffDecoder dec = new TiffDecoder();
int totalImages = dec.getImageCount(file);
for (int i = 0; i <= totalImages; i++) {
   BufferedImage image = dec.read(i , file); // i is the image number
   // Insert BufferedImage handling code here
}