Thanks for creating this! Having a bit of trouble getting Sixel output working. #15
-
Thanks for creating this! I was hoping someone would write Python bindings for Chafa; you've done that and more! I've been trying to integrate this with my branch of enhancements to the Toot urwid app. (Source here. I am building urwid widgets that support sixel and ANSI image rendering. Chafa's ANSI rendering would be an improvement on what I have, and the Kitty + iTerm image support is an added bonus. I have a test program based on your example code that is capable of loading a PNG and displaying it in ANSI block characters. Sixel output isn't working yet. Your docs indicate that this may be related to a lack of Termdb info for my terminal emulator. I'm using Xterm (372) on Ubuntu 22.04; TermInfo.detect_capabilties returns: printing with (fallback=True) doesn't help. Chafa binary with -f sixel does output sixel images properly to this terminal emulator. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hihi! Thanks for taking an interest in this project! I'm glad you like it! ❤️ Are you setting your canvas config's pixel mode mode to The |
Beta Was this translation helpful? Give feedback.
-
Update; Forcing |
Beta Was this translation helpful? Give feedback.
Hihi! Thanks for taking an interest in this project! I'm glad you like it! ❤️
Are you setting your canvas config's pixel mode mode to
CHAFA_PIXEL_MODE_SIXELS
or are you setting them according to the output ofTermInfo.detect_capabilities()
?The
TermInfo.detect_capabilities()
will try it's best to detect the capabilities of your terminal based on your environment variables (mainly$TERM
) and xterm does not seem to set those differently when launching it with-ti vt340
as opposed to just regular ol' xterm. Thus chafa.py will resort to the mode it will definitely be able to display.