Skip to main content

Display images in the terminal

Project description

Img

Display Images in your terminal with python

Installation

The package can be installed via pip

pip install terminal-img

Quick Start

The library is really simple to get started with. Here's is an example of how you display an image

from image import DrawImage

image = DrawImage.from_file("image.png")
image.draw_image()

You can also use a url if you dont have the file locally stored

image = DrawImage.from_url("url")
image.draw_image()

The library can also be used with PIL images

from PIL import Image
from image import DrawImage

img = DrawImage(Image.open("img.png"))
img.draw_image()

CLI

img <file or url>

Methods

image.DrawImage

  • image: The PIL image
  • size(Optional[Tuple]) : The size of the image to be displayed. Default: 24, 24

image.DrawImage.from_file

  • filename: The name of the file containing the image
  • size(Optional[Tuple]) : The size of the image to be displayed. Default: 24, 24

image.DrawImage.from_url

  • url : The url of the image
  • size(Optional[Tuple]) : The size of the image to be displayed. Default: 24, 24

Special thanks to @AnonymouX47

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

terminal-img-0.0.3.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

terminal_img-0.0.3-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page