You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 52dd3c8
Browse filesBrowse the repository at this point in the historyBrowse files
Terminal features: MSLP command links and pictures in a figure's cells (#45)
* Terminal features: MSLP command links and pictures in a figure's cells
AnsiOutputOptions describes one client: colour depth, TerminalFeatures
(Hyperlinks, CommandLinks, KittyGraphics, InlineImages, Sixel, BlockArt)
and an ITerminalPictureSource for pixels. A Figure laid out under
LayoutContext.Pictures marks each row of its cells with PictureCellsMarkup;
the ANSI emitter draws the picture there or leaves the art.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01448U5MvpKkRkBjwzkkpPFP
* Encode each picture once per size, and encode it faster
Encodings (Kitty transmission, iTerm2 PNG, sixel, half-block rows) are kept
with the TerminalPicture, so every connection shown a picture at a size gets
a copy. Kitty now sends a PNG (f=100); PNGs are RGB when opaque, filtered Up,
at zlib level 2. Sixel reads each band once and writes a colour only over the
columns it reaches, with P2=0 for an opaque picture. Half blocks scale the
picture once rather than once per row. Large payloads go straight to the
output instead of through the run's buffers.
On a 512x384 picture in 60x23 cells: Kitty 25 ms -> 16 ms to encode and
777 -> 423 KiB on the wire, 1.2 ms for each later connection; iTerm2 25 ->
13 ms; sixel 20 -> 7 ms; half blocks 14 -> 3 ms.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01448U5MvpKkRkBjwzkkpPFP
* Take a zero cell size as unknown, and send colourless clients the text art
A terminal that does not know its cell size reports 0, and a sixel at
width 0 divided by zero. Half blocks at Attributes or None depth lost
every colour and were a grid of identical blocks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01448U5MvpKkRkBjwzkkpPFP
---------
Co-authored-by: Claude <noreply@anthropic.com>
/// <summary>The height of the terminal's character cell in pixels, for a picture drawn in pixels (sixel). 20 when unknown, as is a value below 1.</summary>
0 commit comments