mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-02 22:41:47 -06:00
Export ▸ Images and Save Image As decoded an image with Stream::decoded, which reads /DecodeParms only when it is direct. An image whose PNG predictor came by reference (the dictionary, or an entry of an array) kept its row tags in the samples, and the picture came out shifted. The same was true of an indexed image's lookup table given as a stream, and of a JBIG2 image's /JBIG2Globals stream, which then couldn't be read, so the image was skipped. All three now decode through Document::with_direct_parms, as the optimizer does, and a test exports each. A number given by reference inside a direct /DecodeParms is still not read here; #4384's with_direct_parms reads those. Found by CodeRabbit on #4805; the image decode was already this way on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P6yUtvWGPsJpMLyh6pxSXG