Commit eeee536a authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Implement GdipImageGetFrameCount.

parent 007d642e
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment