Wrapper around https://lib.rs/crates/qoi
https://pypi.org/project/qoi-rs
- Rust 55.9%
- Python 44.1%
| benchmark | ||
| python/qoi_rs | ||
| qoi_test_images | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| test.py | ||
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()