November 2, 2024

ASCII art looks pretty awesome as it only uses text characters to form an image. Here is a command-line cool tool that can directly convert images into colorful ASCII art and display it in the Terminal: img2txt.

image converted to ASCII art using img2txt

To install and use it in Linux Mint/Ubuntu:

Open Terminal and first install caca-utils

sudo apt install caca-utils

installing img2txt in Linux Mint

Next, install the img2txt package and its dependencies:

sudo apt install img2txt

Once installed, it is now ready to convert images to text art.

Using it is easy, simply specify the path of the source image to be converted:

img2txt imagepath

specifying an image path for converting image to ASCII art using img2txt

This example uses an image located in the Pictures folder of the Home directory for processing.  (The ~ is a short form for /home/username. So in this example, the image path is /home/avp/Pictures. You can download a list of most commonly used Linux commands from here.)

sample source image to be converted to ASCII art using img2txt

img2txt converts this as a text art and displays it in the Terminal.

image converted to ASCII art using img2txt in Linux Mint

You can also set custom dimensions for the processing by using the width and height parameters (-W and -H). Specify the required image dimensions:

img2txt -H dimension -W dimension imagepath

specifying custom width and height for source image to be converted to ASCII art using img2txt

There are other parameters too like changing the brightness, contrast and more. All of these can be used, also to get an idea of the overall img2txt syntax, use the man command:

man img2txt

man page for img2txt

Pretty cool and the ASCII art looks awesome too. Also, check out some other cool tools like cmatrix and hollywood that can make your Terminal a lot more fun to look at.

All done.

By admin

Related Post

One thought on “Convert Images To Cool ASCII Art Using This Command Line Tool In Linux Mint/Ubuntu”
  1. ÃŽâ„¢’d perpetually Ñ¡ant to be update on neá´¡ posts on thÑ–s web site, saved tо
    bookmarks!

Comments are closed.