From 2a7fde6c818c6498dfc8e2be019b964af08b5a67 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Fri, 27 Feb 2015 10:10:45 +0100 Subject: [PATCH] webp: always decode to block storage when it's used It's apparently not a problem if we don't strip the alpha channel when decoding a RGBA image to RGB. --- libImaging/WebPDecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libImaging/WebPDecode.c b/libImaging/WebPDecode.c index 9159afb64..c886ffc94 100644 --- a/libImaging/WebPDecode.c +++ b/libImaging/WebPDecode.c @@ -57,8 +57,8 @@ int ImagingWebPDecode(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes else config->output.colorspace = MODE_RGB; - /* If block storage is used, and we're not stripping alpha, then directly decode to it. */ - if (NULL != im->block && (MODE_RGBA == config->output.colorspace || !context->has_alpha)) + /* If block storage is used, then directly decode to it. */ + if (NULL != im->block) { assert(4 == im->pixelsize);