openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Codestream validation fails on some files in openjpeg corpus #127

Closed bitsgalore closed 4 years ago

bitsgalore commented 4 years ago

Command:

python3 ~/jpylyzer/cli.py --recurse --format j2c ~/openjpeg-data/input > oj-input-j2c.xml

Result:

  File "/home/johan/jpylyzer/jpylyzer/boxvalidator.py", line 1305, in validate_contiguousCodestreamBox
    resultsTilePart = BoxValidator(marker, self.boxContents, startOffset=offset, components=csiz).validate()
UnboundLocalError: local variable 'csiz' referenced before assignment

Hapens on file issue363-4740.jp2 in noregression (note that this is in fact a JP2, error only occurs if validation format is set to J2C!).

bitsgalore commented 4 years ago

Fixed by https://github.com/openpreserve/jpylyzer/commit/730e6e7f12ed8055b102949046f6bb2163e71586