[PATCH] gdiplus: Added GdipBitmapConvertFormat stub

Nikolay Sivov nsivov at codeweavers.com
Wed Oct 21 14:07:02 CDT 2015


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/gdiplus/gdiplus.spec     |  2 +-
 dlls/gdiplus/image.c          | 10 ++++++++++
 include/gdipluspixelformats.h | 29 +++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index edf4e45..9f7ce5f 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -620,7 +620,7 @@
 620 stdcall GdipBitmapApplyEffect(ptr ptr ptr long ptr ptr)
 621 stub GdipBitmapGetHistogram
 622 stub GdipBitmapGetHistogramSize
-623 stub GdipBitmapConvertFormat
+623 stdcall GdipBitmapConvertFormat(ptr long long long ptr float)
 624 stdcall GdipImageSetAbort(ptr ptr)
 625 stub GdipGraphicsSetAbort
 626 stub GdipDrawImageFX
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 0a8027a..6725de8 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -5268,3 +5268,13 @@ GpStatus WINGDIPAPI GdipImageSetAbort(GpImage *image, GdiplusAbort *pabort)
     FIXME("(%p, %p): stub\n", image, pabort);
     return NotImplemented;
 }
+
+/*****************************************************************************
+ * GdipBitmapConvertFormat [GDIPLUS.@]
+ */
+GpStatus WINGDIPAPI GdipBitmapConvertFormat(GpBitmap *bitmap, PixelFormat format, DitherType dithertype,
+    PaletteType palettetype, ColorPalette *palette, REAL alphathreshold)
+{
+    FIXME("(%p, 0x%08x, %d, %d, %p, %f): stub\n", bitmap, format, dithertype, palettetype, palette, alphathreshold);
+    return NotImplemented;
+}
diff --git a/include/gdipluspixelformats.h b/include/gdipluspixelformats.h
index 9922b24..2a2a3cc 100644
--- a/include/gdipluspixelformats.h
+++ b/include/gdipluspixelformats.h
@@ -102,4 +102,33 @@ typedef struct ColorPalette
 
 #endif  /* end of c typedefs */
 
+typedef enum DitherType
+{
+    DitherTypeNone,
+    DitherTypeSolid,
+    DitherTypeOrdered4x4,
+    DitherTypeOrdered8x8,
+    DitherTypeOrdered16x16,
+    DitherTypeSpiral4x4,
+    DitherTypeSpiral8x8,
+    DitherTypeDualSpiral4x4,
+    DitherTypeDualSpiral8x8,
+    DitherTypeErrorDiffusion,
+    DitherTypeMax
+} DitherType;
+
+typedef enum PaletteType
+{
+    PaletteTypeCustom,
+    PaletteTypeOptimal,
+    PaletteTypeFixedBW,
+    PaletteTypeFixedHalftone8,
+    PaletteTypeFixedHalftone27,
+    PaletteTypeFixedHalftone64,
+    PaletteTypeFixedHalftone125,
+    PaletteTypeFixedHalftone216,
+    PaletteTypeFixedHalftone252,
+    PaletteTypeFixedHalftone256
+} PaletteType;
+
 #endif
-- 
2.6.1




More information about the wine-patches mailing list