mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-31 07:39:08 +00:00
JBIG2 images, and JBIG2 stencil masks, were reported as "can't be exported yet", so an image the Optimizer stores as JBIG2 would stop exporting. They are now decoded with hayro-jbig2 (already in the tree through hayro), with their /JBIG2Globals from a DecodeParms dictionary or array, as JBIG2Decode gives them: black as 0 (ISO 32000-2 §7.4.7). Unreadable globals, a JBIG2 page of another width, or fewer rows than the image skip the image; rows past its height are dropped, so the output is bounded by the checked size. docs/pdf-spec-parity.md §7.4 no longer says there is no JBIG2 encoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BfMGHQNgdq5yf5tKZHGR3z