本文介绍了从图像控件创建位图对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从包含图像的图像控件创建位图对象.
Hi,
How can i create a bitmap object from a Image control that contains an image.
推荐答案
Image objImage = Image.FromFile(Server.MapPath("myimg.jpg"));
int height = objImage.Height;//Actual image width
int width = objImage.Width;//Actual image height
Bitmap bitmapimage = new Bitmap(objImage, width, height);
这篇关于从图像控件创建位图对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!