A Python script that converts images into ASCII art using NumPy.
This program transforms regular images (.jpg, .png) into text-based art using ASCII characters like @, #, *, .. The output can be viewed in a terminal or saved to a text file.
- Place your image in the
project/op&ipfolder - Run:
python ascii_art_generator.py - Find the output in
project/op&ip/output_art.txt
numpy/
│
├── project/
│ ├── ascii_art_generator.py
│ └── op&ip/
│ ├── output_art.txt
│ ├── output_art_1.txt
│ ├── output_art_2.txt
│ ├── sample.jpeg
│ ├── sample_1.jpeg
│ └── sample_2.jpeg
│
└── README.md
- Image Loading: Uses PIL to load image into NumPy array
- Grayscale Conversion: Applies RGB weights (0.2989R + 0.5870G + 0.1140B)
- Downsampling: Reduces image size for terminal display
- ASCII Mapping: Maps pixel values to ASCII characters
- Output Generation: Saves result to text file
- Configurable downsampling factor
- Customizable ASCII character set
- Supports common image formats
- Efficient NumPy-based processing
- Python 3.x
- NumPy
- Pillow (PIL)

