HttpPostedFile file = this.Request.Files["上传控件Name"];
Stream stream = file.InputStream;
System.Drawing.Image image = System.Drawing.Image.FromStream(stream);
int iWidth=Image.Width
int iHeight=Image.Height
文章转载自:ASP.NET中如何获取上传图片的宽和高 http://www.studyofnet.com/news/1283.html
本文介绍了一种在ASP.NET中获取上传图片宽度和高度的方法。通过使用HttpPostedFile获取文件流,并利用System.Drawing库读取图片尺寸。
2565

被折叠的 条评论
为什么被折叠?



