[3/5] windowscodecs: Create a predefined black&white palette if 1 bpp TIFF image doesn't have one.

Dmitry Timoshkov dmitry at baikal.ru
Wed Jul 11 02:47:54 CDT 2012


---
 dlls/windowscodecs/tiffformat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c
index 232aa44..254b66d 100644
--- a/dlls/windowscodecs/tiffformat.c
+++ b/dlls/windowscodecs/tiffformat.c
@@ -878,6 +878,10 @@ static HRESULT WINAPI TiffFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface,
     if (!ret)
     {
         WARN("Couldn't read color map\n");
+
+        if (This->decode_info.bpp == 1)
+            return IWICPalette_InitializePredefined(pIPalette, WICBitmapPaletteTypeFixedBW, FALSE);
+
         return E_FAIL;
     }
 
-- 
1.7.11.1




More information about the wine-patches mailing list