256-c# PictureBox 显示图片

无愠色

关注

阅读 19

2024-01-19

c# PictureBox 显示图片:

Bitmap bitmap = (Bitmap)this.pictureBox1.Image;
拆分图片pic1.Image = bitmap;

PictureBox.Image可以转为Bitmap。

Bitmap可以赋值给PictureBox.Image

也可以如下转换:

Image image = this.pictureBox1.Image;
Bitmap img = new Bitmap(image);

图片识别验证码:

string result = ImgManage.ImgApply.GetImgCheckcode(img, 19);
this.识别结果.Text = result;

精彩评论(0)

0 0 举报