原来是这样的: filepath=“d:\images\a.jpg” 物理路径, Bitmap b = new Bitmap(filePath);我现在想: url="www.xxx.com/images/a.jpg";然后弄成bitmap .请高手指点下,最后有点源码。
WebClient web = new WebClient(); byte []buff= web.DownloadData("http://www.xxx.com/images/a.jpg"); web.Dispose(); System.IO.MemoryStream ms = new System.IO.MemoryStream(buff); Bitmap bmp = new Bitmap(ms);
filepath=“d:\images\a.jpg” 物理路径,
Bitmap b = new Bitmap(filePath);我现在想:
url="www.xxx.com/images/a.jpg";然后弄成bitmap .请高手指点下,最后有点源码。
byte []buff= web.DownloadData("http://www.xxx.com/images/a.jpg");
web.Dispose();
System.IO.MemoryStream ms = new System.IO.MemoryStream(buff);
Bitmap bmp = new Bitmap(ms);