Display any image in your terminal
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
.gitignore
README.md
example.jpg
img2term

README.md

img2term

Display any image in your terminal, using ANSI color codes

Iron-Man

This is greatly inspired by catimg. catimg is way faster, but it did not handle the .ico files so I wrote my own version in Ruby. It handles any filetype convert (ImageMagick) can handle.

How does it work?

I use the output of convert ./path/to/file.jpg txt:- to get the list of all pixels in the file with their rgb value. I then convert the rgb values to ANSI codes and display them.

I also use the special UTF8 character to display two pixels at once (the top one uses the background color and the bottom one the foreground color) to keep the ratio. If the file is too big to be displayed in the terminal screen, it will resize it first.