mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why A JPEG can exceed the sidebar's 32 MiB decode budget even when its thumbnail would fit comfortably. ## What changed When a full JPEG decode hits the allocation limit, try building a preview from JPEG block averages within the same budget. The fallback supports sequential and progressive JPEGs, applies EXIF orientation, and preserves the oriented source dimensions in the sidebar label. ## Testing Add tests for a 6544 × 1721 sequential JPEG that produces a 768 × 202 preview and for a progressive fixture that exercises scan refinement, restart markers, EXIF rotation, and allocation limits. GitOrigin-RevId: 232b37d8c239fbaa602930d9032c9a784bd030e2