开发者

Convert graphic that is created on a specific control to Bitmap

开发者 https://www.devze.com 2022-12-30 23:14 出处:网络
How can I convert a graphic, c开发者_StackOverflow社区reated on a PictureBox, to Bitmap?You need to draw directly on a Bitmap object by calling Graphics.FromImage, then set the Bitmap as the PictureBo

How can I convert a graphic, c开发者_StackOverflow社区reated on a PictureBox, to Bitmap?


You need to draw directly on a Bitmap object by calling Graphics.FromImage, then set the Bitmap as the PictureBox's Image.


Or if you want to create a Bitmap object:

Bitmap myBitmap = new Bitmap(pictureBox1.Image);


try pictureBox1.Image.Save(..)

0

精彩评论

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

关注公众号