[PATCH 3/5] gdiplus: Add GdipSaveAddImage() stub.
Florian Will
florian.will at gmail.com
Mon Feb 17 04:00:45 CST 2020
Also update the GdipSaveAdd() stub to return NotImplemented instead of
silently failing.
Signed-off-by: Florian Will <florian.will at gmail.com>
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/image.c | 22 +++++++++++++++++++++-
include/gdiplusflat.h | 2 ++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 11866633b3..43dc0a82d2 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -472,7 +472,7 @@
472 stdcall GdipRotateTextureTransform(ptr float long)
473 stdcall GdipRotateWorldTransform(ptr float long)
474 stdcall GdipSaveAdd(ptr ptr)
-475 stub GdipSaveAddImage
+475 stdcall GdipSaveAddImage(ptr ptr ptr)
476 stdcall GdipSaveGraphics(ptr ptr)
477 stdcall GdipSaveImageToFile(ptr wstr ptr ptr)
478 stdcall GdipSaveImageToStream(ptr ptr ptr ptr)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index daf3169bd1..94d9344082 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -4667,11 +4667,31 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
/*****************************************************************************
* GdipSaveAdd [GDIPLUS.@]
+ *
+ * Like GdipSaveAddImage(), but encode the currently active frame of the given image into the file
+ * or stream that is currently being encoded.
*/
GpStatus WINGDIPAPI GdipSaveAdd(GpImage *image, GDIPCONST EncoderParameters *params)
{
FIXME("(%p,%p): stub\n", image, params);
- return Ok;
+ return NotImplemented;
+}
+
+/*****************************************************************************
+ * GdipSaveAddImage [GDIPLUS.@]
+ *
+ * Encode the currently active frame of additional_image into the file or stream that is currently
+ * being encoded by the image given in the image parameter. The first frame of a multi-frame image
+ * must be encoded using the normal GdipSaveImageToStream() or GdipSaveImageToFile() functions,
+ * but with the "MultiFrame" encoding parameter set. The multi-frame encoding process must be
+ * finished after adding the last frame by calling GdipSaveAdd() with the "Flush" encoding parameter
+ * set.
+ */
+GpStatus WINGDIPAPI GdipSaveAddImage(GpImage *image, GpImage *additional_image,
+ GDIPCONST EncoderParameters *params)
+{
+ FIXME("(%p,%p,%p): stub\n", image, additional_image, params);
+ return NotImplemented;
}
/*****************************************************************************
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 1e26c0a9d5..ed0f498483 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -433,6 +433,8 @@ GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage*,PROPID);
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage*,GDIPCONST WCHAR*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*);
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*,
GDIPCONST CLSID*,GDIPCONST EncoderParameters*);
+GpStatus WINGDIPAPI GdipSaveAdd(GpImage*,GDIPCONST EncoderParameters*);
+GpStatus WINGDIPAPI GdipSaveAddImage(GpImage*,GpImage*,GDIPCONST EncoderParameters*);
GpStatus WINGDIPAPI GdipSetImagePalette(GpImage*,GDIPCONST ColorPalette*);
GpStatus WINGDIPAPI GdipSetPropertyItem(GpImage*,GDIPCONST PropertyItem*);
--
2.20.1
More information about the wine-devel
mailing list