From e0325b098fc86145f94886b2f883b56f17e024aa Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Thu, 16 Oct 2008 18:07:44 +0400 Subject: [PATCH] gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back. --- dlls/gdiplus/image.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index ffd270b168d..0cb5ded5aca 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -253,6 +253,7 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) IStream* stream; HRESULT hr; INT size; + LARGE_INTEGER move; TRACE("%p, %p\n", image, cloneImage); @@ -279,6 +280,12 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) goto out; } + /* Set seek pointer back to the beginning of the picture */ + move.QuadPart = 0; + hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL); + if (FAILED(hr)) + goto out; + hr = OleLoadPicture(stream, size, FALSE, &IID_IPicture, (LPVOID*) &(*cloneImage)->picture); if (FAILED(hr)) -- 2.11.4.GIT