This project is a simple image renderer that takes an image file, resizes it to a specified quality, and then prints it to the console using colored ASCII block characters.
- Image to ASCII: Converts standard image files into a terminal-based representation.
- Color Support: Uses
coloramato render the image with 24-bit RGB colors. - Custom Quality: Easily adjust the output width of the rendered image.
Make sure you have Python 3 installed on your system.
-
Clone the repository:
git clone https://github.com/joe-huber/a-pretty-bad-renderer.git cd a-pretty-bad-renderer -
Install the required dependencies:
pip install numpy colorama matplotlib pillow
-
Add your image:
- Place the image you want to render inside the
images/directory.
- Place the image you want to render inside the
-
Configure the script:
- Open
main.pyand update the following variables:image_path: Set this to the path of your image (e.g.,"images/my-image.png").quality_x: Adjust this number to control the width (in characters) of the output image.
- Open
-
Run it:
python3 main.py
You will see your image rendered in the terminal!
.
├── main.py # Main script to run the renderer
├── image_loader.py # Handles loading the image file
├── develop_modified_image.py # Core logic for image resizing
├── color_print.py # Handles the terminal output
├── images/ # Directory for your images
└── README.md # You are here!
This project is licensed under the MIT License. See the LICENSE file for details.
