GitHub - Joe-Huber/a-pretty-bad-renderer: Renders a given image into colored text in your terminal! :) · GitHub
Skip to content

About

Renders a given image into colored text in your terminal! :)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

A Pretty Bad Renderer

A simple Python script to render images in your terminal.

License Issues Forks Stars


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.

Features

  • Image to ASCII: Converts standard image files into a terminal-based representation.
  • Color Support: Uses colorama to render the image with 24-bit RGB colors.
  • Custom Quality: Easily adjust the output width of the rendered image.

Getting Started

Prerequisites

Make sure you have Python 3 installed on your system.

Installation

  1. Clone the repository:

    git clone https://github.com/joe-huber/a-pretty-bad-renderer.git
    cd a-pretty-bad-renderer
  2. Install the required dependencies:

    pip install numpy colorama matplotlib pillow

Usage

  1. Add your image:

    • Place the image you want to render inside the images/ directory.
  2. Configure the script:

    • Open main.py and 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.
  3. Run it:

    python3 main.py

    You will see your image rendered in the terminal!

Project Structure

.
├── 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!

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Renders a given image into colored text in your terminal! :)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages