Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix in JPEG2000 module #997

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

marhop
Copy link
Member

@marhop marhop commented Feb 6, 2025

The JPEG2000 module did not parse a JPEG2000 codestream correctly when the length of a tile-part in a SOT marker segment was set to 0. This means that the tile-part contains all data in the remaining code stream. (See https://web.archive.org/web/20130810200214/http://www.jpeg.org/public/fcd15444-1.pdf section A.4.2) JHOVE however would interpret this incorrectly as meaning "literally 0", thus expecting the beginning of the next marker segment where in fact the tile-part bytestream starts.

The JPEG2000 module did not parse a JPEG2000 codestream correctly when
the length of a tile-part in a SOT marker segment was set to 0. This
means that the tile-part contains all data in the remaining code stream.
(See https://web.archive.org/web/20130810200214/http://www.jpeg.org/public/fcd15444-1.pdf section A.4.2)
JHOVE however would interpret this incorrectly as meaning "literally 0",
thus expecting the beginning of the next marker segment where in fact
the tile-part bytestream starts.
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.15%. Comparing base (3d945ce) to head (384d163).
Report is 8 commits behind head on integration.

Additional details and impacted files
@@              Coverage Diff               @@
##             integration     #997   +/-   ##
==============================================
  Coverage          47.15%   47.15%           
  Complexity          1102     1102           
==============================================
  Files                 58       58           
  Lines               8993     8993           
  Branches            1618     1618           
==============================================
  Hits                4241     4241           
  Misses              4224     4224           
  Partials             528      528           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marhop
Copy link
Member Author

marhop commented Feb 10, 2025

Lots of example files that illustrate this bug here: https://www.opengeodata.nrw.de/produkte/geobasis/lusat/akt/dop/dop_jp2_f10/

@carlwilson carlwilson merged commit e0c04bd into openpreserve:integration Feb 12, 2025
5 checks passed
@marhop marhop deleted the jpeg2000-codestream branch February 12, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants