ASP. NET html to convert images,
Using System. IO; using System. drawing; using System. threading; using System. windows. forms; public class evaluate {Bitmap m_Bitmap; string m_Url; int m_BrowserWidth, m_BrowserHeight, cosine, m_ThumbnailHeight; public evaluate (string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) {m_Url = Url; m_BrowserHeight = BrowserHeight; m_BrowserWidth = BrowserWidth; width = ThumbnailWidth; width = ThumbnailHeight;} public static Bitmap values (string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) {signature Signature = new signature (Url, browserWidth, BrowserHeight, ThumbnailWidth, ThumbnailHeight); return thumbnailGenerator. generateWebSiteThumbnailI Mage ();} public Bitmap GenerateWebSiteThumbnailImage () {Thread m_thread = new Thread (new ThreadStart (_ GenerateWebSiteThumbnailImage); m_thread.SetApartmentState (ApartmentState. STA); m_thread.Start (); m_thread.Join (); return m_Bitmap;} private void _ forward () {WebBrowser m_WebBrowser = new WebBrowser (); m_WebBrowser.ScrollBarsEnabled = false; m_WebBrowser.Navigate (m_Url ); M_WebBrowser.DocumentCompleted + = new WebBrowserDocumentCompletedEventHandler (WebBrowser_DocumentCompleted); while (m_WebBrowser.ReadyState! = WebBrowserReadyState. complete) Application. doEvents (); m_WebBrowser.Dispose ();} private void WebBrowser_DocumentCompleted (object sender, expose e) {WebBrowser m_WebBrowser = (WebBrowser) sender; m_WebBrowser.ClientSize = new Size (this. m_BrowserWidth, this. m_BrowserHeight); bytes = false; m_Bitmap = new Bitmap (values, values); values (m_Bitmap, m_WebBrowser.Bounds); m_Bitmap = (Bitmap) values (m_ThumbnailWidth, m_ThumbnailHeight, null, IntPtr. zero) ;}} Bitmap m_Bitmap = WebSiteThumbnail. getWebSiteThumbnail ("here is the html connection address", 990,279 8, 990,279 8); MemoryStream MS = new MemoryStream (); m_Bitmap.Save (MS, System. drawing. imaging. imageFormat. png); // JPG, GIF, and PNG can all be byte [] buff = ms. toArray (); Response. binaryWrite (buff); System. drawing. image img = byteArrayToImage (buff); string url = "Image save .png"; img. save (HttpContext. current. server. mapPath (url ));