-
Notifications
You must be signed in to change notification settings - Fork 307
ASCII Art
aryan edited this page Jul 25, 2021
·
8 revisions
image_to_ascii_art(img_path: str, output_file: str = "pywhatkit_asciiart") -> str
This is used to convert an Image to an ASCII Art form that is stored in a text file.
If the image that you want to convert is stored in the same directory where the python file is stored you can just pass the name of the file.
If it is in another directory then you need to give the full Path to the file.
Same Directory: pywhatkit.image_to_ascii_art("Example.png")
Different Directory: pywhatkit.image_to_ascii_art("C:\\Example\\Example.png")
By default, the output is stored in pywhatkit_asciiart.txt
, but you can change the output filename with
pywhatkit.image_to_ascii_art("Example.png", "filename")
PyWhatKit Version 5.2