Skip to main content

PTIR (Python Terminal Image Renderer)

Installation

pip install ptir

Usage

import ptir

image_path = ...

# Render the given image
ptir.render(image_path)

# Display entire 8-bit colour space
ptir.view8BitPalette()

# Display entire 24-bit colour space
ptir.view24bitPalette()

Documentation

  • ptir.render(image_path, width=100, height=100, interp_method='bilinear', c8bit=False)
    • image_path : Path to the image that will be rendered
    • width : The width of the output (will be 2 * width characters wide)
    • height : The height of the output (will be 2 * height characters tall)
    • interp_method : Rescale interpolation method (Either 'bilinear' or 'nearest_neighbour')
    • c8bit : If True the image will be rendered in 8-bit colour, if False the image will be rendered in 24-bit colour. Not all terminal windows support 24-bit colour (Visit this website for more information)

Dependencies

  • opencv-python

Metadata

Release files for ptir 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 ptir 1
File Size Uploaded Provenance Actions
ptir-1.tar.gz 2.5 kB Without provenance Details for ptir-1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ptir 1
File Interpreter ABI Platform Actions
ptir-1-py3-none-any.whl Python 3 none any Details for ptir-1-py3-none-any.whl

Total release size: 6.0 kB

Release files / ptir-1.tar.gz

Download URL ptir-1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7346b22cc9f45c29268409e85401c4d26e1d3ffb1db2c126aed8a8a0a81c1952
BLAKE2b-256 checksum
How to use checksums
3c5c6c3a3d6d712114b76a0d042ef4b79709a385d46f2a6c417020397b307c5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

Release files / ptir-1-py3-none-any.whl

Download URL ptir-1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfa2346d7c20c60d2b5b83d680d827c89a850e65eca4c17639245c0ff8ba91b2
BLAKE2b-256 checksum
How to use checksums
fbdd06d2301748e12a0ad47c923e766ef554337736d876348ac903c66fc95c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

Security for ptir 1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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