GDI+ 绘制Png

来源:互联网 发布:java byte数组赋值 编辑:程序博客网 时间:2024/05/04 15:06
IplImage *iplPng = NULL;{char cPath[MAX_PATH * 2] = {0};WideCharToMultiByte(CP_ACP, 0, wcBkImageOfPath, MAX_PATH * 2, cPath, MAX_PATH * 2, NULL, NULL);iplPng = cvLoadImage(cPath, -1);if (iplPng){Gdiplus::Bitmap bitmap(iplPng->width, iplPng->height, iplPng->widthStep, PixelFormat32bppARGB, (BYTE*)iplPng->imageData);graphics.DrawImage(&bitmap, 0, 0, iplPng->width, iplPng->height);cvReleaseImage(&iplPng);}}

0 0