From 5ca9da2c0197ac1260975c1b7b643dbd11185715 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 7 Feb 2020 18:31:38 +0800 Subject: [PATCH] gdiplus: Make GdipGetNearestColor print FIXME only if indexed bitmap is associated with the graphics object. Signed-off-by: Dmitry Timoshkov Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/graphics.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c52fa654454..8f3272b2814 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4775,7 +4775,7 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics, /* FIXME: Need to handle color depths less than 24bpp */ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb) { - FIXME("(%p, %p): Passing color unmodified\n", graphics, argb); + TRACE("(%p, %p)\n", graphics, argb); if(!graphics || !argb) return InvalidParameter; @@ -4783,6 +4783,13 @@ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb) if(graphics->busy) return ObjectBusy; + if (graphics->image->type == ImageTypeBitmap) + { + GpBitmap *bitmap = (GpBitmap *)graphics->image; + if (IsIndexedPixelFormat(bitmap->format)) + FIXME("(%p, %p): Passing color unmodified\n", graphics, argb); + } + return Ok; }