A small ASCII art conversion utility.
Project description
asciifite 🎨
asciifite is a high-performance Python library for converting images and videos into colorful ASCII art and generating creative text banners for CLI applications.
By leveraging NumPy vectorized operations, this library ensures that frame-by-frame conversion is significantly faster than standard Python loops.
🚀 Features
- Video-to-ASCII: Convert standard video files (.mp4, .avi, etc.) into colorful ASCII-style videos.
- Image-to-ASCII: Transform any digital image into a detailed, textured ASCII rendering.
- Creative Banners: Generate stylized, framed text banners using multiple "brush" styles (solid, thin, dotted).
- Aspect Correction: Automatically adjusts character density to maintain the original visual proportions.
📦 Installation
Ensure you have Python installed, then navigate to the project root folder and install via pip:
pip install .
🛠 Dependencies
The library relies on the following industry-standard packages:
- opencv-python: For media decoding and rendering.
- numpy: For high-speed image matrix processing.
📖 Usage Guide & Examples
1. Generating Creative Banners
Use the BannerGenerator class to create stylized headers.
from asciifite import BannerGenerator
bg = BannerGenerator()
banner = bg.generate("ABC", style="solid", frame=True)
print(banner)
2. Converting Videos to ASCII
The process_video function handles reading frames, conversion, and writing the final video.
from asciifite import process_video
process_video(
input_path="input.mp4",
output_path="output.mp4",
width=120,
cell_size=8
)
3. Converting Images
Turn any photo into an ASCII masterpiece with process_image.
from asciifite import process_image
process_image(
input_path="photo.jpg",
output_path="ascii.jpg",
width=150,
cell_size=10
)
⚙️ Configuration Options
- width: Number of ASCII characters across the output.
- cell_size: The pixel dimensions of each character block.
- charset: Choose between 'standard', 'complex', or 'blocks'.
📂 Project Structure
asciifite_project/
├── asciifite/
│ ├── __init__.py
│ ├── core.py
│ └── io.py
├── setup.py
└── README.md
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 asciifite-0.1.0.tar.gz.
File metadata
- Download URL: asciifite-0.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b992731f242edb4e4c7c1f77ce31c2efe2c9027a4747ef6a6baea2186bed14e1
|
|
| MD5 |
c5c5d28e1ed5c8f2e1121b2637cd432d
|
|
| BLAKE2b-256 |
02460a32e7e8d16b208a6df47d6e67ab5b1f19b63db73c34c41062c5776aef11
|
File details
Details for the file asciifite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: asciifite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f43bd7b88d8a0d8d7a0a12ea65b4d10dabe403ddefcd76c814bace8cc2f8911
|
|
| MD5 |
bedd219d4adfebd0a5b0f1519ffa2487
|
|
| BLAKE2b-256 |
a52d7ebd9535fa2030eb84f4a4f6a654cb20bea5876d2648ff9a00e5750fe99f
|