Skip to main content

A Python library for converting images and videos into ASCII art.

Project description

🎨 simple-image2ascii - Convert Images & Videos to ASCII Art

Python NumPy OpenCV License

simple-image2ascii is a Python library that transforms images and videos into ASCII art using NumPy and OpenCV.


🚀 Installation

Install the library using pip:

pip install simple-image2ascii

🔧 Usage

📷 Convert Image to ASCII

import cv2
import simple_image2ascii

# Load an image
image = cv2.imread("example.jpg")

# Create an ASCIIEngine instance
engine = simple_image2ascii.ASCIIEngine()

# Convert to ASCII
ascii_art = engine.get_ascii(image)

# Print the result
print(ascii_art)

🎥 Convert Video to ASCII (Using OpenCV)

import cv2
import simple_image2ascii

cap = cv2.VideoCapture("video.mp4")
engine = simple_image2ascii.ASCIIEngine()

while cap.isOpened():
    ret, frame = cap.read()
    if not ret:
        break

    ascii_frame = engine.get_ascii(frame)
    print(ascii_frame)

cap.release()

🛠 Features

Grayscale conversionAdaptive ASCII mapping8×8 pixel block processingSupports image resizingWorks with both images and videos


📦 Dependencies

  • numpy
  • opencv-python

To install dependencies manually:

pip install numpy opencv-python

📜 License

This project is licensed under the MIT License.


✉ Contact

🐙 GitHub: AlekseyScorpi

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

simple_image2ascii-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

simple_image2ascii-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file simple_image2ascii-0.0.2.tar.gz.

File metadata

  • Download URL: simple_image2ascii-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for simple_image2ascii-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ebc728e4ef75dd1cd88aec0bdb3c9d4e4016a985fc3863fef199db60bc882bf8
MD5 61369ccea234d4e63ecd5e4f8946e154
BLAKE2b-256 8b01445fe1d36e7c493994588b9e563470a9916e3f5d351d878605c2ddccf528

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_image2ascii-0.0.2.tar.gz:

Publisher: python-publish.yml on AlekseyScorpi/simple-image2ascii

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

File details

Details for the file simple_image2ascii-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_image2ascii-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a94305c475804340ace5a697afbfcdecedd3f2ff172fca8c1112b37273a4f310
MD5 b89435126c13cf26d46a3279b49ee278
BLAKE2b-256 24ed410e5c611ce3a370a0e00e77d03afe4c63455e08f3e36d2f5d7b0b9c71cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_image2ascii-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on AlekseyScorpi/simple-image2ascii

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