gdiplus: Implement GdipImageGetFrameCount.
This commit is contained in:
parent
007d642e53
commit
eeee536ad6
|
@ -2456,23 +2456,24 @@ static struct image_format_dimension image_format_dimensions[] =
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FIXME: Need to handle multi-framed images */
|
|
||||||
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
|
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image,
|
||||||
GDIPCONST GUID* dimensionID, UINT* count)
|
GDIPCONST GUID* dimensionID, UINT* count)
|
||||||
{
|
{
|
||||||
static int calls;
|
|
||||||
|
|
||||||
TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count);
|
TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count);
|
||||||
|
|
||||||
if(!image || !count)
|
if(!image || !count)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
if(!(calls++))
|
if (!dimensionID ||
|
||||||
FIXME("returning frame count of 1\n");
|
IsEqualGUID(dimensionID, &image->format) ||
|
||||||
|
IsEqualGUID(dimensionID, &FrameDimensionPage) ||
|
||||||
|
IsEqualGUID(dimensionID, &FrameDimensionTime))
|
||||||
|
{
|
||||||
|
*count = image->frame_count;
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
||||||
*count = 1;
|
return InvalidParameter;
|
||||||
|
|
||||||
return Ok;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,
|
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image,
|
||||||
|
|
|
@ -2298,7 +2298,7 @@ static void test_multiframegif(void)
|
||||||
count = 12345;
|
count = 12345;
|
||||||
stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count);
|
stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count);
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
todo_wine expect(2, count);
|
expect(2, count);
|
||||||
|
|
||||||
/* SelectActiveFrame overwrites our current data */
|
/* SelectActiveFrame overwrites our current data */
|
||||||
stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1);
|
stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1);
|
||||||
|
|
Loading…
Reference in New Issue