Closed cmahnke closed 8 months ago
https://github.com/olokelo/jxlpy/pull/19 this should fix the issue
Thank you for noticing the issue @cmahnke and big thanks for PR @rphlo.
I've got no time to work on this library lately and sorry for it not being updated. It was my side project in summer of 2021 but not much has changed since then in the code. I was planning earlier this year to completely rewrite jxlpy without the cython dependency so that it would be easier to integrate it directly into Pillow. It would work somewhat similar to this project. However I have no idea as to when I will have time to dive into that and if I even succeed.
Thanks everyone for using jxlpy but please keep in mind it might get discontinued soon.
Thanks for the update @olokelo even though this is sad news. And thanks @rphlo for your PR!
Anyways, there are already some forks, maybe we can create an issue to ask if any of the ones who forked and maybe also already did some improvements to their forks. I take the liberty to create a short list compiled from the Insights -> Network page:
@olokelo Thanks for the initial work. With safari setting JPEG XL as a first class citizen, and chrome team re-introducing it in its project, I think this library will soon gather more interest.
Thank you @cmahnke , I've looked into forks and I was able to get the newest release of jxlpy from foosoftsrl working with libjxl 0.8.2.
pip install git+https://github.com/foosoftsrl/jxlpy.git
The build_prerequisites.sh script deals with compiling required dependencies for libjxl which helps a lot with installation. I just had to install brotli_static
to compile everything successfully. It wasn't easy for me to compile libjxl in github actions reliably. That's why there are no wheels for recent Python versions.
I'm a bit surprised jxlpy is still alive and working. However I believe it should be rewritten to directly access Python API from C. It might be easier to integrate in Python projects and this would not bring unnecessary additional dependencies. That's also probably the only way Pillow (the famous Python library to deal with images) would integrate it. JPEG XL also has a lot complexity. Even Pillow wouldn't be able to use all of the features (for example additional channels, progressive loading, jpeg recompression). Also libjxl isn't the lightest library and has its own dependencies.
For now there's pyvips which supports JPEG XL and interfaces with Python using CFFI.
I will try to rewrite jxlpy in cleaner way based on forks and this avif library. If I fail, I will probably look for a more competent maintainer. As @rphlo said JPEG XL is raising again and it would be nice for Python have a library for it.
Hi guys, thanks for reviving the project.
@olokelo Can you please do a release containg the fix by rphlo? That would close this issue and #17 as well.
This plugin isn't working with a recent version of Pillow (10.1.0)
Reverting Pillow to 10.0.1 or 9.5.0 fixes the problem, both tested on Python 3.10.
or
Probably related to this API change.