Subject: bug#59242: 29.0.50; Poor quality for WebP images

From: Stefan Kangas <[email-masked]>
Date: Mon, 14 Aug 2023 02:11:56 +0200

tags 59242 + patch
thanks

Po Lu <[email-masked]> writes:

> > Evgeny Zajcev <[email-masked]> writes:
>
> > Looks like partial transparency is incorrectly applied for webp images.

Thanks for the bug report.

> Stefan, I see the following code in image.c:
[...]
> So if the webp library does not blend itself, I think we will have to do
> that for it.  Am I missing anything here?

Yes, the old code was not right.  The attached patch should add proper
alpha blending for webp images.  I have tested it with the example
images here: https://developers.google.com/speed/webp/gallery2

Evgeny, could you please test this patch and report back?  It should
apply cleanly both against master and emacs-29.