A Python library for converting images and videos into ASCII art.
Project description
🎨 simple-image2ascii - Convert Images & Videos to ASCII Art
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 conversion ✅ Adaptive ASCII mapping ✅ 8×8 pixel block processing ✅ Supports image resizing ✅ Works with both images and videos
📦 Dependencies
numpyopencv-python
To install dependencies manually:
pip install numpy opencv-python
📜 License
This project is licensed under the MIT License.
✉ Contact
🐙 GitHub: AlekseyScorpi
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebc728e4ef75dd1cd88aec0bdb3c9d4e4016a985fc3863fef199db60bc882bf8
|
|
| MD5 |
61369ccea234d4e63ecd5e4f8946e154
|
|
| BLAKE2b-256 |
8b01445fe1d36e7c493994588b9e563470a9916e3f5d351d878605c2ddccf528
|
Provenance
The following attestation bundles were made for simple_image2ascii-0.0.2.tar.gz:
Publisher:
python-publish.yml on AlekseyScorpi/simple-image2ascii
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_image2ascii-0.0.2.tar.gz -
Subject digest:
ebc728e4ef75dd1cd88aec0bdb3c9d4e4016a985fc3863fef199db60bc882bf8 - Sigstore transparency entry: 190118943
- Sigstore integration time:
-
Permalink:
AlekseyScorpi/simple-image2ascii@8d2b12bbab5cdfa35e6e575b8fe90667cad37171 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/AlekseyScorpi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8d2b12bbab5cdfa35e6e575b8fe90667cad37171 -
Trigger Event:
release
-
Statement type:
File details
Details for the file simple_image2ascii-0.0.2-py3-none-any.whl.
File metadata
- Download URL: simple_image2ascii-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.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 |
a94305c475804340ace5a697afbfcdecedd3f2ff172fca8c1112b37273a4f310
|
|
| MD5 |
b89435126c13cf26d46a3279b49ee278
|
|
| BLAKE2b-256 |
24ed410e5c611ce3a370a0e00e77d03afe4c63455e08f3e36d2f5d7b0b9c71cb
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_image2ascii-0.0.2-py3-none-any.whl -
Subject digest:
a94305c475804340ace5a697afbfcdecedd3f2ff172fca8c1112b37273a4f310 - Sigstore transparency entry: 190118944
- Sigstore integration time:
-
Permalink:
AlekseyScorpi/simple-image2ascii@8d2b12bbab5cdfa35e6e575b8fe90667cad37171 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/AlekseyScorpi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8d2b12bbab5cdfa35e6e575b8fe90667cad37171 -
Trigger Event:
release
-
Statement type: