Skip to content

Add WEBP_SHARPYUV save flag (SharpYUV for lossy WebP) - #278

Merged
danoli3 merged 1 commit into
masterfrom
feat/webp-sharpyuv
Nov 10, 2026
Merged

danoli3 merged 1 commit into
masterfrom
feat/webp-sharpyuv

Conversation

@danoli3

@danoli3 danoli3 commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Refs #276.

Adds WEBP_SHARPYUV (0x200), combined with a quality value on lossy WebP save, which sets config.use_sharp_yuv = 1. The picture is imported as ARGB so WebPEncode performs the sharp conversion (libwebp ignores use_sharp_yuv for pictures imported directly as YUV). Default output is unchanged. The bundled sharpyuv sources were already compiled in.

Test: testWebPSharpYUV saves a chroma-edge image with and without the flag, checks the output decodes and differs. Full TestAPI suite passes (19/19) on macOS.

Not included: HEIF/AVIF. libheif takes its sharp-YUV choice from its own encoder configuration rather than a FreeImage flag, so that needs a separate change and a check against the libheif build options.

@danoli3
danoli3 merged commit d560050 into master Nov 10, 2026
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant