GDI+ Image class problem
I am trying to read the image data from a PNG file using Image class in GDI+ and VC++ 2008. I have included gdiplus.h header file and also added Gdiplus.lib as a reference to the project. But when I compile the following code, I get the error that "Image" is an undeclared identifier. Could you please let me kno开发者_如何学运维w how to read the data from the image using this class?
Thanks, Rakesh.
Code:
#include <iostream>
#include "windows.h"
#include "gdiplus.h"
using namespace std;
int main()
{
Image *img;
return 0;
}
Try "Gdiplus::Image". All GDI+ classes are defined in the Gdiplus namespace. You must either specify it as I suggest or add a "using namespace Gdiplus;"
精彩评论