Convert images into ASCII art in Python
Project description
letter-art
Convert images into ASCII art with adjustable resolution and output format.
A simple and fun Python library to turn your images into terminal-ready retro text art.
Installation
pip install letter-art
Features
Convert any image to ASCII text art
Customizable width and height
Choose to print the result or save as .txt file
Minimal dependencies (Pillow only)
Quick Start
from letter_art.converter import convert_image_to_ascii
# Basic usage: terminal output
convert_image_to_ascii("sample.jpg", width=100, height=50, output="print")
# Save to a file
convert_image_to_ascii("sample.jpg", width=120, height=60, output="file", output_path="ascii_output.txt")
⚙️ Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
image_path |
str |
(required) | Path to input image |
width |
int |
100 |
Width in characters, not pixels |
height |
int |
calculated | Height in characters (optional) |
output |
str |
"print" |
"print" for terminal, "file" for saving to .txt |
output_path |
str |
"output.txt" |
Path to output .txt file if output="file" |
Example CLI Interaction
$ python test_ascii.py
출력 방식을 선택하세요 (print / file): file
저장할 파일명을 입력하세요 (예: result.txt): ascii_art.txt
✔ ASCII 아트가 ascii_art.txt에 저장되었습니다.
Recommended Images
High contrast images
Portrait-style or logos
Grayscale-friendly designs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file letter_art-0.1.5.tar.gz.
File metadata
- Download URL: letter_art-0.1.5.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27e31a63ed62f3744f14a7ac38c76fc45a753f7ed7a515a20525ba910a6aa30e
|
|
| MD5 |
746e6ffb76085db1b17872db6a162a0e
|
|
| BLAKE2b-256 |
dc5ea277033f940f882affa063f6824f2974025f4d142019e123aa0ea0a0e9a4
|
Provenance
The following attestation bundles were made for letter_art-0.1.5.tar.gz:
Publisher:
python-publish.yml on gwondoo/letter_art
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
letter_art-0.1.5.tar.gz -
Subject digest:
27e31a63ed62f3744f14a7ac38c76fc45a753f7ed7a515a20525ba910a6aa30e - Sigstore transparency entry: 220218801
- Sigstore integration time:
-
Permalink:
gwondoo/letter_art@f6faa1328dab03695df68d8cb0f71866dae593bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gwondoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f6faa1328dab03695df68d8cb0f71866dae593bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file letter_art-0.1.5-py3-none-any.whl.
File metadata
- Download URL: letter_art-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e17784e571de19722eb18a70b796cf22d8d015fc9fa9e499b3c1cafc6e2fdc9d
|
|
| MD5 |
1fbc708967b7d960b9b66ff389f71d9d
|
|
| BLAKE2b-256 |
9f6258fea828ef50bd8a7cccb45b99e6b29e910d1d15e26cee78857bb210adde
|
Provenance
The following attestation bundles were made for letter_art-0.1.5-py3-none-any.whl:
Publisher:
python-publish.yml on gwondoo/letter_art
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
letter_art-0.1.5-py3-none-any.whl -
Subject digest:
e17784e571de19722eb18a70b796cf22d8d015fc9fa9e499b3c1cafc6e2fdc9d - Sigstore transparency entry: 220218802
- Sigstore integration time:
-
Permalink:
gwondoo/letter_art@f6faa1328dab03695df68d8cb0f71866dae593bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gwondoo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f6faa1328dab03695df68d8cb0f71866dae593bc -
Trigger Event:
push
-
Statement type: