haraldk / TwelveMonkeys

TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO
https://haraldk.github.io/TwelveMonkeys/
BSD 3-Clause "New" or "Revised" License
1.84k stars 309 forks source link

TIFF: Decoding chunky gray + extra samples is broken #975

Closed haraldk closed 1 day ago

haraldk commented 3 days ago

For what it's worth, I am also having some issue with the house.tif from the tlnagy/exampletiffs repo, but I have not yet determined if it is in the decoding, the scaling or the re-encoding to jpeg.

Originally posted by @willivolt in https://github.com/haraldk/TwelveMonkeys/issues/972#issuecomment-2191984560

haraldk commented 3 days ago

house.tif has an interesting combination of BlacIsZero, 2 samples per pixel and an ExtraSamples value [999] (legal values are 0, 1 or 2)... But there seems to be a bug decoding it, not taking the extra samples into account. I'll try to fix this as well.