mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-14 22:35:26 +00:00
A reduced decode now applies the full decode's size limits before it reads any image data: - A file whose size pixel_size cannot read is refused, so the 256 Mpx check always has a size to compare. The JPEG decoder's own reading of the frame size is checked against the same limit. - A progressive JPEG keeps the coefficients of the full-size image until its last scan, whatever the output size. When those take more than 512 MiB (each component counted at full size, each side rounded up to 32 pixels), the reduced decode is refused and the full decode, with its own limits, applies.