Bug 696896 - Luratech JPX decoder fails to decode image
Summary: Luratech JPX decoder fails to decode image
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: JPX/JBIG2 encode/decode (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Shailesh Mistry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-04 20:59 UTC by Sebastian Rasmussen
Modified: 2021-01-11 16:31 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Rasmussen 2016-07-04 20:59:44 UTC
The following file can be successfully decoded by OpenJPEG but fails to be decoded by Luratech JPX decoder library:

https://github.com/uclouvain/openjpeg-data/blob/master/input/nonregression/issue228.j2k

After looking into the JPEG2000 spec and looking at the hexdump of the file it seems likely that the CME marker for the comment is a culprit since it accidentally omits the Rcme field and instead starts the Ccmd field immediately after the Lcme field. OpenJPEG never even tries to parse any of the fields but the specification allows for a validation of the Rcme-field value to be 0 or 1 (depending on if it is a binary or latin1 text comment).

I believe that a decoder library should make the comment type available along with the comment data, but it should assume that the comment is binary unless explicitly indicated to be latin1 text.
Comment 1 Henry Stiles 2021-01-11 16:31:10 UTC
We no longer support the Luratech decoder.