skillfed

ascii-magic

Converts pictures into ASCII art

ascii-magic v2.7.5 527.0K downloads/30d#6,172 on PyPI175
Permissive license MIT Active released

What it is and what it does

ASCII Magic wraps Pillow to convert images into ASCII art—text-based representations using characters to approximate image tone and detail. It loads images from files, URLs, the clipboard, or generates them via Gemini or SwarmUI, then renders them to the terminal with optional colors, to HTML files, or to image files with styled text overlays.

The package centers on the AsciiArt class, which exposes methods like to_terminal(), to_html_file(), and to_image_file() with parameters to control output appearance (columns, colors, monochrome mode, width ratio). It also supports optional image enhancement before conversion. The module exposes both class methods and module-level functions for convenience.

Use it for:

  • Display images in terminal environments where graphics are unavailable or impractical.
  • Generate ASCII art previews of images for web pages or documentation.
  • Create styled text-art images with custom fonts and backgrounds using to_image_file().
  • Integrate AI-generated images (via Gemini or SwarmUI) directly into ASCII art workflows.
  • Test image processing pipelines by converting outputs to ASCII for quick visual inspection.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts images into ASCII art for display in terminals and HTML, supporting multiple image sources including files, URLs, clipboard, and AI-generated images via Gemini or SwarmUI.

Yes. Low install friction, active maintenance, MIT license, no known vulnerabilities, and a clear single-purpose design make it a safe choice. Install if you need to render images as ASCII art in terminals or HTML; skip if you only need static image manipulation (use Pillow directly instead).

Install

ascii-magic on PyPI

pip

pip install ascii-magic

uv

uv add ascii-magic

poetry

poetry add ascii-magic

Installing ascii-magic

Before you install

Low install friction with a single runtime dependency (Pillow). Actively maintained with recent releases; last update in April 2026 with code refactoring and Python 3.6+ compatibility improvements.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both personal and commercial projects.

Quickstart

pip install ascii_magic

from ascii_magic import AsciiArt

my_art = AsciiArt.from_image('moon.jpg')
my_art.to_terminal()

Requires Python 3.6 or later. On Windows, colors may not display without Colorama; call colorama.init() before printing if needed.

Verify before relying

  • Whether Gemini and SwarmUI integrations require additional dependencies or API setup beyond what the fact sheet indicates.
  • Performance characteristics when processing large images or generating ASCII art with many columns.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — Pillow
Maintenance actively maintained — 124 days since the last release
Last repo commit
First released
Downloads 526,979/month — #6,172 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ascii_magic-2.7.5-py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

image to ascii art converterterminal ascii art generatorconvert image to text artascii art from imagehtml ascii art renderingtext-based image display
ascii-artimage-processingterminal-ui

More Graphics packages