Python Terminal Image Renderer
Project description
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', is8Bit=False)
image_path
: Path to the image that will be renderedwidth
: 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')is8Bit
: 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptir-1.0.2.tar.gz
(2.4 kB
view hashes)
Built Distribution
ptir-1.0.2-py3-none-any.whl
(3.5 kB
view hashes)