Results 1 to 17 of 17

Thread: [RESOLVED] Grab a snapshot of a webpage

  1. #1

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Resolved [RESOLVED] Grab a snapshot of a webpage

    is there anyway we can write a code in such way that

    when i request a webpage eg : http://www.google.com

    it gives me a snapshot of google which would be 100 * 100 image..

    is there anyway i can do this..?

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: Grab a snapshot of a webpage

    Do you want to do this purely from a website or win app as well?

  3. #3

  4. #4

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    whoops....all the downloading links are down..on that page which u offered me gary..

    brin i'm doing this on web based app..

    task is in my TextBox i type the name of site and after some processing i get the snapshot of that website...

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Grab a snapshot of a webpage

    Hey,

    Sorry about that, I never actually checked the links on the page.

    What about the following then?

    http://blog.sb2.fr/post/2008/11/27/W...er-with-C.aspx

    Gary

  6. #6

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    thnx...i'll check the code..

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Grab a snapshot of a webpage

    Hey,

    Let us know how you get on with this.

    Gary

  8. #8

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    code was related to webBrowser control....

    which i can not use in web...so it's not happening...

    any other ideas..?

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Grab a snapshot of a webpage

    Quote Originally Posted by dnanetwork View Post
    code was related to webBrowser control....

    which i can not use in web...so it's not happening...
    Why not?

    There is absolutely nothing stopping you from doing this.

    The WebBrowser is never rendered anywhere, it is used in the Code Behind, simply as a mechanism to obtain the thumbnail.

    Did you try to implement the article? If you had, you would have found that this would have worked.

    Gary

  10. #10

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    yes i tried but every time it gives me an error that reference is missing..
    then i read this webbrowser control is generally used with winforms..

    so i thought itis not possible to use in web..

  11. #11
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Grab a snapshot of a webpage

    Hey,

    It would have given you an error, because you are missing a reference to System.Windows.Form, which is the namespace in which WebBrowser lives.

    You are correct when you say that this control is typically used within a Window Application, but in this instance, you are not adding it to a form's surface or anything like that, you are simply creating an instance of it in memory, and then using it to generate the thumbnail.

    If I were you, I would be putting the first section of code in that article into a class library, and then you can reference this assembly from your web application.

    Gary

  12. #12

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    i'm trying and let u know the output..

  13. #13
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Grab a snapshot of a webpage

    Hey,

    I have just went through the exercise myself, and it works perfectly.

    Gary

  14. #14

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: Grab a snapshot of a webpage

    yeah works fine but it has image clarity issues..

    i mean in 100*100 i can not make out the Thumbnail.

    so do u have any idea that i can enhance the image appearance lil higher...

    i mean i can not increase the size of image it should be 100 x 100.

  15. #15
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Grab a snapshot of a webpage

    Hey,

    Not sure on that one off the top of my head, would need to study the code a little closer. What exactly are you doing with these thumbnails, and what sort of clarity are you looking for?

    Gary

  16. #16

    Thread Starter
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    Re: [RESOLVED] Grab a snapshot of a webpage

    actually our requirement is something like where user come into my site and
    try to search something regarding our product then our code process the search result and filter-outs the urls in our domain and display 100 x 100 image and lil description.

  17. #17
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Grab a snapshot of a webpage

    Hey,

    Ok, but that doesn't say anything about the clarity of the image, where is this requirement defined? From what you have said above, the code provided does exactly that.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width