[PATCH 2/2] gdiplus: Basic implementation of GdipImageGetFrameCount with updated tests

Justin Chevrier jchevrier at gmail.com
Mon Mar 15 18:14:28 CDT 2010


---
 dlls/gdiplus/image.c       |    9 ++++++---
 dlls/gdiplus/tests/image.c |   12 ++++++------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 0d95579..58f3c65 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -2196,6 +2196,7 @@ struct image_format_dimension image_format_dimensions[] =
     {NULL}
 };
 
+/* FIXME: Need to handle multi-framed images */
 GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
     GDIPCONST GUID* dimensionID, UINT* count)
 {
@@ -2203,13 +2204,15 @@ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
 
     TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count);
 
-    if(!image || !dimensionID || !count)
+    if(!image || !count)
         return InvalidParameter;
 
     if(!(calls++))
-        FIXME("not implemented\n");
+        FIXME("returning frame count of 1\n");
 
-    return NotImplemented;
+    *count = 1;
+
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 682c49f..5f20468 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -237,12 +237,12 @@ static void test_GdipImageGetFrameDimensionsCount(void)
     }
 
     stat = GdipImageGetFrameCount((GpImage*)bm, NULL, &count);
-    todo_wine expect(Ok, stat);
+    expect(Ok, stat);
 
     count = 12345;
     stat = GdipImageGetFrameCount((GpImage*)bm, &dimension, &count);
-    todo_wine expect(Ok, stat);
-    todo_wine expect(1, count);
+    expect(Ok, stat);
+    expect(1, count);
 
     GdipBitmapSetPixel(bm, 0, 0, 0xffffffff);
 
@@ -1601,7 +1601,7 @@ static void test_multiframegif(void)
 
     count = 12345;
     stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count);
-    todo_wine expect(Ok, stat);
+    expect(Ok, stat);
     todo_wine expect(2, count);
 
     /* SelectActiveFrame overwrites our current data */
@@ -1675,8 +1675,8 @@ static void test_multiframegif(void)
 
     count = 12345;
     stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count);
-    todo_wine expect(Ok, stat);
-    todo_wine expect(1, count);
+    expect(Ok, stat);
+    expect(1, count);
 
     GdipDisposeImage((GpImage*)bmp);
     IStream_Release(stream);
-- 
1.6.5.rc1




More information about the wine-patches mailing list