|
-
Mar 12th, 2010, 01:27 PM
#1
Thread Starter
Hyperactive Member
[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..?
-
Mar 13th, 2010, 03:27 AM
#2
Re: Grab a snapshot of a webpage
Do you want to do this purely from a website or win app as well?
-
Mar 13th, 2010, 04:20 AM
#3
Re: Grab a snapshot of a webpage
-
Mar 13th, 2010, 07:05 AM
#4
Thread Starter
Hyperactive Member
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...
-
Mar 13th, 2010, 07:10 AM
#5
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
-
Mar 13th, 2010, 07:45 AM
#6
Thread Starter
Hyperactive Member
Re: Grab a snapshot of a webpage
thnx...i'll check the code..
-
Mar 13th, 2010, 08:01 AM
#7
Re: Grab a snapshot of a webpage
Hey,
Let us know how you get on with this.
Gary
-
Mar 13th, 2010, 09:28 AM
#8
Thread Starter
Hyperactive Member
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..?
-
Mar 13th, 2010, 09:32 AM
#9
Re: Grab a snapshot of a webpage
 Originally Posted by dnanetwork
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
-
Mar 13th, 2010, 09:47 AM
#10
Thread Starter
Hyperactive Member
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..
-
Mar 13th, 2010, 09:57 AM
#11
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
-
Mar 13th, 2010, 10:04 AM
#12
Thread Starter
Hyperactive Member
Re: Grab a snapshot of a webpage
i'm trying and let u know the output..
-
Mar 13th, 2010, 10:20 AM
#13
Re: Grab a snapshot of a webpage
Hey,
I have just went through the exercise myself, and it works perfectly.
Gary
-
Mar 13th, 2010, 11:35 AM
#14
Thread Starter
Hyperactive Member
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.
-
Mar 13th, 2010, 11:44 AM
#15
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
-
Mar 13th, 2010, 12:36 PM
#16
Thread Starter
Hyperactive Member
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.
-
Mar 14th, 2010, 06:02 AM
#17
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|