gdiplus: Only attempt to encode if the Encoder flag is set.
This commit is contained in:
parent
40df7dbc07
commit
b27c3c1983
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue