A package for all things ASCII rendering.
Project description
AsciiRenderer
This is a simple AsciiRenderer package for Python.
As of right now, it's primarily for images/videos through OpenCV (Matlike objects)
Basic Example:
import cv2 #OpenCV
from AsciiRenderer import AsciiRenderer
renderer = AsciiRenderer()
video_capture = cv2.VideoCapture(0)
while video_capture.isOpened():
is_ok, frame = video_capture.read()
if not is_ok:
break
ascii_frame = renderer.render(frame)
cv2.imshow("AsciiRenderer", ascii_frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
video_capture.release()
cv2.destroyAllWindows()
Parameters for AsciiRenderer Object:
- SHADE_MAP (str): The shade map of the ascii renderer. Goes from darkest to lightest. Default is "1237456980".
- CELL_WIDTH (int): How wide you want an individual cell to take up. Default is 10px.
- CELL_HEIGHT (int): How tall you want an individual cell to take up. Default is 10px
- FONT (int): Enum Code for an OpenCV Font. Please use the following:
- cv2.FONT_HERSHEY_SIMPLEX,
- cv2.FONT_HERSHEY_PLAIN,
- cv2.FONT_HERSHEY_DUPLEX,
- cv2.FONT_HERSHEY_COMPLEX,
- cv2.FONT_HERSHEY_TRIPLEX,
- cv2.FONT_HERSHEY_COMPLEX_SMALL,
- cv2.FONT_HERSHEY_SCRIPT_SIMPLEX,
- cv2.FONT_HERSHEY_SCRIPT_COMPLEX
Roadmap:
- Add support for Ascii Rendering into a string.
- Make the package useful outside of OpenCV
- Allow custom fonts.
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
asciirenderer-0.0.1.tar.gz
(3.3 kB
view details)
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 asciirenderer-0.0.1.tar.gz.
File metadata
- Download URL: asciirenderer-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81dc2a0410ab67624abcc8a4c41430493d780c0cb2de59f42fa0c775d6f64c4e
|
|
| MD5 |
17471d0d00fb1b643b579828d017f2be
|
|
| BLAKE2b-256 |
675386a68e6f3e203d160fb2b7141bd8957ea420a5596966c119da62de9fce81
|
File details
Details for the file asciirenderer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: asciirenderer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b495844b8b64c4bcbd438f0f46d1fd0a393334b46787b8612a047800b0484f2b
|
|
| MD5 |
6be7f8b8ac0531475bd7490a7060cf3e
|
|
| BLAKE2b-256 |
d5b0edae9b127c8548a4b425e6a5d1dc2eb837729ddcee480e750d4ca51dd6f1
|