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-0.1.0.tar.gz
(8.6 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-0.1.0.tar.gz.
File metadata
- Download URL: qoi_rs-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b0bffc1651834ffcd2727f713ce56fd22b54077d9f4d89912f50634e98dac8
|
|
| MD5 |
9c5c2f8f31cb76b1b89b09244c1fb882
|
|
| BLAKE2b-256 |
c08c883caa2a85bac9cb3327e20a8c403d97043608bd5aebe75533d2730415c2
|
File details
Details for the file qoi_rs-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qoi_rs-0.1.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 |
47d7e729e5db538e7b740d6c6424f2b04612237e91fa269467498ff4cb3bda34
|
|
| MD5 |
7accc8ca8eb9d86549d23537b6be41f7
|
|
| BLAKE2b-256 |
802b0484f87d62cc80d558b4252438049128ce9a1f5759633c3701aa1af46e5a
|