From b27c3c1983cd5c18d4d82ba5ffba6cd5d51c6391 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 20 Aug 2009 17:36:36 -0500 Subject: [PATCH] gdiplus: Only attempt to encode if the Encoder flag is set. --- dlls/gdiplus/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index c9e52879cd9..630d1935786 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) -- 2.11.4.GIT