1
0
Fork
You've already forked qoi-rs-python
0
Rust 55.9%
Python 44.1%
2026年01月08日 21:00:00 +00:00
benchmark add encode_pillow and decode_pillow 2025年05月15日 20:00:00 +00:00
python/qoi_rs improve typing 2025年10月15日 18:00:00 +00:00
qoi_test_images fix test.py 2025年06月13日 14:00:00 +00:00
src format lib.rs 2026年01月04日 15:00:00 +00:00
.gitignore improve performance and accept collection.abc.Buffer 2025年05月09日 12:00:00 +00:00
Cargo.lock v4.0.3 2026年01月08日 21:00:00 +00:00
Cargo.toml v4.0.3 2026年01月08日 21:00:00 +00:00
LICENSE init 2025年04月25日 17:00:00 +00:00
pyproject.toml link source code in pyproject.toml 2026年01月08日 21:00:00 +00:00
README.md use pillow get_flattened_data 2026年01月02日 11:00:00 +00:00
test.py fix deps of test.py 2026年01月02日 11:00:00 +00:00

qoi-rs

Python library made using qoi and pyo3.

Usage

With Pillow

from PIL import Image
from qoi_rs import encode_pillow, decode_pillow
image: Image.Image = Image.open("./qoi_test_images/dice.png")
qoi_bytes: bytes = encode_pillow(image)
decoded: Image.Image = decode_pillow(qoi_bytes)
assert decoded.width == image.width
assert decoded.height == image.height
assert decoded.get_flattened_data() == image.get_flattened_data()
image.close()
decoded.close()