Module: Charming::Image

Defined in:
lib/charming/image.rb,
lib/charming/image/source.rb,
lib/charming/image/protocol.rb,
lib/charming/image/terminal.rb,
lib/charming/image/transmit.rb,
lib/charming/image/protocol/kitty.rb

Overview

Image provides terminal image display. Unlike Audio (which spawns an out-of-band process and never touches the TTY), images must be written into the terminal — but the framework's renderer is line-based and width-measured, and would shred raw image escape sequences. So images use the Kitty graphics protocol's Unicode placeholders: the image bytes are transmitted once out-of-band (see Transmit and the Runtime's graphics flush), then placed by printing ordinary width-1 placeholder cells that ride the normal frame pipeline (see Protocol::Kitty).

The engine here (Source, Terminal, Protocol) mirrors Audio's split; the view is Components::Image. Terminal support is detected via Terminal; Phase 1 targets Ghostty/Kitty and degrades to a fallback string elsewhere.

Image transmissions ride the shared out-of-band Escape channel: Transmit responds to #payload, so the component registers it via Charming::Escape.register and the Runtime flushes it before the frame.

Defined Under Namespace

Modules: Protocol Classes: Source, Terminal, Transmit