You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kernel: JpxImageLoader reads no Rsiz, so a codestream outside the JPX baseline feature set is written #770
ISO 32000-1 and -2, 7.4.9: data used in PDF image XObjects shall be limited to the JPX baseline set of features. JpxImageLoader reads the SIZ marker for size, channel count and the first component's depth, and never the Rsiz field that says which capabilities the codestream uses.
Measured on the audit branch (b2791ba plus tests): JpxCodestream(16, 16, 3, 7, 0x8000), a SIZ whose Rsiz has the Part 2 bit set, saved through LayoutImage.FromBytes. The image is written with /Filter /JPXDecode and the codestream's bytes unchanged inside a JP2 file (Iso32000_2_7_4_9_PinsTodayAPartTwoCodestreamIsPassedThrough). veraPDF 1.30.4 has no rule for the feature set.
What the baseline set contains is defined by the JPX specification that 7.4.9 refers to and is not held in docs/iso, so the exact Rsiz values to accept need that text.
Sweep: image data is passed through only by the loaders in VellumPdf.Kernel/Images; JBIG2 and CCITT do not carry a feature profile, and the JPEG loader's frame-type question is in #763.
Proposal
Read Rsiz and refuse (InvalidDataException) a codestream that sets the Part 2 bit, or that uses a profile the baseline set excludes once the specification text is checked.
Acceptance
Iso32000_2_7_4_9_AJpxCodestreamOutsideTheBaselineFeatureSetIsRefused loses its skip and passes; the pin is rewritten. A codestream inside the baseline set writes the same bytes as before.
The tests that pin and accept this issue were renamed during the audit's review rounds; the acceptance section above names earlier ones. Current names, all in ConformanceAuditG4Tests (tests/VellumPdf.Kernel.Tests/ConformanceAuditG4Tests.*.cs, PR #765). A pin passes today and is rewritten by the fix; an accept test is skipped now and loses its skip with the fix; a keep test passes before and after.
Activity
test: cite #770 for the JPX baseline feature set gap
test: answer the second review of the graphics audit
Tim81 commentedon Nov 29, 2026
The tests that pin and accept this issue were renamed during the audit's review rounds; the acceptance section above names earlier ones. Current names, all in
ConformanceAuditG4Tests(tests/VellumPdf.Kernel.Tests/ConformanceAuditG4Tests.*.cs, PR #765). A pin passes today and is rewritten by the fix; an accept test is skipped now and loses its skip with the fix; a keep test passes before and after.Iso32000_2_7_4_9_PinsTodayAPartTwoCodestreamIsPassedThrough(Rsiz 0x8000)Iso32000_2_7_4_9_AJpxCodestreamOutsideTheBaselineFeatureSetIsRefusedtest: pin graphics and image output to its ISO clauses (#765)
fix(images): write a JP2 device name only for a channel count it fits
docs(conformance): mark the image gaps #763, #764, #768 and #770 fixed