Justin Chevrier : gdiplus: Basic implementation of GdipImageGetFrameCount with updated tests.
Alexandre Julliard
julliard at winehq.org
Tue Mar 16 11:49:20 CDT 2010
Module: wine
Branch: master
Commit: 818420a378ab26aa5411bd1fbf28875fde0746f6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=818420a378ab26aa5411bd1fbf28875fde0746f6
Author: Justin Chevrier <jchevrier at gmail.com>
Date: Mon Mar 15 19:14:28 2010 -0400
gdiplus: Basic implementation of GdipImageGetFrameCount with updated tests.
---
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);
More information about the wine-cvs
mailing list