7 ms·
Super neat. If you want to go even deeper down the terminal graphics rabbit hole you should look into adding sixel support. https://github.com/saitoha/libsixel
by dodslaser 4y ago
Super neat. If you want to go even deeper down the terminal graphics rabbit hole you should look into adding sixel support.
https://github.com/saitoha/libsixel https://github.com/saitoha/libsixel
- csdvrx 4y agoAnd for terminals that don't support sixel yet, sixel-tmux will let you see them: http://github.com/csdvrx/sixel-tmux http://github.com/csdvrx/sixel-tmux For example with Windows Terminal: https://raw.githubusercontent.com/csdvrx/sixel-tmux/main/examples/sixel-tmux-inside-windows-terminal.gif https://raw.githubusercontent.com/csdvrx/sixel-tmux/main/exa... OP, if you want to keep your current solution, check how going beyond unicode halfblocks can help: https://github.com/csdvrx/derasterize https://github.com/csdvrx/derasterize
- wing-_-nuts 4y agoThis is really cool. Is it supported on the framebuffer terminal as well?
- csdvrx 4y agosixel-tmux works literally anywhere you can use tmux: as long you can display unicodes on your terminal, the sixels will be "captured" by sixel-tmux and converted into something you can see. Sixels are in-band, so ssh isn't a problem. In a way, using sixel-tmux is like "giving magical goggles" to your terminal, to let it render sixels so you can see something (even if it isn't perfect), in the hope you'll be tempted to use a better terminal that will show you sixels in all their glory, with a pixel perfect quality. Sixels enable all kind of cool things, like gnuplot right in your terminal (cf https://github.com/csdvrx/sixel-gnuplot https://github.com/csdvrx/sixel-gnuplot ): sometimes I even watch youtube on my terminal lol sixel-tmux was made as a first step towards turning derasterize into a more general library: my plan was to add it to nnn but I got bored along the way and moved to other stuff. I might still do that I I love nnn as a filemanager. BTW, even if there have been quite a few interesting work by @hpa and others in the last 2 years, I think derasterize still has textmode supremacy. derasterize is a collab with @jart after I started adding features to her previous solutions which was based on half blocks like this solution; she's also made further work based on this like https://justine.lol/printimage.html https://justine.lol/printimage.html and https://justine.lol/printvideo.html https://justine.lol/printvideo.html
- jwilk 4y ago> as long you can display unicodes On Linux, virtual terminals are currently limited to 512 glyphs and 16 colors. You can't do much graphics with that, unless you bypass the terminal layer and write directly to the framebuffer, like w3mimg does.
- csdvrx 4y agoI should have been clearer: as long as you have a font which has entries for the glyphs used by derasterize and sixel-tmux - check the source and you'll see you don't need a lot of them.
- anthk 4y agoVT's but not XTerms. Also, framebuffer based VT's allow 256 colors with ease. On the font issue, yes, sadly you are right. It's retarded to just have 512 glyphs on a framebuffer, not a true tty. The framebuffer or KMS should support TTF fonts by default. A Unifont TTF would be godsend here.
- jwilk 4y agoSince Linux v3.16, the vt driver recognizes 256-color and even 24-bit escape sequences, but it maps the colors to the 16-color palette: https://git.kernel.org/linus/cec5b2a97a11ade5 https://git.kernel.org/linus/cec5b2a97a11ade5
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- KirillPanov 4y agolf-sixel changed my life: https://github.com/horriblename/lfimg-sixel https://github.com/horriblename/lfimg-sixel
- ck2 4y agoOh wow, I was going to ask about the one PDP-11 terminal we had in the 1980s with graphics support. I only had a vague memory it was huge, expensive and got very warm but in the 1980s there weren't any graphics like it, most high tech for the time. https://terminals-wiki.org/wiki/index.php/DEC_VT240 https://terminals-wiki.org/wiki/index.php/DEC_VT240