Metadata-Version: 2.4
Name: qoi-rs
Version: 2.2.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
License-File: LICENSE
License-File: LICENSE
Summary: Wrapper around https://lib.rs/crates/qoi
Keywords: qoi,image,rust
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code, https://codeberg.org/Joshix/qoi-rs-python

# qoi-rs

Python library made using [qoi](https://crates.io/crates/qoi) and [pyo3](https://crates.io/crates/pyo3).

## Usage

### With [Pillow](https://pillow.readthedocs.io/en/stable/)

```py
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 tuple(decoded.getdata()) == tuple(image.getdata())

image.close()
decoded.close()
```

