Module: wine Branch: master Commit: eeee536ad6027086302b18bfc628c00c1894fccb URL: http://source.winehq.org/git/wine.git/?a=commit;h=eeee536ad6027086302b18bfc6...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed May 16 23:33:55 2012 +0900
gdiplus: Implement GdipImageGetFrameCount.
---
dlls/gdiplus/image.c | 17 +++++++++-------- dlls/gdiplus/tests/image.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index c6a72b4..ce04c72 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2456,23 +2456,24 @@ static 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) { - static int calls; - TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count);
if(!image || !count) return InvalidParameter;
- if(!(calls++)) - FIXME("returning frame count of 1\n"); - - *count = 1; + if (!dimensionID || + IsEqualGUID(dimensionID, &image->format) || + IsEqualGUID(dimensionID, &FrameDimensionPage) || + IsEqualGUID(dimensionID, &FrameDimensionTime)) + { + *count = image->frame_count; + return Ok; + }
- return Ok; + return InvalidParameter; }
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index b6262d1..e22d45a 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -2298,7 +2298,7 @@ static void test_multiframegif(void) count = 12345; stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); expect(Ok, stat); - todo_wine expect(2, count); + expect(2, count);
/* SelectActiveFrame overwrites our current data */ stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1);