Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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.

About

Display any image in your terminal

Resources

Releases

No releases published

Packages

No packages published

Languages