.oooo. .. ..
O00OOoO00O O0 0O
.00. .00
00. .o oO.O00 .OO000O. .O. OO .O000Oo .O0000o OO Oo
.0O O00... o0O .00. 00 .0o .0o o0o .0O. .00 00 0O
.0O O00000o O0o .O0o .0O 00 .0Oo. 00 . 00 0O
00 ....o0O O0. oO00OOO0. O0. o0. .o0000O. 00 00 0O
o0O .0O O0. 00. o0o 0O.0O . .00. 00 .o. 00 0O
o00o. ..O00o O0. 00. o00o o000 o0O .00 .0O. .00 00 0O
oO00000Oo o0. .O0OOOo.0o O0o .O0000O .O0000o OO 0o
0O
oO00
ooo
Grayscii is a small command line program that converts images to ascii art using user defined character palettes.
To run this program, you will need python 3 (tested on version 3.9.12).
It also requires the pillow image library, which can be installed using:
python -m pip install pillow
To convert and print an image in ascii, run:
python grayscii.py resources/earring.jpg
When printing directly to a terminal, most images will be too large to view properly. Fortunately, the output can be resized using -x and -y:
python grayscii.py resources/earring.jpg -x 75 -y 50
Custom ascii palettes can be specified with -p:
python grayscii.py resources/earring.jpg -x 75 -y 50 -p _-+=#@
And the output can be written to a file using -o:
python grayscii.py resources/earring.jpg -o earring.txt
run python grayscii.py -h
for more detailed usage information.
To run the unit tests for this program, navigate to tests/ and run py tests.py
earring.jpg was sourced from wikipedia