-
Notifications
You must be signed in to change notification settings - Fork 286
Add sixel backend #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sixel backend #154
Conversation
@CephalonRho Don't you think, it would be better to let the user choose which Still haven't tested it, but I'm sure it works great!! |
Still doesn't work on my xterm, which version do you use? Beside, I don't think that the two step process of first setting the image backend and then being able to use it is the best way to do it. Let's make it simpler:
and no fallback ( |
I'm using xterm(350). It should be launched with "xterm -ti vt340" to enable sixel support, but if it's not enabled then it should've panicked unless --image-backend was specified. Not sure if requiring the user to know which backend their terminal emulator supports is a great idea. We can detect the backend that will definitely work best on the used emulator automatically, so I don't see a reason to not do that. Right now there shouldn't be a reason to use the --image-backend argument other than the detection failing (for example on yaft), so it wouldn't be a two step process most of the time. |
That dit it, thx!
No, it didn't panicked, just a funky rendering (see screenshot above) Ok, for the automatic By the way, I don't think the I feel like this is the kind of setting that should be put into a static file and read at compile time/Run time, not a command line flag. If we stick to the automatic detection, you can rollback to the first version, unless I'm missing something |
LGTM 👍 Thx a lot, Looking forward to your next contribution @CephalonRho |
Closes #121
This adds decent support for sixel graphics. I only tested it on xterm, but it should work on other terminal emulators too. There seems to be a 16 color limit, so dithering is used to make them look somewhat okay. The kitty backend also needed a fix because the thread workaround caused it to read one more byte from stdin. It wasn't fatal, but would've caused weird behaviour later on, so I replaced it with posix calls.