junjihashimoto / sixel

Other
53 stars 1 forks source link

Cannot get sixel to work properly #5

Closed tomjaguarpaw closed 4 years ago

tomjaguarpaw commented 4 years ago

I cannot get sixel to work. As you can see from the screenshot below, my terminal supports sixels and I can use convert to show logo.png. The command in the sixel README does not work, however. I have no idea how to debug this.

screenshot

junjihashimoto commented 4 years ago

Thank you for your feedback. What is your terminal? I am using mlterm on demo.

tomjaguarpaw commented 4 years ago

I am running xterm -ti 340.

junjihashimoto commented 4 years ago

I've understood the cause. xterm uses a palette having 256 colors every 6 lines. mlterm is not so.

junjihashimoto commented 4 years ago

https://github.com/junjihashimoto/sixel/pull/6 is working on xterm. image

tomjaguarpaw commented 4 years ago

Thanks! It's a bit better. There is something funny about the colours though. In case it is useful to you, my xterm says it is version XTerm(344).

screenshot

junjihashimoto commented 4 years ago

@tomjaguarpaw Could you try following xrdb settings?

$ echo "XTerm*decTerminalID: vt340" >> $HOME/.Xresources
$ echo "XTerm*numColorRegisters: 256" >>  $HOME/.Xresources
$ xrdb $HOME/.Xresources
$ xterm

Probably the SIXEL palette is 16 colors. This enables 256 colors.

tomjaguarpaw commented 4 years ago

Yes, it works! Thanks.

(Since I prefer not to have global persistent state I used the following instead xterm -xrm "XTerm*decTerminalID: vt340" -xrm "XTerm*numColorRegisters: 256")