Skip to main content

Image thumnail print on terminal using text

Project description

imgdot

We generate image to text on terminal
It is made for linux server to show image.
When we want to see image on python  linux server, 
we have to save image or use jupyter notebook.

To see thumnail of the image, we can use cv2.imshow in local environment.
However, it is impossible for server ssh terminal.
It is simple thumnail printer using python.

How to use

Git cloning on your repository

pip install dotshow

import package on python

load our own package

from dotshow import loadshow
dotshow(<img-path>)

cv2 version

import cv2
from dotshow import dotshow
img = cv2.imread(<img-path>)
thumshow(img) # run the code

PIL Image version

import numpy as np
from PIL import Image
from dotshow import dotshow
img = np.array(Image.open(<img-path>))
thumshow(img) # run the code

Parameters

loadshow(
    gray = True[default / bool]
    size = 7 [default / 0 ~ 10]
)
dotshow(
    gray = True[default]
    size = 7 [default / 0 ~ 10]
)

gray - if your image is not interpretable, give gray parater False
size - if your image is too big in your terminal, reduce size using this parameter

when you use low size parameter, image will undersampled too much 
and it will decrease image quality.

Example

We can print images like down below.
before after before after

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

dotshow-0.0.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

dotshow-0.0.2-py3-none-any.whl (4.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