1# llimphi-term-graphics23Agnostic decoder of terminal graphics protocols.
45Two protocols covered:
67- **kitty graphics protocol** — APC sequences `\e_G<control>;<base64>\e\\`.
8 It supports chunked transmission (`m=1`), the `f=100` (PNG/JPEG/… through the
9 `image` crate), `f=24` (raw RGB) and `f=32` (raw RGBA) formats, and `o=z`
10 (zlib) compression. Actions `t`/`T` (transmit [and display]), `q` (query),
11 `d` (delete).
12- **sixel** — DCS sequences `\eP<params>q<data>\e\\`. A hand-written decoder
13 (palette, `#` colour selection, `!` RLE, `$` CR, `-` LF, `"` raster
14 attributes).
1516Its heart is `GraphicsScanner`: a streaming automaton fed the PTY's byte chunks.
17It lets **all** ordinary text and ANSI escapes through untouched (so the vt100
18emulator can process them) and only **hijacks** complete graphics sequences,
19returning them decoded as a `GraphicsCommand`. It has no UI state and no render
20dependencies: it produces RGBA8 pixels and the caller uploads them to a texture
21or a `peniko::Image`.
2223It is robust to chunk boundaries: a sequence split across two `feed()` calls is
24buffered and completed on the next one.
2526---
2728Part of **llimphi** — see [llimphi](../README.md).
README.md
llimphi-term-graphics
Agnostic decoder of terminal graphics protocols.
Two protocols covered:
kitty graphics protocol — APC sequences \e_G<control>;<base64>\e\\.
It supports chunked transmission (m=1), the f=100 (PNG/JPEG/… through the
image crate), f=24 (raw RGB) and f=32 (raw RGBA) formats, and o=z
(zlib) compression. Actions t/T (transmit [and display]), q (query),
d (delete).
Its heart is GraphicsScanner: a streaming automaton fed the PTY's byte chunks.
It lets all ordinary text and ANSI escapes through untouched (so the vt100
emulator can process them) and only hijacks complete graphics sequences,
returning them decoded as a GraphicsCommand. It has no UI state and no render
dependencies: it produces RGBA8 pixels and the caller uploads them to a texture
or a peniko::Image.
It is robust to chunk boundaries: a sequence split across two feed() calls is
buffered and completed on the next one.