Wrapper around https://lib.rs/crates/qoi
Project description
qoi-rs
Python library made using qoi and pyo3.
Usage
With Pillow
from io import BytesIO
from PIL import Image
from qoi_rs import encode, decode
image: Image = ...
qoi_bytes: bytes = encode(image.getdata(), width=image.width, height=image.height)
decoded = decode(qoi_bytes)
assert decoded.width == image.width
assert decoded.height == image.height
decoded_image = Image.frombytes(decoded.mode, (decoded.width, decoded.height), decoded.data)
parsed_decoded = Image.open(BytesIO(qoi_bytes))
assert tuple(decoded_image.getdata()) == tuple(parsed_decoded.getdata())
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
qoi_rs-1.0.0.tar.gz
(728.4 kB
view details)
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 qoi_rs-1.0.0.tar.gz.
File metadata
- Download URL: qoi_rs-1.0.0.tar.gz
- Upload date:
- Size: 728.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a5d1de7d8b9bc1cbeef5b9e72c6106204a0c282232553319a7b558c03b5a74
|
|
| MD5 |
a668309405ace81142d320455130b605
|
|
| BLAKE2b-256 |
d858ea13fa0f68e8a83b7d4f1a2c461319b1d20ec3569dbf061ec43ddb29a46c
|
File details
Details for the file qoi_rs-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qoi_rs-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 205.7 kB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f122d83a2012756ba08ad0a1ec6529a585c2f19780465756df7d12b87d9649eb
|
|
| MD5 |
d9aec92f546861efac134257395a4247
|
|
| BLAKE2b-256 |
71d2f5a776a663c6a50bde540de021f0e2432f0ad692fe3a4d5ebaf0b10f099c
|