From df5c81e67b4f660770f98db3dab2d8cb62329975 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sat, 19 Mar 2016 15:47:10 +0800 Subject: gdiplus: Implement GdipCreateMetafileFromStream. --- dlls/gdiplus/metafile.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 922c101..ea9badc 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -1139,8 +1139,21 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR *file, GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream, GpMetafile **metafile) { - FIXME("(%p, %p): stub\n", stream, metafile); - return NotImplemented; + GpStatus stat; + + TRACE("%p %p\n", stream, metafile); + + stat = GdipLoadImageFromStream(stream, (GpImage **)metafile); + if (stat != Ok) return stat; + + if ((*metafile)->image.type != ImageTypeMetafile) + { + GdipDisposeImage(&(*metafile)->image); + *metafile = NULL; + return GenericError; + } + + return Ok; } GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile, -- 2.7.1