mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 22:42:46 +00:00
For storytold/photocraft#12473: PhotoCraft lifts its 2^30 px JPEG cap only after admitting the decode against free memory, and for that it needs the frame before decoding. jpeg_info reads it from the markers alone: the stored size, the layout decode returns, and whole_coefficients, set when decode hands the file to craft-jpeg (arithmetic-coded, lossless or 12-bit frames), whose working set is several times the decoded image. None without a frame of 1, 3 or 4 components. This was part of storytold/photocraft#12604 until storytold/photocraft#14236 moved the codecs here. Co-Authored-By: Νύξ (Nyx, AI) 🌑 <nyx@despotak.is>