question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Inline Images Protocol

See original GitHub issue

It would be great if this library would support the Iterm2 Inline Images Protocol for drawing images (as an alternative to the current low-resolution drawImage()). See https://www.iterm2.com/documentation-images.html for details.

See for example this implementation: https://github.com/sindresorhus/ansi-escapes/blob/dcd5ef3c124079c693bef1725044d91b0bca6e7f/index.js#L112-L128

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Digicratcommented, Apr 24, 2021

I do wish that more terminal emulators supported images … though it looks like that may be on the cusp of changing.

Sixel is another image format, similar to iterm2s (and supposedly supported by as well), that seems to be more widely supported.

It looks like libSixel support isn’t quite mainstream, but it seems to work in iTerm2 and “mlterm” (which is in the Ubuntu package manager and just worked for me). Support is also pending for it in alacritty, and xterm apparently supports it if built from source with the appropriate option.

I haven’t delved too deeply into it, but there is a control sequence that allows for detection of sixel support (and a node package supports-sixel to do this). Ideally then, the existing terminal-kit drawImage could be extended to seamlessly switch to using the sixel format if supported by the terminal, and fallback to the current low-res implementation if not.

0reactions
Niekcommented, Apr 28, 2021

Sixel looks interesting but in my limited testing it has 2 issues:

  • Lower quality (limited colors) compared to Inline Images Protocol
  • High CPU usage when displaying a simple GIF Screen Shot 2021-04-28 at 14 28 51

On the other hand, with Inline Images Protocol it takes much longer to render the initial frame because of the base64 encoding. Also iTerm takes quite some CPU usage too: Screen Shot 2021-04-28 at 14 29 29

Read more comments on GitHub >

github_iconTop Results From Across the Web

Images - iTerm2 - macOS Terminal Replacement - iTerm2
Any image format that macOS supports will display inline, including PDF, PICT, EPS, or any number of bitmap data formats (PNG, GIF, etc.)....
Read more >
Terminal - Inline Images - Buildkite
Terminal supports embedding images by pointing to the URLs source, rather than just embedded via base64 encoding. In Terminal's case the images are...
Read more >
Is there a linux-supported terminal emulator that implements ...
Is there a linux-supported terminal emulator that implements iTerm 2's Inline Images Protocol? I need to display images over an SSH connection.
Read more >
Wez's Terminal Emulator - iTerm Image Protocol - Wez Furlong
wezterm implements support for the iTerm2 inline images protocol and provides a handy imgcat subcommand to make it easy to try out. Because...
Read more >
Extend image backend support to ITerm2 Inline Images Protocol.
Extend image backend support to ITerm2 Inline Images Protocol. #283. Closed. o2sh opened this issue on Oct 21, 2020 · 6 comments ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found