LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

chafa

terminal image viewer using character art

TLDR

Display image in terminal
$ chafa [image.png]
copy
Specify output size
$ chafa -s [80x40] [image.jpg]
copy
Use sixel graphics
$ chafa --format sixels [image.png]
copy
Use kitty graphics protocol
$ chafa --format kitty [image.gif]
copy
Limit colors
$ chafa --colors [256] [image.png]
copy
Display animated GIF
$ chafa --animate [animation.gif]
copy
ASCII only output
$ chafa --symbols ascii [image.jpg]
copy

SYNOPSIS

chafa [options] image...

DESCRIPTION

chafa converts images to character art for display directly in the terminal. It uses Unicode block characters, braille patterns, and ASCII art to approximate images at the resolution of the terminal grid.For terminals with advanced graphics support, chafa can output using the Sixel, Kitty, or iTerm2 graphics protocols, producing much higher fidelity results. It handles a wide range of image formats including JPEG, PNG, GIF (with animation), AVIF, SVG, WebP, TIFF, and JPEG XL.Output can be tuned by adjusting size, color depth, symbol sets, and animation speed. chafa automatically detects terminal capabilities and selects the best available output mode.

PARAMETERS

-s, --size WxH

Output size in characters
-f, --format format
Output format: symbols, sixels, kitty, iterm
-c, --colors n
Color mode: none, 2, 8, 16, 256, full
--symbols set
Symbol set: all, ascii, block, braille
--fg color
Foreground color
--bg color
Background color
--animate
Enable animation for GIFs
--duration secs
Animation duration
--speed factor
Animation speed multiplier
-w, --watch
Watch file for changes
--font-ratio ratio
Font width/height ratio

SUPPORTED FORMATS

JPEG, PNG, GIF, AVIF, SVG, TIFF, WebP, JPEG XL, QOI, XWD

INSTALL

sudo apt install chafa
copy
sudo dnf install chafa
copy
sudo pacman -S chafa
copy
sudo apk add chafa
copy
sudo zypper install chafa
copy
brew install chafa
copy
nix profile install nixpkgs#chafa
copy

CAVEATS

Output quality depends on terminal capabilities. Sixels require compatible terminal. Best results with Truecolor support.

SEE ALSO

catimg(1), timg(1), img2txt(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid