RameshAditya / asciify

Convert any image into ASCII Art.
1.14k stars 166 forks source link

Creating png from text #5

Closed ppedra closed 5 years ago

ppedra commented 5 years ago

Pillow had a method to draw text. I used it to draw over a black image. I struggled a bit with the size of the new image but, in the end, the result end up quite nice. Maybe we can find better ways to set the size. You can easily create a larger image than the original if you change the pixel_per_lines parameter for something larger than the original image width.

Speaking of which, i also put another params in the runner method. def runner(path, revert_colors = False, ascii_char_per_line=100): right now is not acessible from the terminal, but i'm planning to use Click to do this later.