Open reeperbahnause opened 7 years ago
Just created and tested the jai-imageio-core-1.3.2-SNAPSHOT.jar
with the same result.
Hello the problem is in the support to LSB TIFF. The input stream is always read as it was MSB coded. LSB images are not so common among TIFF. A patch is needed to getNextCode method of TIFFLZWDecompressor class to support LSB files.
Hi,
I was debugging a bit an noticed in this line
addStringToTable(stringTable[oldCode], string[0]);
that the oldCode
is > than 258 and because of that the returned value from the stringTable
is null
I'm neither familiar with the decoding process nor the algorhythm and so probably the wrong person to contribute.
I would just like to help and let you know how I created this TIFF file.
The original file is a PDF document which I converted to a TIFF file using ImageMagicks convert tool.
convert -background white -alpha remove -scene 1 -density 300 -compress LZW -type grayscale -depth 8 /home/user/source.file /home/user/%03d.tif
After that I testet the Barcode extraction using Zxing which was working totally fine.
Then accidentally I was testing the barcode extraction using the TIFF file, which was converted a second time using ImageMagicks convert tool with the same parameters.
This twice converted TIFF file is the image I attached to this issue.
that the oldCode is > than 258 and because of This is the effect of the misinterpretation of the input data in getNextCode() with LSB images. "stringTable" entries should grow with the decompression process.
Hello, I am working on a fix on my fork: https://github.com/lbellonda/jai-imageio-core/tree/issue37 It still needs some optimization, but it is working with your image by checking the TIFF tag "FillOrder".
Thanks for your contribution, @lbellonda, I've merged #39.
Hi,
I stumbled across an issue while using ZXing try to read the attached TIFF file 00000_001.zip.
The following Exception occurs as soon as the image should be read:
The command line I was testing is the following:
I just cloned the project to see if I can get any additional information about the exception but so far this is what I have.