term.gfx.proto.build_png

term.gfx.proto

build_png(data_or_path, options) -> payload

Build a kitty graphics PNG transmission payload

Builds the escape sequence(s) for transmitting a PNG image. Sets f=100 (PNG format) and a defaults to "T" (transmit and display). The first argument is interpreted based on options.t:

For shared memory (t="s") this function has the side-effect of creating a shared memory object. Defaults q=2 (suppress OK responses); override with q=1 to get all responses or q=0 to restore default protocol verbosity.