GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ENH]: Support JPEG XL output in savefig() · Issue #32467 · matplotlib/matplotlib

[ENH]: Support JPEG XL output in savefig() #32467

New issue
Copy link
New issue
Copy link
Open
Open
[ENH]: Support JPEG XL output in savefig()#32467
Copy link
Labels
New feature

Description

@EwoutH
EwoutH
opened on Oct 12, 2026
Issue body actions

Problem

Matplotlib does not natively support exporting figures in JPEG XL (.jxl) format. JPEG XL offers efficient lossless and lossy compression, high bit-depth support, and potentially smaller files than PNG or JPEG, making it attractive for scientific visualizations, particularly raster-heavy figures. Currently, users must rely on external conversion tools or additional processing steps.

Proposed solution

Add JPEG XL as an optional raster output format for savefig(), ideally using an existing backend such as imagecodecs or a Pillow JPEG XL plugin, without introducing a mandatory dependency.

For example:

fig.savefig("figure.jxl", format="jxl")

Ideally, the implementation would support lossless encoding by default, optional lossy compression settings, and appropriate metadata preservation.

Reacted by Oleg Ivasenko

Activity

  1. EwoutH
    added
    New feature
    on Oct 12, 2026
  2. tacaswell commented on Oct 12, 2026

    @tacaswell
    tacaswell
    on Oct 12, 2026
    Member
    More actions

    We don't currently have an imagecodecs dependency (optional or required), but do have a hard dependency on pillow. I think the best path here is to add the support for dispatching .jxl to the pillow backend and letting any errors from that bubble back to the user (maybe with a raise from suggesting a missing dependency).

  3. Kaustav5505g commented on Oct 19, 2026

    @Kaustav5505g
    Kaustav5505g
    on Oct 19, 2026
    More actions

    Hi everyone!

    @tacaswell's suggestion makes total sense—relying on Pillow to handle the .jxl dispatch without introducing extra optional dependencies keeps things clean and lightweight.

    I’d love to pick this up and work on a PR for it. I'll look into registering .jxl in the Pillow backend and making sure any missing-dependency errors bubble up gracefully with a helpful message.

    Does anyone have any early preferences or edge cases they'd like me to keep in mind (e.g., default lossless/lossy parameters)? I'll get started on a draft soon!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    New feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.