yera.runtime.handlers.image.kitty

Kitty handler for image output.

Symbols

class KittyImageHandler — Render raster images through the Kitty graphics protocol.

KittyImageHandler

Render raster images through the Kitty graphics protocol.

Methods

__init__ — Initialize Kitty image rendering for a terminal console.
push — Render an image event in a Kitty terminal.

KittyImageHandler.__init__

__init__(
    console: Console,
) → None

Initialize Kitty image rendering for a terminal console.

Parameters

console
type: Console

Rich console whose dimensions constrain rendered images.

KittyImageHandler.push

push(
    event: OutputEvent,
) → None

Render an image event in a Kitty terminal.

Supported raster formats are converted to PNG before being sent through the Kitty graphics protocol. SVG images and invalid raster content use a textual fallback.

Parameters

event
type: OutputEvent

Output event carrying encoded image data.

Raises

TypeError

If the event does not carry image data.