Skip to content

Yet another image to ASCII art generator. Made in Python. File support: .jpg, .png, .bmp, .gif.

Notifications You must be signed in to change notification settings

xyldxal/image-to-ascii

Repository files navigation

Image to ASCII Generator

By Marxel Abogado

Features

  • Convert images to ASCII art
  • Supported file types: .png, .jpg, .jpeg, .bmp, .gif
  • Optional background removal and color support
  • Animation support for .gif files
  • Custom characters and pattern mode
  • Export output formats: .txt, .html, .md, .gif

Instructions

# Clone repository
git clone https://github.com/xyldxal/image-to-ascii.git

# Install dependencies
pip install -r requirements.txt

Usage

Command Line Interface

Basic usage

python main.py path/to/img.jpg

With options

# Custom width
python main.py path/to/img.jpg --width 150

# Custom characters
python main.py path/to/img.jpg --chars "MARX"

# Remove background
python main.py path/to/img.jpg --remove-bg

# Color modes: foreground, background, both
python main.py path/to/img.jpg --color both

# Save to file
python main.py path/to/img.jpg --output art.txt

Options

Option Description
--h, --help Show help message and exit
--width Width of ASCII art
--chars Custom characters for ASCII conversion
--remove-bg Remove background
--output Output file path
--color {none,foreground,background,both} Color mode for ASCII art
--fps Frames per second for GIF animation
--format Output format

About

Yet another image to ASCII art generator. Made in Python. File support: .jpg, .png, .bmp, .gif.

Topics

Resources

Stars

Watchers

Forks

Languages