From badfcbaa1e245cc43be5cbc272e35d426c5c10e7 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 8 Oct 2015 20:33:33 -0700 Subject: [PATCH] wicdec: fix alpha detection w/64bpp BGRA/RGBA Change-Id: Ia712cf736e490d482a52b63d8e2816d0b7035cd0 --- examples/wicdec.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/wicdec.c b/examples/wicdec.c index 6ba9de63..37988cb2 100644 --- a/examples/wicdec.c +++ b/examples/wicdec.c @@ -73,6 +73,12 @@ WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppBGRA_, WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppRGBA_, 0xf5c7ad2d, 0x6a8d, 0x43dd, 0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9); +WEBP_DEFINE_GUID(GUID_WICPixelFormat64bppBGRA_, + 0x1562ff7c, 0xd352, 0x46f9, + 0x97, 0x9e, 0x42, 0x97, 0x6b, 0x79, 0x22, 0x46); +WEBP_DEFINE_GUID(GUID_WICPixelFormat64bppRGBA_, + 0x6fddc324, 0x4e03, 0x4bfe, + 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16); static HRESULT OpenInputStream(const char* filename, IStream** stream) { HRESULT hr = S_OK; @@ -196,7 +202,11 @@ static int HasAlpha(IWICImagingFactory* const factory, has_alpha = IsEqualGUID(MAKE_REFGUID(pixel_format), MAKE_REFGUID(GUID_WICPixelFormat32bppRGBA_)) || IsEqualGUID(MAKE_REFGUID(pixel_format), - MAKE_REFGUID(GUID_WICPixelFormat32bppBGRA_)); + MAKE_REFGUID(GUID_WICPixelFormat32bppBGRA_)) || + IsEqualGUID(MAKE_REFGUID(pixel_format), + MAKE_REFGUID(GUID_WICPixelFormat64bppRGBA_)) || + IsEqualGUID(MAKE_REFGUID(pixel_format), + MAKE_REFGUID(GUID_WICPixelFormat64bppBGRA_)); } return has_alpha; }