1

我的 MFC 程序中有一个WICBitmap包含图像的图像。有没有办法将此位图绘制到设备上下文上?

void DrawBitmap(IWICBitmapSource source, HDC targetDC, int X, int Y, int cx, int cy)
{
   //source: The Bitmap to draw
   //TargetDC: The HDC to draw onto (e.g. a printer or screen DC)
   //X,Y: The location on the DC to draw the bitmap

}
4

2 回答 2

2

MSDN 上有许多示例展示了如何使用 GDI、GDI+、Direct2D 等显示 WIC 位图。


Microsoft 提供了一个使用 GDI 示例的 WIC Image Viewer GitHub 镜像

基本思想是:

于 2013-03-18T05:58:01.123 回答
-1

该文件可以作为 bmp 文件单独编辑,然后可以加载 WIC 对象,如您在如何从文件中加载位图中所见。

于 2013-03-15T17:59:22.797 回答