"Nathan Beckmann" nathan.beckmann@gmail.com wrote:
stat = GdipCreateBitmapFromStream(stream, bitmap);
- if(!stat)
- if(stream) IStream_Release(stream);
The 'if' check above is not needed, GdipCreateStreamOnFile returns a status which is already checked.
- stat = GdipCreateStreamOnFile(filename, GENERIC_READ, &stream);
- if (stat != Ok)
return stat;
- stat = GdipLoadImageFromStream(stream, image);
- if (stream)
IStream_Release(stream);
Same thing here.