LinuxCommandLibrary

cacaview

Display images as colored ASCII art

TLDR

Display an image

$ cacaview [path/to/image]
copy

SYNOPSIS

cacaview [options] <image_file>

PARAMETERS

-h, --help
    Displays a help message and exits.

-v, --version
    Shows cacaview's version information and exits.

-f <driver>, --driver=<driver>
    Specifies the libcaca display driver to use (e.g., ncurses, x11, gl, stdout).

-a <algorithm>, --algorithm=<algorithm>
    Sets the rendering algorithm (e.g., ascii, block, braille, halfblock, dither).

-c <colors>, --colors=<colors>
    Defines the number of colors to use (e.g., 8, 16, 256, full).

-o <outfile>, --output=<outfile>
    Writes the generated character art to a file instead of displaying it in the terminal.

-s <size>, --size=<size>
    Scales the output to a specific width and height (e.g., 80x24, 120xauto).

--no-loop
    Prevents looping through multiple image files if more than one is provided.

--brightness=<value>
    Adjusts the image brightness (typically -1.0 to 1.0).

--contrast=<value>
    Adjusts the image contrast (typically -1.0 to 1.0).

--gamma=<value>
    Adjusts the image gamma (typically 0.0 to inf).

--dither=<value>
    Sets the dithering method (e.g., none, ordered, random).

DESCRIPTION

cacaview is a command-line utility that displays images directly within your terminal emulator by converting them into colorful ASCII art or block characters. It is a part of the libcaca library, which is designed to render graphical output using character-based methods. cacaview supports various common image formats and is ideal for quick image previews in a console environment, for systems without a graphical desktop, or for those who appreciate retro computing aesthetics. It provides an interactive mode for adjusting display parameters like brightness, contrast, and zoom.

CAVEATS

Performance can be limited by terminal speed, image size, and rendering complexity, especially over remote connections (SSH).
Color fidelity and detail are constrained by the terminal's capabilities and the character-based rendering approach.
Requires a terminal emulator that supports ANSI escape codes for proper color and cursor positioning.

INTERACTIVE MODE

When an image is displayed, cacaview offers interactive controls through keyboard shortcuts. Users can adjust brightness (B), contrast (C), gamma (G), zoom in (+ or Z), zoom out (-), pan with arrow keys, and reset parameters (R) to fine-tune the character art representation in real-time.

HISTORY

cacaview is an integral part of the libcaca project, initiated by Sam Hocevar. The libcaca library was conceived as a fast and modern alternative to older ASCII art libraries, aiming to provide a comprehensive low-level graphics framework that outputs character-based art rather than pixels. It was developed to support a wide range of features, including true color, various character sets, and different display drivers. cacaview serves as a straightforward command-line interface to demonstrate and utilize libcaca's powerful image rendering capabilities, bringing the art of character graphics to modern terminals.

SEE ALSO

libcaca(7), img2txt(1), cacademo(1), jp2a(1), aalib(7), catimg(1)

Copied to clipboard