feat: inline images in terminals (iTerm2 OSC 1337)
Images sent with the iTerm2 inline protocol (imgcat and friends) are decoded (PNG, JPEG, GIF first frame) and drawn at the cursor, sized from the width/height arguments in cells, pixels or percent (aspect kept, never wider than the terminal); the cursor moves below so text continues after them. They are anchored to the same stable line index as the shell-integration marks, scroll with the text and are dropped with the scrollback or on clear. Remote data, so decoding is bounded (8192 px a side, 256 MiB allocation), OSC bodies are capped at 16 MiB, inline=0 downloads are ignored, and each terminal keeps at most 32 Mpx of images, oldest first. Sixel and kitty graphics are not implemented.
This commit is contained in:
+2
-1
@@ -18,7 +18,8 @@ tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter", "std", "ansi"] }
|
||||
egui-phosphor = "0.14"
|
||||
rfd = "0.17"
|
||||
image = { version = "0.25", default-features = false, features = ["png"] }
|
||||
image = { version = "0.25", default-features = false, features = ["png", "gif"] }
|
||||
base64 = "0.22"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
regex = "1"
|
||||
|
||||
Reference in New Issue
Block a user