Module: wine Branch: master Commit: b27c3c1983cd5c18d4d82ba5ffba6cd5d51c6391 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b27c3c1983cd5c18d4d82ba5ff...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu Aug 20 17:36:36 2009 -0500
gdiplus: Only attempt to encode if the Encoder flag is set.
---
dlls/gdiplus/image.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index c9e5287..630d193 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1409,7 +1409,8 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream, /* select correct encoder */ encode_image = NULL; for (i = 0; i < NUM_CODECS; i++) { - if (IsEqualCLSID(clsid, &codecs[i].info.Clsid)) + if ((codecs[i].info.Flags & ImageCodecFlagsEncoder) && + IsEqualCLSID(clsid, &codecs[i].info.Clsid)) encode_image = codecs[i].encode_func; } if (encode_image == NULL)