Expose advanced WebP encoding options - #9936
Open
akx wants to merge 4 commits into
Open
Conversation
It should be noted that libwebp 1.3.2 has patched vulnerabilities; in practice, modern distributions will either have backported those patches, or use a libwebp fresher than this. But this is the ABI baseline.
It's a tiny piece of the whole encode, but this was easy enough to do. On my machine, 2x to 3x for RGBA, 1.1x to 1.8x for RGB.
akx
force-pushed
the
webp-advanced-options-2
branch
from
September 1, 2026 15:04
fa7cbce to
5ee0998
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1263 (supersedes it). It wasn't really possible to rebase neatly after more than a decade, so this is a rewrite + expansion; libwebp has grown more features since.
None of the advanced options are required for successful WebP use, but
"preset"s were not available, and those can be useful for more general use, so they're documented under "regular" options.I also noticed that the documentation said the default
method(encoding speed, more or less) was always 4; it had actually been 0 ever since animated WebPs were introduced in #2761. I didn't change the default, just the docs.