我有一段内存值,用dc.SetPixel(x, y, color)可以显示,但是速度太慢,于是我用memDC.CreateCompatableDC(dc),在memDC.SetPixel(), 再bitblt出来,但是就是显示不出来,内存中的是一个int[],存储的是每一个点的RGB值,如何将其转换为位图,显示出来呢?
...全文
902打赏收藏
如何显示出来图像
我有一段内存值,用dc.SetPixel(x, y, color)可以显示,但是速度太慢,于是我用memDC.CreateCompatableDC(dc),在memDC.SetPixel(), 再bitblt出来,但是就是显示不出来,内存中的是一个int[],存储的是每一个点的RGB值,如何将其转换为位图,显示出来呢?
...
注意点阵操作的一些限制喔...
Note that not all device contexts support BitBlt. To check whether a given device context does support BitBlt, use the GetDeviceCaps member function and specify the RASTERCAPS index.
假设那没问题
还有就是必须搞定选进位图的长宽大小.
it must select a bitmap of the correct width and height into the device context.