3 ms·
I recently found out that XTerm supports sixels natively if started with the "-ti 340" option. For example gnuplot can make use of that feature using the comman
by sprash 6y ago
I recently found out that XTerm supports sixels natively if started with the "-ti 340" option. For example gnuplot can make use of that feature using the command "set terminal sixlegd".
It turns out because of the way sixels are encoded (six vertical pixels in a row using bitplanes) it packs better than png when used in conjunction with the bzip2 packer. Every image can simply be encoded to sixel with imagemagick using "convert image.png sixel:- > image.six"
Personally I think sixels are genius should be used much more often.
- petepete 6y agoGNUPlot and XTerm also support Tektronix, there's lots of info in this older discussion. https://news.ycombinator.com/item?id=7776904 https://news.ycombinator.com/item?id=7776904
- mongol 6y agoThe Kitty terminal author also published a "terminal graphics protocol". I don't know what other terminal supports it, however. https://sw.kovidgoyal.net/kitty/graphics-protocol.html https://sw.kovidgoyal.net/kitty/graphics-protocol.html
- dTal 6y ago>it packs better than png when used in conjunction with the bzip2 packer. Cute! But is it fair? I don't think it's lossless - the color depth is much reduced.
- sprash 6y agoI took the reduced color depth into consideration. However on second glance it seems like Imagemagick does not compress PNG very efficiently with default settings. After recompressing with zopflipng PNG was easily able to beat bzip2 packed sixels. Results for 256 color 512x512 Lenna: Sixel + bzip2: 245K PNG Imagemagick: 467K PNG Zopfli 10 Iterations: 188K
- brutt 6y agoSixels will be added to libvte (gnome-terminal): https://gitlab.gnome.org/GNOME/vte/-/issues/254 https://gitlab.gnome.org/GNOME/vte/-/issues/254
- iso-8859-1 6y agoGreat news! I think we may finally see a resurgence. It will be well supported on mainstream Linux, and given that the web is getting so heavy-weight, this will offer a solid alternative for graphics that you can rely on. Libvte is very popular.
- leephillips 6y agoThat should be "sixelgd", of course. And there is the classic "dumb" terminal, that plots to any text terminal, optionally using ansi escape codes for color.
- iso-8859-1 6y agoI used your ImageMagick command, but the resulting image is very bright and almost invisible. I tried disabling Unicode using +u8, but that didn't work. I tried mlterm, that worked.
- sprash 6y agoI forgot to tell that you have to enable 256 colors as well. Put this into your .Xresources: XTerm.*.decTerminalID: vt340 XTerm.*.numColorRegisters: 256 And refresh with xrdb -merge $HOME/.Xresources It should work now.