A small script to render images to an ANSI terminal
Project description
Image 2 ANSI
=
Converts an image to a representation in ANSI
Installation
-
1.
```bash
pip install img_term
```
Usage
-
```
usage: img_term [-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
```bash
img_term -img dog.jpg
```
Render your video capture device to terminal:
```bash
img_term
```
Select a colour palette:
```bash
./img_term.py -img lena.jpg -col 24
```
Example
-
Go from this:
![Dog](/dog.jpg)
To this:
![Screenshot](/screenshot.png)
Or this
![Lenna](/lena.jpg)
To this:
![LenaPixel](/screenshot2.png)
Or even render a video:
```bash
./img_term.py -col 24 -vid unrealset.mkv -width 78
```
https://gfycat.com/IdolizedSomeGemsbuck
Or simply stream your USB camera to terminal!:
https://gfycat.com/RemarkablePalatableKob
=
Converts an image to a representation in ANSI
Installation
-
1.
```bash
pip install img_term
```
Usage
-
```
usage: img_term [-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
```bash
img_term -img dog.jpg
```
Render your video capture device to terminal:
```bash
img_term
```
Select a colour palette:
```bash
./img_term.py -img lena.jpg -col 24
```
Example
-
Go from this:
![Dog](/dog.jpg)
To this:
![Screenshot](/screenshot.png)
Or this
![Lenna](/lena.jpg)
To this:
![LenaPixel](/screenshot2.png)
Or even render a video:
```bash
./img_term.py -col 24 -vid unrealset.mkv -width 78
```
https://gfycat.com/IdolizedSomeGemsbuck
Or simply stream your USB camera to terminal!:
https://gfycat.com/RemarkablePalatableKob
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
img_term-1.0.1.tar.gz
(12.7 kB
view details)
Built Distribution
File details
Details for the file img_term-1.0.1.tar.gz
.
File metadata
- Download URL: img_term-1.0.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a3a357ddee8209a66cf174439874bdcc957d1991ae5a0daa77946a305d31e8 |
|
MD5 | d1bd2a3742b439821e171b02b00d9b63 |
|
BLAKE2b-256 | 5f982fa82b3e68a2b8674bbe940c5c9b899b01be6309eb7078eecf4ee0095bfc |
File details
Details for the file img_term-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: img_term-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20f096dfbf456af998625f6f130110a6a38a341ca6e57add62cf55fb49903196 |
|
MD5 | b4708f57863972b8e15834aa83f62bc7 |
|
BLAKE2b-256 | 5d1c9f3864a0a01116e3af6519c31079aba61cd47705f1dc56fffb908e938022 |