代码如下: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 );