Wrapper around https://lib.rs/crates/qoi
https://pypi.org/project/qoi-rs
| benchmark | add encode_pillow and decode_pillow | |
| python/qoi_rs | improve typing | |
| qoi_test_images | fix test.py | |
| src | format lib.rs | |
| .gitignore | improve performance and accept collection.abc.Buffer | |
| Cargo.lock | v4.0.3 | |
| Cargo.toml | v4.0.3 | |
| LICENSE | init | |
| pyproject.toml | link source code in pyproject.toml | |
| README.md | use pillow get_flattened_data | |
| test.py | fix deps of 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()