NAME
ansipic - show images in the terminal as lines of text
SYNOPSIS
ansipic [options] file ...
-m#, --method=# method: kitty, or auto (default)
-w#, --width=# columns that an image may take (number or RPN)
-H#, --height=# rows that an image may take (number or RPN)
-t#, --types=# types of images shown: png,jpeg,gif (default)
--term=CxR:WxH size of the terminal and of a cell in pixels
--tty=# where the images are sent (default: /dev/tty)
-h, --help show help
-v, --version show version
VERSION
Version 0.01
EXAMPLES
ansipic logo.png
ansipic -w 2/ *.png | less -R
ansipic images/*.png | ansicolumn -c 2
DESCRIPTION

ansipic shows image files in the terminal, by Text::ANSI::Image. Each image is printed as lines of text: the cells of the image, which the terminal draws. The lines can be paged by less and put in columns by ansicolumn(1), as any other text.
PNG, JPEG and GIF files are shown. The image itself is sent to the terminal (/dev/tty), so the lines may go to a pipe or a file, and are shown when they come to the terminal. less needs LESSUTFCHARDEF=10EEEE:p (less 632 or later) to show them.
A file which is not shown is told on the standard error, and the status is 1.
OPTIONS
- -m name, --method=name
-
The method by which images are drawn:
kitty, the Unicode placeholders of the kitty graphics protocol (kitty, Ghostty and iTerm2 3.7.3 or later), orauto(the default), the first which the terminal supports. - -w n, --width=n
- -H n, --height=n
-
The most columns and rows that an image may take (default: the terminal width, and its height but four lines). An image is as large as its pixels, and not larger than that room.
The value is a number, or an RPN (Reverse Polish Notation) expression with the terminal width (for --width) or height (for --height) as the initial value: -w 2/ is half the width of the terminal, and -w 10- the width but ten columns. A
=before the value is taken away, as ansifold(1) takes the expression: -w=2/ is the same as -w 2/. - -t list, --types=list
-
The types of images shown, separated by commas:
png,jpegandgif(default: all). - --term=COLSxROWS[:WxH]
-
The size of the terminal, and of a cell in pixels. By default it is read from /dev/tty.
- --tty=file
-
Where the images are sent (default: /dev/tty).
- -h, --help
- -v, --version
SEE ALSO
Text::ANSI::Image, App::ansicolumn
AUTHOR
Kazumasa Utashiro
LICENSE
Copyright © 2026 Kazumasa Utashiro.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.