Skip to content

kfei/img2xterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

img2xterm

Demo

This project was originally a fork from rossy/img2xterm with:

  • Image auto fit to terminal
  • Support for displaying in B/W mode
  • Cowfile-related code deleted

You may also be interested in the Golang version.

Dependencies

Before compilation, make sure you have the development packages of ImageMagick and Ncurses (for terminfo support).

  • Arch Linux: pacman -S imagemagick-doc ncurses
  • Debian/Ubuntu: apt-get install libmagickwand4 libncurses5-dev

Getting img2xterm

The GNU Autotools are not required. To compile and install from source, simply run:

make
make install

Usage

To display an image on a 256-color compatible terminal:

img2xterm image.jpg

Use CIE94 for color difference algorithm:

img2xterm -p image.jpg

Save image to file in grayscale:

img2xterm -b image.jpg outfile
cat outfile

More usage:

img2xterm -h

License

The MIT License (MIT)

Demo

IMAGE