Skip to content

GiulioRusso/Image2ASCII

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖼️ Image2ASCII

Image2ASCII is a simple Python command-line tool that converts image files into ASCII art and displays them in the terminal. It resizes the image, converts it to grayscale, sharpens and normalizes contrast, and finally renders it using a customizable ASCII character set.

📁 Project Structure

image2ascii/
├── images/              # Example images folder
├── image2ascii.py       # Main Python script
├── README.md            # Project documentation
└── requirements.txt     # Requirements

📦 Requirements

Install the required package with pip:

pip install -r requirements.txt

🎮 How to Run

Arguments:

Argument Type Description
image_path str Path to the input image file
--width int (Optional) Width of ASCII output (default: 100)

Run from terminal:

python image2ascii.py <path/to/image> --width=<width>

Example:

python image2ascii.py ./images/ginger.jpg --width=100

Supported formats are:

  • .png
  • .jpg
  • .jpeg
  • .bmp
  • .gif

Other formats will trigger an error message.

⚒️ Install as Global Command (Linux/macOS)

  1. Make the script executable:

    chmod +x image2ascii.py
  2. Move it to /usr/local/bin and rename if desired:

    sudo mv image2ascii.py /usr/local/bin/image2ascii
  3. Now you can run it like this:

    image2ascii path/to/image.jpg --width=100

📄 License

This project is released under the MIT License.

About

Image to ASCII converter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages