pillow-jxl-plugin-1.3.7
توضیحات
Pillow plugin for JPEG-XL, using Rust for bindings.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | pillow-jxl-plugin-1.3.7 |
| نام | pillow-jxl-plugin |
| نسخه کتابخانه | 1.3.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Isotr0py |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/pillow-jxl-plugin/ |
| مجوز | - |
# pillow-jpegxl-plugin

[](https://github.com/Isotr0py/pillow-jpegxl-plugin/actions/workflows/test.yml)
Pillow plugin for JPEG-XL, using Rust for bindings.
## Features
- JPEG-XL Plugin for Pillow
- Encoder/Decoder to work with JPEG-XL using safe wrapper
- Support EXIF metadata encoding
## Install via PIP
```
pip install pillow-jxl-plugin
```
## Build from source
Make sure [`Rust`](https://www.rust-lang.org/tools/install) installed, then run:
```
git clone https://github.com/Isotr0py/pillow-jpegxl-plugin
cd pillow-jpegxl-plugin
pip install -e .[dev] -v
```
If you have [`libjxl`](https://github.com/libjxl/libjxl) installed and want to use dynamic link, run:
```
pip install -e .[dev] -v --config-settings=build-args="--features=dynamic"
```
## Development
- Python code is formatted and linted with `ruff`, while Rust code is checked with `cargo fmt` and `cargo clippy` via [pre-commit](https://pre-commit.com/).
- Install the tooling once with `pip install -e .[dev]` and then `pre-commit install`.
- Run the suite manually with `pre-commit run --all-files` before opening a pull request.
## Plugin Usage
Use `import pillow_jxl` to register the plugin in your code.
### Example:
```python
import pillow_jxl
from PIL import Image
# Lossless encode a png image
with Image.open("example.png") as img:
img.save("example.jxl",lossless=True)
# encode image with JPEG-Style quality
with Image.open("example.png") as img:
img.save("example.jxl", quality=98)
# Lossless construct from a jpeg image
with Image.open("example.jpg") as img:
img.save("example.jxl",lossless=True)
# Decode jxl image
with Image.open("example.jxl") as img:
display(img)
```
## Wheels status
| Wheels | Windows (x86/x64) | Windows (ARM) | MacOS (x64/aarch64) | manylinux (x86/x64/aarch64) | musllinux |
|:-----------:|:-----------------:|:-------------:|:-------------------:|:---------------------------:|:---------:|
| CP3.10 | ✔ | ❌ | ✔ | ✔ | ✔ |
| CP3.11 | ✔ | ✔ | ✔ | ✔ | ✔ |
| CP3.12 | ✔ | ✔ | ✔ | ✔ | ✔ |
| CP3.13 | ✔ | ✔ | ✔ | ✔ | ✔ |
| PyPy3.11 | ✔ | ❌ | ✔ | ✔ | ✔ |
## Credits
- [inflation/jpegxl-rs](https://github.com/inflation/jpegxl-rs)
نیازمندی
| مقدار | نام |
|---|---|
| - | packaging |
| - | pillow |
| xtr | cmake; |
| xtr | numpy; |
| xtr | openexr; |
| xtr | pre-commit; |
| xtr | pytest; |
| xtr | pyexiv2; |
| xtr | ruff; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl pillow-jxl-plugin-1.3.7:
pip install pillow-jxl-plugin-1.3.7.whl
نصب پکیج tar.gz pillow-jxl-plugin-1.3.7:
pip install pillow-jxl-plugin-1.3.7.tar.gz