EOFException reading TIFFfile
See original GitHub issueHi,
I’m getting an EOFException when trying to read the attached tiff (note the extension has been changed to txt so it can be uploaded here).
Stack trace produced is
java.io.EOFException: Unexpected end of PackBits stream
at com.twelvemonkeys.io.enc.PackBitsDecoder.readFully(PackBitsDecoder.java:200) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.io.enc.PackBitsDecoder.decode(PackBitsDecoder.java:156) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.io.enc.DecoderStream.fill(DecoderStream.java:178) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.io.enc.DecoderStream.read(DecoderStream.java:122) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.io.LittleEndianDataInputStream.readFully(LittleEndianDataInputStream.java:423) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.io.LittleEndianDataInputStream.readFully(LittleEndianDataInputStream.java:396) ~[common-io-3.3.2.jar:3.3.2]
at com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReader.readStripTileData(TIFFImageReader.java:1508) ~[imageio-tiff-3.3.2.jar:3.3.2]
at com.twelvemonkeys.imageio.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:934) ~[imageio-tiff-3.3.2.jar:3.3.2]
I can read similar TIFF images that are in portrait orientation but cannot read ones like the one attached that is in landscape orientation. Don’t know if that’s got anything to do with the problem though.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Getting java.io.EOFException while reading a SQLite file from ...
I am seeing an EOFException exception while reading a SQLite file from temp directory. Following is the code for reading the file.
Read more >Exception reading tiff - Usage & Issues - Image.sc Forum
From the stack trace, you are opening the TIFF file using the SCIFIO library. Firstly, as a workaround, you can try to disable...
Read more >ArrayIndexOutOfBoundsException when reading G4 compressed ...
The TIFF file displays with IrfanView, and reads with java 7. The problem itself appeared in our current decoder too (which is an...
Read more >[SCIFIO] opening tiff files with ImageJ2
EOFException : Attempting to read >> beyond end of file" >> >> The image contains some metadata I can´t read when opening with...
Read more >TIFFFile
public class TIFFFile extends java.lang.Object ... int, read(byte[] b, int off, int len). int, read(float[] f) ... EOFException, java.io.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @haraldk, I’ve tested this now and can confirm it’s working perfectly. Thanks for fixing this.
Hi Harold,
The one I attached is landscape. A similar one that works is attached and is portrait. It is
FillOrder
2 but is compressed withCCITT Group 4
rather thanPackBits
.portraitSample.txt