dragon66 / icafe

Java library for reading, writing, converting and manipulating images and metadata
Eclipse Public License 1.0
203 stars 58 forks source link

TIFFReader cannot read multipage TIFF #98

Closed lanthale closed 3 years ago

lanthale commented 3 years ago

I am writing an open source image management applicaton and therefore using iCafe for reading TIFF files.

One of the user tried to load a multipage TIFF file which will be encoded using iCafe but I always get a blank page. I have already tried to use the PageReader but it does not help.

Here is the test file to download: https://drive.google.com/file/d/1xdQgrKJT8jgFXw2J0mkgT63ulZggpUZD/view?usp=sharing

dragon66 commented 3 years ago

@lanthale Unfortunately ICAFE doesn't have full support for all Tiff flavours especially Black and White fax encoding which is often used to encode multipage Tiff.

In this case, you need to read Tiff the way Java ImageIO does and iterate to get all the pages. There is a Java image plugin included in the lib folder which you need to include in the classpath and it will add support for Java ImageIO to read Tiff images.

Wen

lanthale commented 3 years ago

Thanks allot for the fast feedback. I will try that.