获取网络图片

HttpWebResponse resp;
HttpWebRequest req 
= (HttpWebRequest)HttpWebRequest.Create("http://www.csdn.net/Images/logo_csdn.gif");
req.Timeout 
= 150000;
resp 
= (HttpWebResponse)req.GetResponse();
System.Drawing.Image img;
img 
= new System.Drawing.Bitmap(resp.GetResponseStream());

posted @ 2013-12-23 10:33  汉城  阅读(214)  评论(0编辑  收藏  举报