当前位置:Gxlcms > asp.net > asp.net 获取图片高度和宽度实例代码

asp.net 获取图片高度和宽度实例代码

时间:2021-07-01 10:21:17 帮助过:7人阅读

代码如下:
string path = Server.MapPath("img/1.gif");
System.Drawing.Image image = System.Drawing.Image.FromFile(path);
Response.Write("宽:" + image.Width + "<br />");
Response.Write("高:" + image.Height );

人气教程排行