日期:2014-05-18 浏览次数:21163 次
<img src=http://expert.csdn.net/images/csdn.gif border=0 onload= "alert( 'filesize : '+ this.fileSize + ' Byte\r\nwidth : '+ this.clientWidth + '\r\nheight : '+ this.clientHeight) ">
string url = "http://c.csdn.net/bbs/t/5/i/pic_logo.gif";
WebClient clnt = new WebClient();
Byte[] data = clnt.DownloadData(url);
MemoryStream stream = new MemoryStream(data);
Image img = Image.FromStream(stream);
Console.WriteLine("宽:{0}, 高:{1}", img.Width, img.Height);
img.Dispose();
stream.Dispose();
clnt.Dispose();