Skip to content

fix(pdf): honor image sample depths and JPX decode rules - #1166

Merged
andiwand merged 1 commit into
mainfrom
review/148-pdf-image-sampling
Oct 6, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/148-pdf-image-sampling

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

JPEG 2000 images incorrectly applied a PDF Decode array, which can invert their colors. Ignore it as ISO 32000-1 Table 89 requires for ordinary JPX images. Share raster bit-depth validation, accepting only 1/2/4/8/16 and requiring one-bit stencil masks. Shorten the image API comments.

Validation: extend two existing tests, both failing on the parent, without adding test cases or duplicating codec fixtures. All 180 targeted tests and 50 PDF corpus HTML-generation checks pass. clang-tidy, Android/WebAssembly/iOS object builds, and the library plus four CLI analysis build pass. The corpus check does not compare rendered pixels.

@andiwand
andiwand force-pushed the review/147-test-data-recovery branch from 24c06b8 to b80cf68 Compare October 6, 2026 19:07
Base automatically changed from review/147-test-data-recovery to main October 6, 2026 19:09
@andiwand
andiwand force-pushed the review/148-pdf-image-sampling branch from cf34d88 to 71ca5a9 Compare October 6, 2026 19:14
@andiwand
andiwand merged commit 2acd950 into main Oct 6, 2026
21 of 23 checks passed
@andiwand
andiwand deleted the review/148-pdf-image-sampling branch October 6, 2026 19:15
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