Skip to content
pi-c View Ticket
Login

View Ticket

Scaled image previews in the terminal UI

Open1651ce253d81b4d29df85605927777a439d25e49Created 11.0 days agoUpdated 10.9 days ago
Description2026-11-20 00:16:55
Show images in the terminal UI as previews scaled to a reasonable size (fit within a bounded number of terminal cells, keeping the aspect ratio), for images the user attaches and images tools return. Not now: to be designed first and written from scratch, with no new dependency (pic validates images from their headers today and does not decode them). Design questions: terminal graphics protocols (Kitty, iTerm2 inline images, Sixel) with a fallback (a text placeholder with type, dimensions and size, or a coarse block-character rendering); our own decoders for PNG (on the vendored zlib), baseline JPEG, GIF's first frame and WebP, and a scaler; hostile-input safety (bounded dimensions and memory, fuzzed, run under Fil-C); how previews interact with scrollback, resize and the inline differential renderer.