Skip to content

rr-/termi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termi

Images in your terminal, using ANSI and Unicode. Inspired by shellpic.

Examples

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:

Installing

  • sudo python3 setup.py install, or
  • yaourt -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:

20160505_004112_zqe

I decided to roll my own solution for reasons mentioned above, but also because it's fun!