ASCIIpy is a simple to use command line tool that helps you to convert an input image into ascii art. For the moment the scrip will print the ascii art to the console (dependent on your src image size you might need to change the text size to something very small if you want to view it in the console) and generate a html and jpg file containing the ascii art all at once for every file you call it with. But I will look into a way how you can call the scrip with some more specific task and more options at hand
- Download the ASCIIpy-master.zip from here and unzip it into a location of your liking. I will refer to this location as
home folder
from now on. - Place the images you want to convert into the
in
folder inside thehome folder
- Open the terminal and move into the the
home folder
. - Install the dependencies.
> pip install -r requirements.txt
Run the ascii.py
script
> python ascii.py [-h] [-m CONVERSION_MODE] [--rainbow] [--no-console] image
where
- image is the full name of a file in the
in
folder for examplecar.jpg
- CONVERSION_MODE is the way the RGB color values are converted to a single brightness value for each pixel. At the moment this script supports
lum
inosity,avg
orlight
ness. The method that gives the best overall results imo islum
but it might be worth trying the others if you're not okay with the end result. - The --rainbow argument doesn't do anything at the moment. Image will be in grayscale HTML in color by default.
The output html and jpg files will be written to the out
folder and are named the same as the input file