当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > asp.net 获取图片高度和宽度实例代码

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 asp.net 获取图片高度和宽度实例代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-11   浏览: 123 ::
收藏到网摘: n/a

使用asp.net获取图片的高度跟宽度的实例代码

复制代码 代码如下:

string path = Server.MapPath("/upload/tech/20091011/20091011144206_00ec53c4682d36f5c4359f4ae7bd7ba1.gif");
System.Drawing.Image image = System.Drawing.Image.FromFile(path);
Response.Write("宽:" + image.Width + "<br />");
Response.Write("高:" + image.Height );