A simple program that turns images into ASCII-art
-
Upload an image to the
imgdirectory. -
Update configs at the beginning of the script.
IMAGE_IN_PATH: path to original imageIMAGE_OUT_PATH: path to generated imageSTRATEGY: strategy to map RGB values to brightness (default = 1)- 1 = Average
- 2 = Luminosity
- 3 = Lightness
OUTPUT: whether to create a new image or print to terminal (default = 1)- 1 = Image
- 2 = Terminal
FONT_SIZE: font size of ASCII characters (default = 8)FONT: font family (default = DejaVuSansMono)MAX_WIDTH: maximum width allowed for conversion (default = 400)- If the image's width is greater than this value, image size is reduced
- Run the script.
python3 script.pyOriginal Image:
ASCII Image:
Inspired by: Robert Heaton's Programming Projects For Advanced Beginners

