Closed janpe2 closed 7 years ago
There seems to be a Travis CI error caused by the image from issue #21. Indeed, the decoding results of that image will change if you apply my pull request. Some additional text appears at the bottom of the image: "Contract No. OPP 0000373" and "Hard Copy Not Controlled...". Earlier they were not shown. Thus my pull request is needed also to decode the image of issue #21 successfully.
Sorry for the delay in dealing with this pull request. We are currently in talks with the Apache PDFBox with the goal of donating this component the the ASF. Please see #31.
Ping @janpe2
Superseded by #36
Fixes #27. There is a problem in lower range lines of standard Huffman tables. The JBIG2 standard lists the predefined tables in Annex B. For example, table B.3 specifies the range of values
-infinity...-257
(VAL column) for the lower range line of this table. In StandardTables.java, the valueInteger.MIN_VALUE
has been used as therangeLow
(to represent-infinity
). This is incorrect. Instead, the value -257 should be used asrangeLow
. Lower range lines are special, so the upper end of the VAL range is used asrangeLow
.This problem appears 8 times in StandardTables.java because there are 8 lower range lines in total.