-
Notifications
You must be signed in to change notification settings - Fork 308
ASCII Art
Ankit Raj Mahapatra edited this page May 2, 2021
·
8 revisions
Function: image_to_ascii_art(imgpath: str, output_file: str = "pywhatkit_asciiart.txt") -> 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("Me.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.txt')
PyWhatKit Version 5.2