So, I want to save an HBITMAP to different image file formats like BMP,PNG and JPEG. I believe that the most simple way to do it is by using GDI+. So here is what I came up with.
Gdiplus::Bitmap bmp(hbmpImage,(HPALETTE)0); CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); bmp.Save(L"D:\image.png",&pngClsid,NULL);
The problem is that it doesn't work, and I get a bunch of errors "error LNK2019: unresolved external symbol". I got GetEncoderClsid() function from MSDN, but I don't believe that this is the problem. Probably it's something else something I'm missing or something I don't know.
I tried to do it the old way but I got lost in all those file headers and info headers, and I can't find any understandable info about how to use them.
I would really appreciate any help.