Dmitry Timoshkov : gdiplus: Implement GdipCreateMetafileFromStream.

Alexandre Julliard julliard at winehq.org
Mon Sep 12 10:14:09 CDT 2016


Module: wine
Branch: master
Commit: 3769778917b2cea0590ffb50e1174e354235174c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3769778917b2cea0590ffb50e1174e354235174c

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Sep  9 13:42:43 2016 -0500

gdiplus: Implement GdipCreateMetafileFromStream.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 71d89ae..b3b4682 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -1917,8 +1917,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,




More information about the wine-cvs mailing list