textual-imageview
textual-imageview is a both a CLI tool and Textual widget and for viewing images in the
terminal.
Usage
Use the vimg CLI command to quickly view an image in the terminal.
vimg <path_to_image>
Click and drag (or press W/S/A/D) to move around the image, and scroll (or press -/+) to zoom in/out of the image.
vimg is built on ImageView, a Rich renderable that renders images with padding/zoom, and ImageViewer, a Textual widget that adds mouse interactivity to ImageView. Add textual-imageview as a dependency to use them in your Textual app!
At the highest zoom level, each character corresponds to two image pixels. I've found that vimg works best with a GPU-accelerated terminal like Alacritty.
Installation
pip install textual-imageview
FAQ
vimg works great locally, but colors aren't displaying correctly when using vimg over SSH. Why?
Rich determines terminal color support by checking if the COLORTERM environment variable is set to truecolor or 24bit.
echo $COLORTERM
If you know your terminal emulator supports truecolor - i.e., vimg works great locally - try setting the environment variable manually:
export COLORTERM=truecolor
License
textual-imageview is distributed under the terms of the MIT license.
Metadata
Release files for textual-imageview 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| textual_imageview-0.1.1.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textual_imageview-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.2 MB
Release files / textual_imageview-0.1.1.tar.gz
| Download URL | textual_imageview-0.1.1.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4299d8ed677db0adb8fe945687470cf1421dcafd2a5dddab54b6ee8ef2ab3320
|
|
BLAKE2b-256 checksum How to use checksums |
4b313d8a517bd8694ee0d70fd260fbc20590f00a5fcde6ca1ce2edb174c000ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.1
|
Release files / textual_imageview-0.1.1-py3-none-any.whl
| Download URL | textual_imageview-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
335c8043e2f1f735b1b2ec1753a743d6762578175cd2cedae3ce67e2694800a4
|
|
BLAKE2b-256 checksum How to use checksums |
4356c0514dcfdb2b67333bf4e653ca9cf0fda51004932d3b246bf835376cbaba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.1
|