Metadata-Version: 2.4
Name: oxipng-pybind
Version: 10.1.1.post2
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Utilities
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Summary: Focused Python wrapper for oxipng.
Keywords: png,optimizer,oxipng
Author-email: ConcaveTrillion <ConcaveTrillion@gmail.com>
License-Expression: Unlicense
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Issues, https://github.com/pdomain/oxipng-pybind/issues
Project-URL: Repository, https://github.com/pdomain/oxipng-pybind
Project-URL: Upstream, https://github.com/oxipng/oxipng

# oxipng-pybind

`oxipng-pybind` is a Python wrapper for [`oxipng`](https://github.com/oxipng/oxipng). It optimizes PNG files and
raw bytes.

Install it with:

```bash
python -m pip install oxipng-pybind
```

If no wheel is available for your platform, see
[`Build from source`](https://github.com/pdomain/oxipng-pybind/blob/main/docs/usage/build-from-source.md).

## Main API

- [`optimize`](https://github.com/pdomain/oxipng-pybind/blob/main/docs/usage/file-optimization.md)
  reads and writes PNG files.
- [`optimize_from_memory`](https://github.com/pdomain/oxipng-pybind/blob/main/docs/usage/memory-optimization.md)
  reads and writes PNG bytes.
- [`RawImage`](https://github.com/pdomain/oxipng-pybind/blob/main/docs/usage/raw-image.md)
  builds PNG bytes from packed pixel data.
- `analyze` reports size and option details.

Error handling:

- Image decode and optimization failures raise `PngError`.
- Caller mistakes raise normal Python exceptions.

This project can replace `pyoxipng` for most use cases.

It tracks upstream Rust `oxipng` version updates.

## Links

- [Project home](https://github.com/pdomain/oxipng-pybind)
- [Upstream `oxipng` (Rust)](https://github.com/oxipng/oxipng)
- [Contribution guide](https://github.com/pdomain/oxipng-pybind/blob/main/CONTRIBUTING.md)
- [Untrusted input guidance](https://github.com/pdomain/oxipng-pybind/blob/main/docs/usage/untrusted-input.md)

