What is your preferred command line tool
Is there a command line program that can output ASCII art as an image?
Is there a command line program (for Linux) that can convert an image to ASCII art and then save that output as an image, e.g. B. jpg or png?
To illustrate what I need, I want to convert the following image to ASCII art
The output I want from a program should be similar to what was created from a screenshot of the output from an image-to-ASCII converter (the output was plain text).
I am aware that GIMP has the ability to save an image as ASCII graphic, and Aview can convert an image to ASCII as well. However, the former cannot be done from the command line, and the latter only allows you to view the output, not save it (I don't want to resort to a screenshot of the output).
I am also aware that libcaca can save its output in an image, but it only outputs colorful ASCII, like below.
Created by converting the source image to grayscale and then using the following command:
The reason I wanted a command line utility is to batch process a folder full of images.
You can use this Python code I created to create ASCII graphics from still images and videos:
ASCII art edition ()
If you're running Linux, you can simply put the applications together to get the result you want. This can then also be built into your batch script.
The following example uses jp2a, a powerful JPG-ASCII converter with many options to achieve the desired results (see man page). Then we process the resulting ASCII text file using the Conversion from the ImageMagick suite to an image. Here, too, there are many ways to optimize the result. Both applications are likely available in your distribution's repositories.
The following example script creates an ASCII image from an entered JPEG image (format depends on the extension we specified, is for JPEG). The source is rendered to a width of 160 characters at 6 pt. This then simply fits to the standard page size as it was predefined during the conversion.
の ｂ る し ｔｔ ぱ ん ん ｋ
In Node.js Knockout 2012 there was a successful submission that took a webcam video feed and spat out an "ASCII feed":
Asciigram is a "productivity tool" that allows you to use your webcam to create ASCII videos and images. You can also create ASCII images by dragging images onto the page. [Shortcut]
It's not exactly the command line, but maybe you can upgrade it for your needs. The library that the image in ASCII is converted is called Jscii .
I use jp2a for ASCII art. Easy to use from the command line:
And can test results online at asciiconvert.com.
You seem to be using Linux and already know about libcaca. There is another library that does exactly what you say (Image to Ascii on the command line): Aalib.
There are many programs that do this. This works on both Linux and Windows. Does not use external libraries, full source code, etc.
- Why are nihilists not nihilistic about nihilism
- What are additional qualifications besides education
- Shameful bitch is necessarily bad
- Is the Naik surname Brahmin
- Who is the richest woman in Poland
- Why is moonlight white not yellow
- All Americans pay taxes
- What is the European Parliament
- Is Suga a faster rapper than Eminem
- What are some fascinating flag facts
- How many colors does EPS support
- How did Kasaragod become part of Kerala
- Was the Arab spring a failure?
- Where can I find a supplier for replica bags
- Is spoken in cities of Punjab Hindi
- In which countries is SuperStar BTS available?
- How airplane flies
- Extraterrestrial life undiscovered among us
- Is married to TV actress Hina Khan
- Is life made for enjoyment or for enlightenment?
- What is the story of Lagos
- Highly intelligent people are naturally more sensitive
- Killed people's natural selection
- How should we treat depressed people