Dmitry Timoshkov : windowscodecs: Add support for generating WICBitmapPaletteTypeFixedGray4 palette.
Alexandre Julliard
julliard at winehq.org
Thu Jul 12 18:00:33 CDT 2012
Module: wine
Branch: master
Commit: d5cc4021b6ffd4116138eff84eb1d81241b66c82
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5cc4021b6ffd4116138eff84eb1d81241b66c82
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Thu Jul 12 16:55:45 2012 +0900
windowscodecs: Add support for generating WICBitmapPaletteTypeFixedGray4 palette.
---
dlls/windowscodecs/palette.c | 10 ++++++++++
dlls/windowscodecs/tests/palette.c | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/windowscodecs/palette.c b/dlls/windowscodecs/palette.c
index 8941fb5..ffd5877 100644
--- a/dlls/windowscodecs/palette.c
+++ b/dlls/windowscodecs/palette.c
@@ -117,6 +117,16 @@ static HRESULT WINAPI PaletteImpl_InitializePredefined(IWICPalette *iface,
colors[1] = 0xffffffff;
break;
+ case WICBitmapPaletteTypeFixedGray4:
+ count = 4;
+ colors = HeapAlloc(GetProcessHeap(), 0, count * sizeof(WICColor));
+ if (!colors) return E_OUTOFMEMORY;
+ colors[0] = 0xff000000;
+ colors[1] = 0xff555555;
+ colors[2] = 0xffaaaaaa;
+ colors[3] = 0xffffffff;
+ break;
+
default:
FIXME("(%p,%u,%d): stub\n", iface, type, add_transparent);
return E_NOTIMPL;
diff --git a/dlls/windowscodecs/tests/palette.c b/dlls/windowscodecs/tests/palette.c
index 7a34be7..1768e1a 100644
--- a/dlls/windowscodecs/tests/palette.c
+++ b/dlls/windowscodecs/tests/palette.c
@@ -159,6 +159,8 @@ static void test_predefined_palette(void)
} td[] =
{
{ WICBitmapPaletteTypeFixedBW, 1, 1, 2, { 0xff000000, 0xffffffff } },
+ { WICBitmapPaletteTypeFixedGray4, 0, 1, 4,
+ { 0xff000000, 0xff555555, 0xffaaaaaa, 0xffffffff } },
};
IWICImagingFactory *factory;
IWICPalette *palette;
More information about the wine-cvs
mailing list