mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-09 06:44:45 +03:00
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.
This commit is contained in:
parent
bd369f78ae
commit
2a7fde6c81
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user