Skip to content

Simple CV2 Python code for converting an image to an ASCII text file

License

Notifications You must be signed in to change notification settings

a13xe/ImgToASCII

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

🔨 Installation:

  • Just download this release exe file.
  • Or run in the python compiler with required lib:
pip install opencv-python

🕹 Usage:

  • Open Image: Click the "Open Image" button to choose an image file from your disk. The selected image will be displayed in the app.
  • Width: Enter the desired width for the output ASCII art in the "Width" entry box. The app will automatically calculate the appropriate height to maintain the aspect ratio.
  • Show Result: After selecting an image and entering the desired width, click the "Show Result" button to generate the ASCII art from the image. The ASCII art will be displayed in the text box below.
  • Copy to Clipboard: If you want to copy the ASCII art to your clipboard, click the "Copy to Clipboard" button. The ASCII art will be copied, and you can paste it into other applications.

📜 Note:

The app uses a predefined set of ASCII characters to represent different pixel intensity levels. You can modify the ASCII_CHARS list in the code to use different characters for the conversion.