Skip to main content

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.

Metadata

Release files for AsciiRenderer 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AsciiRenderer 0.0.1
File Size Uploaded
asciirenderer-0.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AsciiRenderer 0.0.1
File Interpreter ABI Platform
asciirenderer-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / asciirenderer-0.0.1.tar.gz

Download URL asciirenderer-0.0.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81dc2a0410ab67624abcc8a4c41430493d780c0cb2de59f42fa0c775d6f64c4e
BLAKE2b-256 checksum
How to use checksums
675386a68e6f3e203d160fb2b7141bd8957ea420a5596966c119da62de9fce81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / asciirenderer-0.0.1-py3-none-any.whl

Download URL asciirenderer-0.0.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b495844b8b64c4bcbd438f0f46d1fd0a393334b46787b8612a047800b0484f2b
BLAKE2b-256 checksum
How to use checksums
d5b0edae9b127c8548a4b425e6a5d1dc2eb837729ddcee480e750d4ca51dd6f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page