Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Save an HtmlElement Image to a file

Save an HtmlElement Image to a file

Scheduled Pinned Locked Moved C#
graphicsalgorithmstutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alex H 1983
    wrote on last edited by
    #1

    I am searching for a way to save a HtmlElement to a file. private void webBrowser1_DocumentCompleted(Object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElement he = webBrowser1.Document.Images[0]; } Hint: the webBrowser1 itself has a function called DrawToBitmap that can be used to grab a thumbnail from a webpage. Bitmap docImage = new Bitmap(600, 800); webBrowser1.DrawToBitmap(docImage, new Rectangle(webBrowser1.Location.X, webBrowser1.Location.Y, webBrowser1.Width, webBrowser1.Height)); But i'm not sure how to do this with an image element inside my webpage.

    T 1 Reply Last reply
    0
    • A Alex H 1983

      I am searching for a way to save a HtmlElement to a file. private void webBrowser1_DocumentCompleted(Object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElement he = webBrowser1.Document.Images[0]; } Hint: the webBrowser1 itself has a function called DrawToBitmap that can be used to grab a thumbnail from a webpage. Bitmap docImage = new Bitmap(600, 800); webBrowser1.DrawToBitmap(docImage, new Rectangle(webBrowser1.Location.X, webBrowser1.Location.Y, webBrowser1.Width, webBrowser1.Height)); But i'm not sure how to do this with an image element inside my webpage.

      T Offline
      T Offline
      Taha_u
      wrote on last edited by
      #2

      I'm searching for this also! Plz help!!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups