to ac1998() www.vckbase.com 里面的哪个?推荐一下,我在上面找了,但是不知道哪个合适,图像方面我没有任何经验,这回只是给自己做一个小程序,thanks!
VOID Example_SaveFile(HDC hdc) { Graphics graphics(hdc); // Create an Image object based on a PNG file. Image image(L"Mosaic.png"); // Draw the image. graphics.DrawImage(&image, 10, 10); // Construct a Graphics object based on the image. Graphics imageGraphics(&image); // Alter the image. SolidBrush brush(Color(255, 0, 0, 255)); imageGraphics.FillEllipse(&brush, 20, 30, 80, 50); // Draw the altered image. graphics.DrawImage(&image, 200, 10); // Save the altered image. CLSID pngClsid; GetEncoderClsid(L"image/png", &pngClsid); image.Save(L"Mosaic2.png", &pngClsid, NULL); } GDI+ does not allow you to save an image to the same file that you used to construct the image.
谢谢楼上,正在寻找GDI+是什么开发库吗?
微软的SDK提供的WindowsGDI升级版
我下载了一个,里面包含dll lib include ,并从codeproject上面下载了一个例子 编译通过以后,但是link出错,gdiplus.lib就在lib目录下面,问题与这个帖子一样:http://expert.csdn.net/Expert/topic/2138/2138621.xml?temp=.5446283gdiplusShutdown函数出错
studying
{
Graphics graphics(hdc); // Create an Image object based on a PNG file.
Image image(L"Mosaic.png"); // Draw the image.
graphics.DrawImage(&image, 10, 10); // Construct a Graphics object based on the image.
Graphics imageGraphics(&image); // Alter the image.
SolidBrush brush(Color(255, 0, 0, 255));
imageGraphics.FillEllipse(&brush, 20, 30, 80, 50); // Draw the altered image.
graphics.DrawImage(&image, 200, 10); // Save the altered image.
CLSID pngClsid;
GetEncoderClsid(L"image/png", &pngClsid);
image.Save(L"Mosaic2.png", &pngClsid, NULL);
}
GDI+ does not allow you to save an image to the same file that you used to construct the image.
编译通过以后,但是link出错,gdiplus.lib就在lib目录下面,问题与这个帖子一样:http://expert.csdn.net/Expert/topic/2138/2138621.xml?temp=.5446283gdiplusShutdown函数出错
如果需要可以给我来电子邮件:[email protected]
如果需要可以给我来电子邮件:[email protected]