mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 05:08:21 +01:00
wicdec: support alpha from WebP WIC decoder
the container check may not be strictly necessary now that the alpha check has matured and the library will detect usable alpha, but it's safer to fix this case first before making larger changes. Bug: webp:533 Change-Id: I2e1ba42156970d579a52bd183707a037e65fd900
This commit is contained in:
parent
26f4aa0115
commit
a89a3230c9
@ -273,10 +273,15 @@ int ReadPictureWithWIC(const char* const filename,
|
||||
WICPixelFormatGUID src_pixel_format = GUID_WICPixelFormatUndefined;
|
||||
const WICFormatImporter* importer = NULL;
|
||||
GUID src_container_format = GUID_NULL_;
|
||||
// From Windows Kits\10\Include\10.0.19041.0\um\wincodec.h
|
||||
WEBP_DEFINE_GUID(GUID_ContainerFormatWebp_,
|
||||
0xe094b0e2, 0x67f2, 0x45b3,
|
||||
0xb0, 0xea, 0x11, 0x53, 0x37, 0xca, 0x7c, 0xf3);
|
||||
static const GUID* kAlphaContainers[] = {
|
||||
&GUID_ContainerFormatBmp,
|
||||
&GUID_ContainerFormatPng,
|
||||
&GUID_ContainerFormatTiff,
|
||||
&GUID_ContainerFormatWebp_,
|
||||
NULL
|
||||
};
|
||||
int has_alpha = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user