jart / hiptext

Turn images into text better than caca/aalib
Apache License 2.0
765 stars 44 forks source link

Cannot get sixel support to work with xterm #21

Open rrthomas opened 9 years ago

rrthomas commented 9 years ago

Thanks very much for the sixel support, @saitoha! Unfortunately, I can't make it work.

I am trying with xterm. So far I've tried patchlevel 297 as shipped with Ubuntu 14.04, which, according to the Ubuntu changelog, has sixel support activated; I also tried patchlevel 312, as shipped with Ubuntu 15.04, which ditto (and I feel safer there because I found the enabling configure flag in the rules file!).

When I run ./hiptext --sixel16 --spectrum, hiptext just hangs, consuming no CPU. Same for --sixel2 (or --sixel256).

I tried mlterm too, version 3.1.3, and it works after a fashion; only the color display is odd: monochrome works OK, --sixel16sorta-works but displays much less varied colors (it seems to have far fewer to play with) than without --sixel16, and --sixel256 displays just black.

I tried with the provided PNGs and got the same results.

saitoha commented 9 years ago

@rrthomas Thanks for your reporting. I'll try to reproduce it at the end of this week. Or can you try the following settings?

$ echo 'XTerm*allowWindowOps: true' >> ~/.Xresources
$ echo 'XTerm*decTerminalID: vt340' >> ~/.Xresources
$ echo 'XTerm*sixelScrolling: true' >> ~/.Xresources
$ echo 'XTerm*regisScreenSize: 1920x1080' >> ~/.Xresources
$ echo 'XTerm*numColorRegisters: 256' >> ~/.Xresources
$ xrdb ~/.Xresources
$ xterm -e 'printf "\033[4;480;640t" && hiptext --sixel16 --spectrum && cat'
rrthomas commented 9 years ago

Oh dear, my bad: I hadn't rebuilt hiptext, so I was running with an old version of sixel support. It works now as well as it does in mlterm.

There is one interesting thing about your instructions above: in README.md, it says to use -ti vt340, but that doesn't seem to be necessary.

(The strangeness of the colors remains, in xterm and mlterm.)

saitoha commented 9 years ago

Sorry for late response. I think sixel feature should be provided along with the image dithering feature. Now I'm working for it.

2015-07-13 23 03 29