• Stars
    star
    107
  • Rank 322,500 (Top 7 %)
  • Language
    C
  • License
    Other
  • Created almost 5 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

textmode supremacy

Derasterize

This program converts pictures into Unicode text with Ansi colors for display within a terminal. It performs lots of AVX2 optimized math to deliver the best quality on modern terminals with 24-bit color support, e.g. Kitty, Gnome Terminal, CMD.EXE, mintty, mlterm, etc.

Here's how it compares to the previous best, hiptext:

basicidea.c vs rasterize.c inside tmux using sample/snake.jpg

Not so bad considering the original image is:

original snake.jpg image

Getting Started

You just need cc and convert on the PATH. Windows users can get that from Cygwin, MSYS2, or WSL. Mac users can try Homebrew.

On Windows/msys2:

pacman -S msys/gcc mingw64/mingw-w64-x86_64-imagemagick
export PATH=$PATH:/mingw64/bin/

On Debian and Ubuntu:

apt-get install build-essential imagemagick

Then run:

./derasterize.c samples/lemur.png