Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

JPEG XL support

Open DonaldTsang opened this issue 5 years ago • 21 comments

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 avatar Dec 04 '19 05:12 DonaldTsang

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

DonaldTsang avatar Dec 04 '19 05:12 DonaldTsang

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

radarhere avatar Dec 04 '19 07:12 radarhere

JPEG XL format was recently frozen

varnav avatar Dec 31 '20 19:12 varnav

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

DonaldTsang avatar Jan 03 '21 07:01 DonaldTsang

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.

varnav avatar Jan 03 '21 17:01 varnav

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

doublex avatar May 11 '21 14:05 doublex

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.

olokelo avatar Jul 07 '21 14:07 olokelo

@olokelo Great news!

doublex avatar Jul 07 '21 14:07 doublex

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

brunoais avatar Dec 25 '22 12:12 brunoais

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

aclark4life avatar Dec 25 '22 18:12 aclark4life

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

Joshix-1 avatar Dec 29 '22 21:12 Joshix-1

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

doublex avatar Jan 02 '23 09:01 doublex

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.

Joshix-1 avatar Jan 02 '23 12:01 Joshix-1

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.

brunoais avatar Jan 02 '23 14:01 brunoais

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?

schrmh avatar Apr 11 '23 11:04 schrmh

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.

radarhere avatar May 06 '23 04:05 radarhere

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.

schrmh avatar Jun 06 '23 12:06 schrmh

iOS 17 has JPEG XL support

macOS 14 as well.

rspeed avatar Jul 19 '23 17:07 rspeed

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

j99ca avatar Nov 06 '23 21:11 j99ca

@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.

schrmh avatar Nov 06 '23 21:11 schrmh

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

olokelo avatar Mar 02 '24 09:03 olokelo