summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/handlers/image/webp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/handlers/image/webp.c b/content/handlers/image/webp.c
index 4087f4cfe..da13316bc 100644
--- a/content/handlers/image/webp.c
+++ b/content/handlers/image/webp.c
@@ -112,6 +112,10 @@ webp_cache_convert(struct content *c)
if (webpfeatures.has_alpha == 0) {
bmap_flags = BITMAP_OPAQUE;
+ /* Image has no alpha. Premultiplied alpha makes no difference.
+ * Optimisation: Avoid unnecessary conversion by copying format.
+ */
+ webp_fmt.pma = bitmap_fmt.pma;
} else {
bmap_flags = BITMAP_NONE;
}