Daft Punk album cover
The GitHub logo
Demonstration of grayscale
As Ascii art:
Original:
- Converts the image to grayscale
- Resizes the image to have a width of 900px
- Takes a group of 9x20 pixels
Equal to the dimensions of a single character in my case (Using Consolas, 16pt)
- Takes the average brightness
- Matches the area to the letter whom's grayscale is the most similar
You need Python Pillow to run this script.
pip install Pillow
Convert.py -f "my/file/name.png"
-f
File to convert
-w
Width of output image in characters
-c
Add additional/Remove contrast [Default is 1, higher = more contrast]
-ea
Include extended ASCII range
-i
Inverts the image before converting
-b
Block certain characters from appearing in image Example: python Convert.py -f "my/file.png" -b "&" "Q"
May not work as well with fonts other than Consolas
Images that have extreme ratios (like 50:1) may not work