Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to convert Image into ASCII Art in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to convert images into ASCII art in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Do you know what ASCII is? It is a standard for assigning letters, numbers, and other characters to 256 spaces in an 8-bit code. ASCII Art is a graphic made up of printable ASCII characters. Basically, it is made up of a bunch of letters, numbers and special characters.

You may have seen someone display their distribution logo [2] in ASCII format, like this:

It's cool, right? How about converting an ordinary picture into ASCII art? This is the problem to be discussed in this article.

Ascii Image Converter

As the name implies, Ascii Image Converter [3] is a tool for converting pictures into ASCII art. It is a command-line-based tool written in the Go language that prints out the ASCII version of the image provided to it.

You may not recognize me, but the ASCII version of the picture below is me. That's my avatar of eight.

The tool supports input images in the following formats:

JPEG/JPGPNGBMPWEBPTIFF/TIF

Let's see how to install and use it.

Install Ascii Image Converter on Linux

This interesting tool can also be used on Windows, but I'm not going to do it. In this tutorial, let's stick with Linux.

If Snap [4] is enabled in your distribution, you can easily install its snap package with the following command:

Sudo snap install ascii-image-converter

You can also download the Linux executable from its release page and put the executable in the / usr/local/bin/ directory. This way, you can run it like a normal Linux command. If you want to know why, take a look at the Linux directory hierarchy [5].

Use Ascii Image Converter

It's easy to use. After installation, you only need to provide the path of the image you want to convert.

Ascii-image-converter path_to_image

You can also provide the URL of the picture and convert the picture into ASCII directly from the Internet.

This is my profile photo converted into ASCII format. I put my original photo here for your reference.

You can also convert it to color ASCII.

Ascii-image-converter-C path_to_image

You can convert multiple images to ASCII by providing their paths. It will print ASCII versions one after another on the terminal monitor.

There is also an option to save the generated ASCII art. In the old version, it was only saved as a text file, not an image. Developer Zoraiz Hassan has released a new version, and the tool now saves the generated ASCII images in PNG format by default.

Ascii-image-converter path_to_image-s. Thank you for reading! This is the end of the article on "how to convert images into ASCII art in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report