开发者

C# - Draw one or more HBitmaps on a Bitmap without using Image.FromHBitmap

I receive multiple (small) images stored in HBitmaps (handles to GDI bitmaps) and I want to draw them together in a large C# System.Drawing.Bitmap object. For performance reasons, I don't want to use Image.FromHBitmap to first convert 开发者_开发问答the HBitmaps, as the method makes a copy of the GDI bitmap.

Is there a way to do this? Graphics.DrawImage seems to require System.Drawing Image/Bitmap objects.

I'm using C#/Windows Forms/System.Drawing.


The only other way I can think of is to use the old GDI APIs. In other words, create two device contexts, SelectObject the bitmaps into them and BitBlt on to the other.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜