Crash when I call GetImageEncoderSize

  • Thread starter Thread starter gedeon555
  • Start date Start date
G

gedeon555

Guest
Hello everybody and merry Christmas,

I have a problem when I want to save a bitmap onto a file. To do that, the
method "save" needs two arguments : a filename and a CLSID. So I try to get
the CLSID from a picture. I copied / pasted the function "GetEncoderClsid"
from Retrieving the Class Identifier for an Encoder - Windows applications but my
program crashes when I call GetImageEncodersSize (No error message, just
"Myprogram stopped working ...").

I tried to reduce the code as following :

Code Block
int main(int argc, WCHAR* argv[])
{
UINT num = 0; // number of image encoders
UINT size = 0; // size of the image encoder array in bytes

Gdiplus::GetImageEncodersSize(&num, &size);

return EXIT_SUCCESS;
}





But I have the same problem.

It is the first time I use this library, I am working on Windows Vista and
with Visual C++ 9.0 (available from my School).

Thank's a lot and again, merry Christmas !

Continue reading...
 
Back
Top