mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
Document::with_direct_parms resolved an indirect /DecodeParms and its array entries but not the numbers inside (/Predictor 9 0 R), which Dict::int doesn't follow. A 1-bit image with such a predictor was decoded without it, its rows shifted by their tag bytes, and Group 4 of that stored in its place; resampling read images the same way. It now keeps, of each parameters dictionary, the numbers and flags the decoders read, resolved, and /JBIG2Globals as a reference. Only those small values are copied (an entry that is no dictionary is null), so a file naming one big object from every key and filter can't have it copied a hundred times. The change is #4384's, moved down so that every PR stacked on this one reads such parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P6yUtvWGPsJpMLyh6pxSXG