Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

letter_art-0.1.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

letter_art-0.1.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for letter_art-0.1.5.tar.gz
Algorithm Hash digest
SHA256 27e31a63ed62f3744f14a7ac38c76fc45a753f7ed7a515a20525ba910a6aa30e
MD5 746e6ffb76085db1b17872db6a162a0e
BLAKE2b-256 dc5ea277033f940f882affa063f6824f2974025f4d142019e123aa0ea0a0e9a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for letter_art-0.1.5.tar.gz:

Publisher: python-publish.yml on gwondoo/letter_art

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for letter_art-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e17784e571de19722eb18a70b796cf22d8d015fc9fa9e499b3c1cafc6e2fdc9d
MD5 1fbc708967b7d960b9b66ff389f71d9d
BLAKE2b-256 9f6258fea828ef50bd8a7cccb45b99e6b29e910d1d15e26cee78857bb210adde

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page