Image.FromStream : Image : Graphics C# Source Code


Custom Search

C# Source Code » Graphics » Image »

 

Image.FromStream








    
 

using System;
using System.Net;
using System.IO;
using System.Drawing;
using System.Windows.Forms;

public class MainClass {
    public static void Main() {
        WebRequest requestPic = WebRequest.Create("http://www.your.com/1.jpg");
        WebRequest requestHtml = WebRequest.Create("http://www.your.com");

        WebResponse responsePic = requestPic.GetResponse();
        WebResponse responseHtml = requestHtml.GetResponse();

        Image img = Image.FromStream(responsePic.GetResponseStream());

        using (StreamReader r = new StreamReader(responseHtml.GetResponseStream())) {
            Console.WriteLine(r.ReadToEnd());
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Graphics
» Image