图片的读取和保存操作

     public static void LoadPicFromStream(string url)

        {

            string content = string.Empty;

            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("");

            request.Method = "GET";

            HttpWebResponse response = request.GetResponse() as HttpWebResponse;

            Stream stream = response.GetResponseStream();

            Image image = Image.FromStream(stream);

            image.Save("", System.Drawing.Imaging.ImageFormat.Jpeg);

            

        }

 

你可能感兴趣的:(图片)