From 483aaf33085db4e2f0d900f9871e1aae2fecccd3 Mon Sep 17 00:00:00 2001 From: Florian Will Date: Wed, 19 Feb 2020 08:47:05 +0100 Subject: [PATCH] gdiplus: Add GdipSaveAddImage() stub. Also update the GdipSaveAdd() stub to return NotImplemented instead of silently failing. Signed-off-by: Florian Will Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- 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 11866633b38..43dc0a82d2b 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 6fee7c3854b..94c03ede190 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -4681,11 +4681,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 1e26c0a9d5d..ed0f498483e 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*);