gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back.
This commit is contained in:
parent
9d5139f4d9
commit
e0325b098f
dlls/gdiplus
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue