xnano-image
Load, process and convert images and animations to terminal cells without external libraries.
Install
pip install xnano-image
Or install as an extra of the top-level xnano package:
pip install "xnano[image]"
Example
from xnano_image import TerminalImage, TerminalGraphics
# Create an image from raw RGBA bytes
width, height = 2, 2
pixels = bytes([255, 0, 0, 255] * (width * height)) # Red pixels
image = TerminalImage.from_rgba(width, height, pixels)
# Convert to terminal cells (half-block characters by default)
grid = image.to_cell_grid(columns=10, rows=5)
# Or load from a file: image = TerminalImage.open('photo.png')
# Half blocks work in every terminal; TerminalGraphics.detect() asks for sixel, kitty or iterm2
graphics = TerminalGraphics.half_blocks()
What it provides
- Image loading: PNG, JPEG, GIF, WebP and the compact XNI1 container format
- Processing: resize, crop, scale, fit, quantize, flatten transparency and retime animations
- Conversion: to terminal cell grids (text) or animations with frame timing, with half-blocks or native graphics protocols
- No external tools: decoding and processing are built in
- Graphics detection: query terminal capabilities for sixel, Kitty or iTerm2 support
Links
- Repository: https://github.com/hsaeed3/xnano
- Documentation: https://xnano.hammad.app
- API reference: https://xnano.hammad.app/api-reference/
- License: MIT
Metadata
Release files for xnano-image 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xnano_image-0.2.0.tar.gz | 61.2 kB | Without provenance | Details for xnano_image-0.2.0.tar.gz |
Built distributions (wheels)
Total release size: 6.9 MB
Release files / xnano_image-0.2.0.tar.gz
| Download URL | xnano_image-0.2.0.tar.gz |
|---|---|
| Size | 61.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c4c33e0dcf2f7fee55bdf86dc1b74a983f1e0bb3cfe39beb99d98aa7f4b0299
|
|
BLAKE2b-256 checksum How to use checksums |
53441d500ad4f2952d38fd20c51e13537710b0d22ac8031f4e53e4f12ac34a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-win_amd64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 923.7 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4fdca18839199589d3b2bd618fa755cbb0074086fb5eace6d49d946dd832b25d
|
|
BLAKE2b-256 checksum How to use checksums |
9abe0f4bae6e8ef2ab3c07c5bf18e29f98c64427133ae129b1aab5a21e8467ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dac995ac112cef11c90aad8c900331015aa3d137ef3c7bbd9d92a1f4168d3ec7
|
|
BLAKE2b-256 checksum How to use checksums |
715176d452e32450759967f6b8cd9f413716d80ed46e7522c632190ff7060a15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ce785b4edd2f08e75cc3a14c0bb3030247e9819485e7e65d80da09c7164eda8e
|
|
BLAKE2b-256 checksum How to use checksums |
a0fd8828c1bdf41f77acde3fbed68280f4f0945e944621e9af06d87d4a970dc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 966.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f564d64de243840f3220e11f47791e70cdb02cab7c39088ad98c5bf752466dcb
|
|
BLAKE2b-256 checksum How to use checksums |
d8d00ad20d2630b6cf62fe29744348e390e4f47c9f1b0cbe7e7e3ce097bc5055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 894.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1780aecd7d9cfbf326a94a61fd5fc3178e95d3a180c47b1a69baacf7848dcaa8
|
|
BLAKE2b-256 checksum How to use checksums |
23f8c73dff51319e5830b740b1fe9c520735e5ca6a55d085036e1497987cac3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 867.1 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
00ba037c6bff026020addf2a0f1e4bd4f2d57d5edc79bacb58a03119f32357a9
|
|
BLAKE2b-256 checksum How to use checksums |
a3abea64b79190cf48ee9b6d41f299f472544a13b82d6164005a6a454c82fc51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / xnano_image-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | xnano_image-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 924.9 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ec9982e575a8de349ca0f4e169a47ce41d7fdd211cec8fc2a308b17283778b89
|
|
BLAKE2b-256 checksum How to use checksums |
effe623a3a3d20e13f26682964d307485dffd6efc05f3e04941a33c4c2bd38e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for xnano-image 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.