img2txt
converts images to colored ASCII art, outputting text that reproduces
TLDR
Convert image with specific output width (columns)
SYNOPSIS
img2txt [options] image
DESCRIPTION
img2txt converts images to colored ASCII art, outputting text that reproduces the image using character patterns and terminal colors. It is part of the libcaca library, which provides ASCII art rendering.
The tool can produce output in various formats including ANSI terminal codes, HTML, IRC color codes, and plain text. The resulting ASCII art can be displayed in terminals or embedded in documents.
PARAMETERS
-W, --width COLS
Set output width in columns-H, --height LINES
Set output height in lines-x, --font-width PIXELS
Set assumed font width for aspect ratio-y, --font-height PIXELS
Set assumed font height for aspect ratio-b, --brightness VALUE
Adjust brightness (default 1.0)-c, --contrast VALUE
Adjust contrast-f, --format FORMAT
Output format (ansi, html, irc, etc.)
CAVEATS
Output quality depends on terminal capabilities and font characteristics. Wide characters or non-monospace fonts will distort the output. Color support varies by terminal emulator.
HISTORY
img2txt is part of libcaca, a graphics library for text terminals created by Sam Hocevar. The library was first released in 2003 and has been used in various projects including VLC media player for ASCII video rendering.
