Skip to content

Add JPEG XL plugin via optional imagecodecs - #10215

Open
Ram-Pavith wants to merge 3 commits into
python-pillow:mainfrom
Ram-Pavith:add-jpegxl-plugin
Open

Ram-Pavith wants to merge 3 commits into
python-pillow:mainfrom
Ram-Pavith:add-jpegxl-plugin

Conversation

@Ram-Pavith

Copy link
Copy Markdown

Adds JPEG XL support via a new JxlImagePlugin (open/save for .jxl), backed by the optional imagecodecs package which bundles libjxl (the same approach as the external pillow-jxl-plugin).

Without imagecodecs the plugin raises a clear "JPEG XL support not installed" error. Includes Tests/test_file_jxl.py (skips without imagecodecs).

Verified against Pillow 12.3 + imagecodecs: saving and reopening a sample is lossless pixel-exact. Note the earlier libjxl C-plugin PR (#7848) was closed; this is a pure-Python alternative for discussion.

Comment thread src/PIL/JxlImagePlugin.py Outdated
@radarhere radarhere added the JPEG label Oct 15, 2026
@radarhere

Copy link
Copy Markdown
Member

Can I ask, trying to understand the perspective - what is the advantage of including this over using the external pillow-jxl-plugin? To me, it seems like a choice of which third-party package you need to install in addition to Pillow -
a) imagecodecs (and numpy, by the way, in the current state of this PR), or
b) pillow-jxl-plugin.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants