Metadata-Version: 2.4
Name: qoi-rs
Version: 4.0.2
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
Requires-Dist: pillow>=12.0 ; extra == 'pillow'
Provides-Extra: pillow
License-File: LICENSE
License-File: LICENSE
Summary: Blazingly fast library for decoding and encoding QOI images
Keywords: qoi,image,rust
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# 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 decoded.get_flattened_data() == image.get_flattened_data()

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

