Images in your terminal, using ANSI and Unicode. Inspired by
shellpic
.
Running termi kurisu.png
in a terminal that supports 256 colors will result
in this:
If you're using one of true color capable
terminals, you can also run termi kurisu.png --depth=24
:
It works in dark terminals, too:
You can also use custom palettes if you want.
You can even use it to display GIF animations:
sudo python3 setup.py install
, oryaourt -S termi-git
in Arch Linux.
Differences to shellpic
- Quantization: while
shellpic
just maps the pixel color to keycodes on the fly,termi
tries to do better and quantizes the images to target palette as a separate step. This allows techniques such as dithering, which enhance visual quality. (This matters only for non-true-color output.) - Customizable palette: this can matter a lot;
shellpic
doesn't let you pass your own color palette,termi
does. With some effort, this enables you to improve color matching no matter what terminal you're on. - Smoother animations: animations do not produce ghost frame between the loops.
- Outright glitches: for some reason,
shellpic
renders a ghost line on my terminal on the right edge of the output.
To show most of problems mentioned above, here's what 256-color output from
shellpic
looks on my URxvt:
I decided to roll my own solution for reasons mentioned above, but also because it's fun!