Take Command can display terminal images sent through the direct-transfer subset of the Kitty graphics protocol.
Kitty graphics are disabled by default because terminal output can contain untrusted image data. Enable them in Settings / Tabs by turning on Tab Pty Kitty Images, or add this setting to TCMD.INI:
TabPtyKittyImages=Yes
Restart affected tabs after changing the setting. Set the value to No, or remove it, to disable Kitty image processing.
Take Command accepts Kitty APC graphics controls in this form:
ESC _ G <parameters> ; <Base64 payload> ESC \
The payload must be sent directly in the control sequence (t=d, or the default transmission medium). Take Command supports:
•a=T: transmit an image and place it at the current cursor position.
•a=t: transmit and retain an image by its i image ID.
•a=p: place a previously retained image.
•f=24: raw RGB pixels. s and v must specify the pixel width and height.
•f=32: raw RGBA pixels. s and v must specify the pixel width and height.
•f=100: PNG data.
•Chunked transfers using m=1 on intermediate chunks and m=0 on the last chunk.
•Placement IDs (p), cell dimensions (c and r), pixel offsets (X and Y), source cropping (x, y, w, and h), and z-ordering (z).
If both c and r are supplied, Take Command scales the image to that cell rectangle. If only one is supplied, the other dimension is calculated from the source image aspect ratio.
Negative z values draw an image beneath terminal text. Non-negative values draw it above terminal text.
Store a source image with a nonzero image ID:
a=t,i=42,f=100;<Base64 PNG data>
Then create one or more placements without retransmitting the data:
a=p,i=42,p=1,c=40,r=12
Reusing the same image ID and placement ID replaces that placement. This is useful when an application updates the size or position of an image.
The following deletion actions are supported:
Control |
Result |
|---|---|
a=d or d=a |
Removes all Kitty image placements. |
d=A |
Removes all Kitty images and placements. |
d=i,i=<image ID> |
Removes placements for the specified image. |
d=I,i=<image ID> |
Removes the image when it no longer has a placement. |
d=i,i=<image ID>,p=<placement ID> |
Removes the specified placement. |
Kitty image placements are anchored to terminal cells. They scroll with terminal content, including Take Command smooth scrolling, and are retained in scrollback until normal terminal-buffer eviction discards their anchored row.
Images honor the terminal viewport, folding, DPI changes, window resizing, and Direct2D device recreation. The existing Copy Image and Save Image As... context-menu actions are available when the pointer is over a rendered image.
The decoded size of each source image and the total retained image memory use TabPtySixelMaxBytes. Take Command also limits a tab to 256 retained Kitty source images, 1,024 placements, and bounded chunked-transfer memory.
The following Kitty features are intentionally not supported:
•File, temporary-file, and shared-memory transfer media.
•Compressed direct payloads.
•Unicode-placeholder and virtual placements.
•Relative placements.
•Cursor-movement directives and data offsets.
Use direct Base64 payloads instead. Programs that require an unsupported feature should use SIXEL or iTerm2 output where appropriate, or fall back to text output.
•Confirm the active tab is a ConPTY terminal tab.
•Confirm TabPtyKittyImages=Yes is in the active TCMD.INI.
•Ensure the payload is valid Base64 and terminates with ESC \.
•For raw formats, provide exact s and v dimensions and the exact pixel byte count: three bytes per pixel for RGB, four for RGBA.
•Reduce image size or increase TabPtySixelMaxBytes if an image is not displayed because it exceeds the configured memory limit.
•For stored images, ensure that the original a=t,i=<ID> transfer completes before sending a=p,i=<ID>.