Skip to content

Conversation

@JLHwung
Copy link

@JLHwung JLHwung commented Jul 8, 2025

Fixed an infinite loop when handling jpeg2000 files whose resd box is before the resc box. The resd box shares the format with the resc box, IMO we should prioritize the resd box over the resc box. Anyway, I didn't touch this part in the PR.

Such images are can be downloaded from the National Archives of Japan Digital Archive, for example, https://www.digital.archives.go.jp/gallery/0000000001.

I browsed through the img2pdf_test and couldn't figure out how to write the test case, since imagemagick generally don't write the resd and resc boxes.

I have attached a hand-crafted jpeg 2000 test file if that helps.
normal-with-resd-box.jp2.zip

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.

1 participant