Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 607 Bytes

README.md

File metadata and controls

32 lines (27 loc) · 607 Bytes

ImgToAscii

Install and Import the module :

Installing the module :

~ git clone https://github.com/gabriel-dahan/img-to-ascii/
~ cd img-to-ascii/

# Linux / MacOS
~ python3 -m pip install -U .

# Windows 
~ py -3 -m pip install -U .

Consider using the --user parameter if you're not a root/admin user.

Importing the module :

import imgtoascii

Output ASCII to a text file

img = imgtoascii.Img('example.png')
img.to_ascii(out_file = "example.ascii.txt")

Print ASCII

img = imgtoascii.Img('example.png')
text = img.to_ascii()
print(text)