python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
11.89k stars 2.2k forks source link

JPEG XL support #4247

Open DonaldTsang opened 4 years ago

DonaldTsang commented 4 years ago

See https://jpeg.org/jpegxl/ since JPEG-XL is coming out in a few months Also https://google.github.io/brunsli has a sample app Co-referencing https://ai.google/research/pubs/pub48554 and https://www.iso.org/standard/77977.html

DonaldTsang commented 4 years ago

https://github.com/google/brunsli claims that Python is already supported.

radarhere commented 4 years ago

It does look that way! https://github.com/google/brunsli/blob/master/contrib/py/jxl_library_patches/jxl_pillow.py

varnav commented 3 years ago

JPEG XL format was recently frozen

DonaldTsang commented 3 years ago

@varnav so it has been standarized and passed through, correct?

varnav commented 3 years ago

ISO/IEC DIS 18181-1 is not completely done with being a standard. But this means format will not change anymore. I think it's a good time to start implementing it.

doublex commented 3 years ago

Maybe this code could be used: https://github.com/cgohlke/imagecodecs/blob/master/imagecodecs/_jpegxl.pyx

olokelo commented 3 years ago

Hello, I wrote a Pillow plugin for Jpeg XL. It's included in my Python module jxlpy which is based on Christoph Gohlke's project :) I think it might be useful in this issue.

doublex commented 3 years ago

@olokelo Great news!

brunoais commented 1 year ago

Hello! Is there anything missing to move this from the icebox to the backlog?

aclark4life commented 1 year ago

@brunoais Looks like we can now tentatively declare support via @olokelo 's plugin? (Thank you @olokelo !)

Joshix-1 commented 1 year ago

the plugin had no release since over a year. There are multiple issues from people that are unable to install it

I would appreciate built-in support

doublex commented 1 year ago

JXL is probably dead: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c84

Joshix-1 commented 1 year ago

If everyone supports it Googles arguments get even more invalid, and maybe they will re-add support. We can't let Google dictate what becomes standard. There's already lots of software with JpegXL support.

brunoais commented 1 year ago

JXL is probably dead: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c84

You say that but most images on my PC are already .jxl and just not all of them because some python software I use is waiting for Pillow to support JXL so they also support it.

schrmh commented 1 year ago

JXL is probably dead: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c84

https://en.wikipedia.org/wiki/JPEG_XL#Official_support says otherwise. libjxl and KImageFormats help a lot to grant support to basically any modern GTK and Qt application displaying images.

@radarhere @aclark4life is there anything really holding back built-in support? Or rephrased: What would you ideally want so that this issue can be resolved with a positive outcome for JXL?

radarhere commented 1 year ago

The same thing that is holding back every new feature - time. While Tidelift is generous, Pillow is worked on in our spare time, and complex functionality is often sidelined while dealing with the deluge of other issues and PRs that are created.

Ideally, a PR with clear reference to documentation, and dependencies that fit within our license.

schrmh commented 1 year ago

Small update: iOS 17 has JPEG XL support. Works in Safari and Photos app and reportedly (some?) third party apps. I hope this serves as a lesson for everybody to just keep on promoting the sane standards until they get adoption and to not give up just because a major player doesn't want to support something (yet). Especially if their proposed alternatives are just worse in most areas.

By the way, imlib2 is another library used by a lot of programs that has read and write JXL support (got the author to add the latter by opening an issue).

If I weren't already busy with a bunch of other projects I would gladly try to help on the software side of widely used imaging libraries to make adoption happen quicker. However, maybe this comment can help at making an enthusiastic developer work on JPEG XL support for pillow.

rspeed commented 11 months ago

iOS 17 has JPEG XL support

macOS 14 as well.

j99ca commented 8 months ago

Is there any progress on this feature? I noticed this library popped up in pypi

schrmh commented 8 months ago

@Isotr0py is here on GitHub as well as it seems, as well as their project: https://github.com/Isotr0py/pillow-jpegxl-plugin However, it looks like this uses Rust bindings and it doesn't look like the Pillow repo has Rust code as of now.

Maybe they still can do this

PR with clear reference to documentation, and dependencies that fit within [Pillow's] license.

olokelo commented 4 months ago

Hello again, for anyone interested please observe PR #7848 that enables read only support of JPEG XL images.