Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: Support avif as output format #28809

Open
rotsee opened this issue Sep 12, 2024 · 4 comments
Open

[ENH]: Support avif as output format #28809

rotsee opened this issue Sep 12, 2024 · 4 comments
Labels
Good first issue Open a pull request against these issues if there are no active ones! New feature status: upstream fix required

Comments

@rotsee
Copy link

rotsee commented Sep 12, 2024

Problem

Since v3.6.0, Matplotlib supports webp output (yay!), but I couldn't find a ticket tracking Avif support, so here's a feature request for savefig to support saving as .avif.

relevant links:

Proposed solution

No response

@jklymak
Copy link
Member

jklymak commented Sep 12, 2024

I think this would need to wait for pillow to support?

@ksunden
Copy link
Member

ksunden commented Sep 12, 2024

While Pillow support is a prerequisite (and probably sufficient) condition for savefig to support AVIF, animations actually may have some support already.

Newer versions of ffmpeg support AVIF (though I could not test easily because the version in my distro's repository is too old).

The imagemagick writer did save an AVIF file. However, it may have only saved a single frame... (Not 100% sure if that is a viewer program problem or file output problem)

ani.save("test.avif", writer="imagemagick")

Gives: (zipped AVIF file because github doesn't allow AVIF directly)
test.zip

@tacaswell tacaswell added this to the future releases milestone Sep 13, 2024
@tacaswell tacaswell added the Good first issue Open a pull request against these issues if there are no active ones! label Sep 13, 2024
Copy link

Good first issue - notes for new contributors

This issue is suited to new contributors because it does not require understanding of the
Matplotlib internals. To get started, please see our contributing
guide
.

We do not assign issues. Check the Development section in the sidebar for linked pull
requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please
collaborate on the work by reviewing it rather than duplicating it in a competing PR.

If something is unclear, please reach out on any of our communication
channels
.

@fdintino
Copy link

Until that PR is merged you can use a separate package, pillow-avif-plugin, to allow Pillow to save AVIF images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Open a pull request against these issues if there are no active ones! New feature status: upstream fix required
Projects
None yet
Development

No branches or pull requests

5 participants