Display an image in your terminal
Project description
img2term
A simple Python program that displays images in your terminal.
Requirements
- Python 3.13 or higher (older versions down to 3.8 might still work)
- A terminal with 24-bit true color support. Some examples include:
- Ptyxis (used in the screenshot above)
- Konsole
- Alacritty
- Windows Terminal
- NOTE: The images may render more smoothly if the terminal supports GPU acceleration.
Getting Started
The easiest way is to install via pip:
pip install img2term
Alternatively, you can clone this repository and install the dependencies manually:
git clone https://github.com/myswang/img2term
cd img2term
# OPTIONAL: create a virtual environment
# python -m venv .venv
# source .venv/bin/activate
pip install -r requirements.txt
Usage
To display a single image (i.e. peacock.png), you can run the program like so:
img2term peacock.png
The program will try to resize the image to fit within the terminal window. If you want the image to display in a smaller size, you can do so by setting --max_width and --max_height, which constrain the size of the image in terms of rows/columns.
For example, if you want the image to take up no more than 24 rows:
img2term peacock.png --max_height 24
Supported File Formats
Any format that the Pillow library supports, including common formats like JPEG, PNG, and WEBP, should work. You can check out supported image formats here.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file img2term-0.1.3.tar.gz.
File metadata
- Download URL: img2term-0.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dab10f310b659b2706f2bbe1f57082b54cfe02f2bdbe447c20dd72cde89f1ac4
|
|
| MD5 |
13208e7449b5173c4b702ccebd72b7a3
|
|
| BLAKE2b-256 |
4f45a84d22ac60e26f234c26b897b49efac7fbde76501ff76c7682e6f669e290
|
File details
Details for the file img2term-0.1.3-py3-none-any.whl.
File metadata
- Download URL: img2term-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d090093f903cbe9602a4e37f74369e95c0e10788aa5199a8cbf326cd4ba1a69d
|
|
| MD5 |
5c2e63c597371c241e38715286808510
|
|
| BLAKE2b-256 |
7e35cbaacf3db56e4b2a718441002c64660036777d50b5ed92ae3142aacf215a
|