Is there a module that grabs a remote page and prints thumbnail image?

B

Blue

Hi, I am not a Perl programmer but I need to know this so that I can
design a Perl script and get a programmer to code it:

Is there any Perl module that grabs a remote website and return a
thumbnail image?

Thanks.
 
J

John Bokma

Blue said:
Hi, I am not a Perl programmer but I need to know this so that I can
design a Perl script and get a programmer to code it:

Is there any Perl module that grabs a remote website and return a
thumbnail image?

AFAIK no. And in order to do so you need to call a render engine from
Perl, unless you're happy with a thumbnail a la lynx screenshot.

AFAIK, IE can be remotely controlled. The next step is to capture it's
window as an image, and resize it.

Another option might be: check out if the image is already available in
Alexa or a search engine (some show thumbs, IIRC A9 does).
 
Z

zentara

Hi, I am not a Perl programmer but I need to know this so that I can
design a Perl script and get a programmer to code it:

Is there any Perl module that grabs a remote website and return a
thumbnail image?

Thanks.

Not directly, but you could do it in combination with a running web
broswer like mozilla. A decent programmer should be able to do the
following in a Perl script.

Steps.
1. Start mozilla and get it's X windowid from xwininfo

2. Load web pages into the browser from Perl using the -remote option

3. Wait a certain period to be certain the page is fully loaded in the
browser

4. Use "import" with the windowid option to capture the snapshot of the
browser's window

5. Make thumbnail
 
J

Jürgen Exner

Blue said:
Hi, I am not a Perl programmer but I need to know this so that I can
design a Perl script and get a programmer to code it:

Is there any Perl module that grabs a remote website

Several. For details see the FAQ: "How do I fetch an HTML file?"
and return a
thumbnail image?

Well, you would need to render that page first, wouldn't you. In other words
you need to run that page through a web browser.

jue
 
T

Ted Zlatanov

AFAIK no. And in order to do so you need to call a render engine from
Perl, unless you're happy with a thumbnail a la lynx screenshot.

AFAIK, IE can be remotely controlled. The next step is to capture it's
window as an image, and resize it.

Another option might be: check out if the image is already available in
Alexa or a search engine (some show thumbs, IIRC A9 does).

Mozilla, at least in early incarnations, had an embedding option so
you could embed a browser object in your own program (and thus grab
the visuals).

Perl does not have any built-in ability to do this AFAIK. Any methods
would require either external tool chains (in which case, Perl is no
better than any other script engine, and certainly no worse) or
embedding of Mozilla/IE at the C/C++ level (in which case, I would not
use Perl at the embedding level, but write a generic tool that can be
used by anyone).

Java can use the Spheryx HTML editor, which has a pretty good HTML +
CSS renderer, which can be used to grab a screenshot. I've used
Spheryx and it's very good IMHO, so if I had to do this from Perl I
would probably write a Java tool and chain it into Perl. Obviously
straight Java is better. Spheryx is pretty cheap commercial
software, and given my experience I would recommend it.

Here are some other links:

Free browser that will capture a web page to an image
http://www.faststone.org/FSBrowserDetail.htm

List of programs that can do HTML to image (look at Guangming Html To
Image for example)
http://snapfiles.com/shareware/gmm/swscreen.html

good luck, HTH
Ted
 
Z

zeroaffinity

I haven't used this utility, but it says it can operate from the
command line. Apparently what it does (or is supposed to do) is save a
web page as an image. It does requires windows though.

http://www.pixel-technology.com/freeware/url2bmp/english/

So if it works via command line, you should be able to call it from
Perl easily, have it generate an image, use an image library in Perl to
resize it if necessary, and then do something with the image ... ftp
somewhere, insert into a database, etc.

I hope this helps.
 
E

Erik Wasser

Blue said:
Is there any Perl module that grabs a remote website and return a
thumbnail image?

Rendering a web page is a tough job and I don't think that there are
existing perl solutions for that. If it's okay to call an external
program you can use 'kwebdesktop' (KDE application).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top