Skip to main content

Convert images to ASCII art

Project description

pyimg2asciii

Convert images into ASCII art with a simple Python library.


📦 Installation

pip install pyimg2asciii

🚀 Usage

Example 1: Print ASCII art in terminal

from pyimg2asciii import convert_image_to_ascii

# Convert image to ASCII
ascii_art = convert_image_to_ascii("input.jpg", new_width=80)

# Print result
print(ascii_art)

Example 2: Save ASCII art to file

from pyimg2asciii import convert_image_to_ascii

ascii_art = convert_image_to_ascii("input.jpg", new_width=100)

with open("ascii_output.txt", "w") as f:
    f.write(ascii_art)

⚙️ Parameters

  • image_path (str) → Path to input image.
  • new_width (int, optional) → Width of ASCII art (default: 100).

🖼 Example Output

If you run the library on an image, you’ll get ASCII art like:

@@@@@@@@@@%%%%###****
@@@@@@%%%%####***+++
@@@%%%####***++++=--

📜 License

MIT License © 2025

Created by D.Abhiram

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

pyimg2ascii-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

pyimg2ascii-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pyimg2ascii-0.1.1.tar.gz.

File metadata

  • Download URL: pyimg2ascii-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pyimg2ascii-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bcacff5a50eb6d408722f3bbda6279b1e431e15555953ba490d9453e6dacbc1c
MD5 2206d761ae4bf4ef4ba1d4cfb003b080
BLAKE2b-256 68fd16be487fcbac8ea22e9476384a8c70dab2a9bb5264ab12b97f71ad4664f2

See more details on using hashes here.

File details

Details for the file pyimg2ascii-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyimg2ascii-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pyimg2ascii-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 761bff3f5d4a4bb419cd526b4c697ab092999f73aa51c27e027215f8cbf1b8b9
MD5 0b5cba7b52f4b402deba80faf5b1f6a4
BLAKE2b-256 f6ec2b8c64004c9c0041cf3acbf556e574885cc8416b9fd595ae1ea1c6d2fd5b

See more details on using hashes here.

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