Sixel graphics should be ignored unless supported #170

Closed
opened 2026-01-30 21:44:34 +00:00 by claunia · 10 comments
Owner

Originally created by @mobluse on GitHub (Feb 21, 2018).

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.17101.1000]

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
    I run a file containing this (you could also just paste the three lines starting with printf):

#!/bin/bash
printf '\ePq#1NNNN#2NNNN#3NNNN$oooo'\
'#1oooo#2oooo-#3BBBB#1BBBB#2BBBB${{{{'\
'#3{{{{#1{{{{????\e\\'

The result is that it prints:
q#1NNNN#2NNNN#3NNNN$oooo#1oooo#2oooo-#3BBBB#1BBBB#2BBBB${{{{#3{{{{#1{{{{????

  • What's wrong / what should be happening instead:
    Since ConHost doesn't support sixel graphics (at this time) it should be ignored and nothing should be printed. It should be as if the entire output of the program was sent to /dev/null.

"Non-graphics terminals generally silently ignore sixel escape sequences." -- https://en.wikipedia.org/wiki/Sixel

In WSLTTY (that supports sixel graphics) the program prints a 3x3 red, green and blue colored square:
brg
gbr
rgb

xterm in WSL Ubuntu with VcXsrv ignores sixel graphics unless started as a VT340 terminal: xterm -ti vt340, then it prints the colored square.

Originally created by @mobluse on GitHub (Feb 21, 2018). * Your Windows build number: (Type `ver` at a Windows Command Prompt) Microsoft Windows [Version 10.0.17101.1000] * What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots) I run a file containing this (you could also just paste the three lines starting with printf): ``` #!/bin/bash printf '\ePq#1NNNN#2NNNN#3NNNN$oooo'\ '#1oooo#2oooo-#3BBBB#1BBBB#2BBBB${{{{'\ '#3{{{{#1{{{{????\e\\' ``` The result is that it prints: `q#1NNNN#2NNNN#3NNNN$oooo#1oooo#2oooo-#3BBBB#1BBBB#2BBBB${{{{#3{{{{#1{{{{????` * What's wrong / what should be happening instead: Since ConHost doesn't support sixel graphics (at this time) it should be ignored and nothing should be printed. It should be as if the entire output of the program was sent to /dev/null. "Non-graphics terminals generally silently ignore sixel escape sequences." -- https://en.wikipedia.org/wiki/Sixel In [WSLTTY](https://github.com/mintty/wsltty) (that supports sixel graphics) the program prints a 3x3 red, green and blue colored square: brg gbr rgb `xterm` in WSL Ubuntu with VcXsrv ignores sixel graphics unless started as a VT340 terminal: `xterm -ti vt340`, then it prints the colored square.
Author
Owner

@WSLUser commented on GitHub (Mar 2, 2018):

Since we're mentioning Sixel here, there's a UserVoice to get Sixel graphics support for ConHost here Recommend upvoting it to gain priority.

@WSLUser commented on GitHub (Mar 2, 2018): Since we're mentioning Sixel here, there's a UserVoice to get Sixel graphics support for ConHost [here](https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/33181663-libsixel-support-for-cmd-powershell-wsl) Recommend upvoting it to gain priority.
Author
Owner

@zadjii-msft commented on GitHub (Mar 5, 2018):

I guess I didn't directly respond about sixels in Microsoft/WSL#1099 - It'd be cool, it's on the backlog.

@zadjii-msft commented on GitHub (Mar 5, 2018): I guess I didn't *directly* respond about sixels in Microsoft/WSL#1099 - It'd be cool, it's on the backlog.
Author
Owner

@oising commented on GitHub (Apr 10, 2019):

I should leave this here for stopgap graphical fun, although the performance of conhost makes it very painful: https://hpjansson.org/chafa/

@oising commented on GitHub (Apr 10, 2019): I should leave this here for stopgap graphical fun, although the performance of conhost makes it very painful: https://hpjansson.org/chafa/
Author
Owner

@miniksa commented on GitHub (Apr 10, 2019):

Whoa whoa whoa. You can't just rag on conhost's performance without giving me a repro @oising. :P I work pretty dang hard to optimize things when I have a concrete hot path to work on.

@miniksa commented on GitHub (Apr 10, 2019): Whoa whoa whoa. You can't just rag on conhost's performance without giving me a repro @oising. :P I work pretty dang hard to optimize things when I have a concrete hot path to work on.
Author
Owner

@oising commented on GitHub (Apr 10, 2019):

@miniksa -- you're right, I'm sorry. I'm on your side, but I was definitely way too terse here. That links to a super fun tool for emitting VT for animating gifs/pngs/mp4s etc to a terminal. I think you're doing an outstanding job of adding value without making conhost worse, but until the old GDI+ crud is ripped out, it'll never compete with xterm/alacritty/sakura/(insert GL/SDL powered terminal here.)

That said, here's your repro (WSL):

  1. sudo apt install chafa
  2. curl https://media.giphy.com/media/12UwsVgQCYL3H2/giphy.gif --output winanim.gif
  3. chafa winanim.gif --font-ratio 1/3

Now fire up X410, VcVxsrv, etc, spawn an xterm or a fancy accelerated shell like sakura and try again.

I've attached two short vids (one sakura over x410), the other wsl on conhost (18362.53).

sakura 2019-04-10 14-31-22.zip
Ubuntu 18.04 2019-04-10 14-33-05.mp4.zip
xterm 2019-04-10 14-38-29.zip

Vids recorded with window 10 game bar (win+g).

edit: added plain old xterm. I'm on a suface book i7 btw. Even xterm smokes conhost.

@oising commented on GitHub (Apr 10, 2019): @miniksa -- you're right, I'm sorry. I'm on your side, but I was definitely way too terse here. That links to a super fun tool for emitting VT for animating gifs/pngs/mp4s etc to a terminal. I think you're doing an outstanding job of adding value without making conhost _worse_, but until the old GDI+ crud is ripped out, it'll never compete with xterm/alacritty/sakura/(insert GL/SDL powered terminal here.) That said, here's your repro (WSL): 1) sudo apt install chafa 2) curl https://media.giphy.com/media/12UwsVgQCYL3H2/giphy.gif --output winanim.gif 3) chafa winanim.gif --font-ratio 1/3 Now fire up X410, VcVxsrv, etc, spawn an xterm or a fancy accelerated shell like sakura and try again. I've attached two short vids (one sakura over x410), the other wsl on conhost (18362.53). [sakura 2019-04-10 14-31-22.zip](https://github.com/Microsoft/console/files/3065307/sakura.2019-04-10.14-31-22.zip) [Ubuntu 18.04 2019-04-10 14-33-05.mp4.zip](https://github.com/Microsoft/console/files/3065308/Ubuntu.18.04.2019-04-10.14-33-05.mp4.zip) [xterm 2019-04-10 14-38-29.zip](https://github.com/Microsoft/console/files/3065320/xterm.2019-04-10.14-38-29.zip) Vids recorded with window 10 game bar (win+g). edit: added plain old xterm. I'm on a suface book i7 btw. Even xterm smokes conhost.
Author
Owner

@oising commented on GitHub (Apr 10, 2019):

I'd be curious to know how much of this difference is down to WSL's known problems with I/O, though I assumed that was mainly disk writes - but with the architecture of linux being all files and sockets, perhaps it's part of the problem. There's no win32 native version of Chafa, at least nothing comparable that I know of. I can't imagine it being much of a blocker though - what's the throughput here for animating with text? It's gotta be absolutely pitiful compared to running npm install ;)

@oising commented on GitHub (Apr 10, 2019): I'd be curious to know how much of this difference is down to WSL's known problems with I/O, though I assumed that was mainly disk writes - but with the architecture of linux being all files and sockets, perhaps it's part of the problem. There's no win32 native version of Chafa, at least nothing comparable that I know of. I can't imagine it being much of a blocker though - what's the throughput here for animating with text? It's gotta be absolutely pitiful compared to running npm install ;)
Author
Owner

@miniksa commented on GitHub (Apr 11, 2019):

OK. I did a WPR trace of what's going on with chafa and we should make a new issue. Going to do that and come back and link it here.

See #410

@miniksa commented on GitHub (Apr 11, 2019): OK. I did a WPR trace of what's going on with chafa and we should make a new issue. Going to do that and come back and link it here. See #410
Author
Owner

@ghost commented on GitHub (Aug 26, 2020):

:tada:This issue was addressed in #6328, which has now been successfully released as Windows Terminal Preview v1.3.2382.0.🎉

Handy links:

@ghost commented on GitHub (Aug 26, 2020): :tada:This issue was addressed in #6328, which has now been successfully released as `Windows Terminal Preview v1.3.2382.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.3.2382.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@voronoipotato commented on GitHub (Oct 14, 2020):

Is there an issue for tracking sixel support?

@voronoipotato commented on GitHub (Oct 14, 2020): Is there an issue for tracking sixel support?
Author
Owner

@zadjii-msft commented on GitHub (Oct 14, 2020):

Yep, #448

@zadjii-msft commented on GitHub (Oct 14, 2020): Yep, #448
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#170