Commit b27c3c19 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Only attempt to encode if the Encoder flag is set.

parent 40df7dbc
...@@ -1409,7 +1409,8 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream, ...@@ -1409,7 +1409,8 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
/* select correct encoder */ /* select correct encoder */
encode_image = NULL; encode_image = NULL;
for (i = 0; i < NUM_CODECS; i++) { 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; encode_image = codecs[i].encode_func;
} }
if (encode_image == NULL) if (encode_image == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment