LinuxCommandLibrary

cacaview

Display images as colored ASCII art

TLDR

Display an image

$ cacaview [path/to/image]
copy

SYNOPSIS

cacaview [-options] [file]

PARAMETERS

-a, --ansi
    Force 8-color ANSI output instead of full color

-b, --blink
    Enable blinking characters for emphasis

-d DELAY, --delay=DELAY
    Set animation frame delay in milliseconds

-f FONT, --font=FONT
    Specify font name (use -l to list)

-g GEOMETRY, --geometry=GEOMETRY
    Set output width x height (e.g., 80x24)

-h, --help
    Display usage help and exit

-i, --identify
    Print file format and dimensions

-l, --list
    List all available fonts

-n, --no-dither
    Disable dithering for blocky output

-p PALETTE, --palette=PALETTE
    Select color palette (e.g., xterm)

-s, --sixels
    Output using SIXEL graphics protocol

-v, --version
    Show version information

-V, --view
    Interactive view mode (default)

DESCRIPTION

cacaview is a command-line utility from the libcaca library that renders images and animations directly in the terminal using colored ASCII art characters. It converts raster graphics into a mosaic of Unicode block elements or standard ASCII, applying dithering algorithms to approximate colors and gradients with remarkable fidelity.

Supporting a wide range of formats including PNG, JPEG, GIF (with animation), BMP, TIFF, and more via ImageMagick integration, cacaview excels at displaying images in text-only environments like SSH sessions or embedded systems. Users can customize output geometry, select fonts, adjust dithering modes, enable blinking effects, or even output in SIXEL format for compatible terminals.

The tool processes images by analyzing pixel data, mapping colors to a 256-color palette (or ANSI subsets), and selecting characters based on brightness and hue differences. This creates vibrant, retro-style artwork that's both lightweight and nostalgic. Ideal for low-bandwidth scenarios or fun demos, it handles resizing, cropping, and looping animations with specified delays.

Developed as part of the libcaca project, cacaview bridges graphical content to character-cell displays, making it popular among terminal enthusiasts, sysadmins, and those evading graphical dependencies.

CAVEATS

Requires a color-supporting terminal (e.g., xterm-256color). Large images may cause flicker or slow rendering on slow terminals. GIF animations loop indefinitely unless delayed. No stdin support for piped images.

EXAMPLES

cacaview photo.png
cacaview -g 120x40 -b animation.gif
cacaview -s -f bigfont image.jpg

DITHERING MODES

Uses ordered or error-diffusion dithering by default. Combine with -n for monochrome or palette-limited views.

HISTORY

Developed by Sam Hocevar as part of libcaca (Colored ASCII art library), first released in 2006. Evolved from earlier ASCII art tools, with major updates in libcaca 0.99.beta19 (2010s) adding SIXEL and better Unicode support. Maintained sporadically, integrated into many Linux distros via caca-utils package.

SEE ALSO

img2txt(1), jp2a(1), aacgain(1), caca-utils(7)

Copied to clipboard