Skip to content
Display image, video or USB camera in your ANSI terminal!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
RemarkablePalatableKob.webm
dog.jpg
img_term.py
lena.jpg
screenshot.png
screenshot2.png

README.md

Image 2 ANSI

Converts an image to a representation in ANSI

Installation

  1. Copy the repository
  2. Run:
pip install opencv-python numba numpy

Usage

usage: img_term.py [-h] [-img IMG] [-width WIDTH] [-cam CAM] [-col {4,8,24}]

Display image to terminal

optional arguments:
  -h, --help     show this help message and exit
  -img IMG       Image file to display
  -width WIDTH   Character width of output
  -cam CAM       Show camera, this is the default
  -col {4,8,24}  Colour scheme to use

Display an image in terminal

./img_term.py -img dog.jpg 

Render your video capture device to terminal:

./img_term.py

Select a colour palette:

./img_term.py -img lena.jpg -col 24

Example

Go from this:

Dog

To this:

Screenshot

Or this

Lenna

To this:

LenaPixel

Or even render a video:

./img_term.py -col 24 -vid unrealset.mkv -width 78

https://gfycat.com/IdolizedSomeGemsbuck

Or simply stream your USB camera to terminal!:

Screen

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.