How to make thumbnail image from web page?

M

Michele Dondi

^^^^^^
That's the interesting part. How do you render a web-page into a
pixmap? Subsampling is trivial.

I saw the question discussed recently. I can't remember whether here
or at PerlMonks. (Most probably, tertium non datur.) Off the top of my
memory, and probably in a sloppy way, options include (i) use a
rendering engine like gecko, or (ii) launch a browser and take a
screenshot. IIRC both actions can be automated in perl.


Michele
 
P

Peter J. Holzer

I saw the question discussed recently. I can't remember whether here
or at PerlMonks. (Most probably, tertium non datur.) Off the top of my
memory, and probably in a sloppy way, options include (i) use a
rendering engine like gecko,

Provided the rendering engine can render into a pixmap instead of a
window at all, and that it can be used from Perl.
or (ii) launch a browser and take a screenshot. IIRC both actions can
be automated in perl.

This limits you to the size of the browser window. Which is probably
what you want for a thumbnail, but I was thinking in a more general way
(sorry for not mentioning the shift in focus).

hp
 
M

Michele Dondi

Provided the rendering engine can render into a pixmap instead of a
window at all, and that it can be used from Perl.


This limits you to the size of the browser window. Which is probably
what you want for a thumbnail, but I was thinking in a more general way
(sorry for not mentioning the shift in focus).

As I wrote, I vaguely remember a discussion from people who do know
far better than me. Of course I may be entirely wrong.


Michele
 
A

A. Sinan Unur

Provided the rendering engine can render into a pixmap instead of a
window at all, and that it can be used from Perl.


This limits you to the size of the browser window. Which is probably
what you want for a thumbnail, but I was thinking in a more general
way (sorry for not mentioning the shift in focus).

There is a plugin for Firefox called Screengrab which I use. It is able
to take a snapshot of the entire contents of the browser window (not the
window decorations, though). Its source code might provide some clues.

Alternatively, on Win32, I would try to use Win32::GuiTest to scroll the
window as necessary (it is not obvious to me how I would figure that
out), take repeated snapshots using IrfanView and stitch them

Sinan
 
P

Peter J. Holzer

On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
Render, then subsample.
^^^^^^
That's the interesting part. How do you render a web-page into a
pixmap? Subsampling is trivial. [...]
or (ii) launch a browser and take a screenshot. IIRC both actions can
be automated in perl.

This limits you to the size of the browser window. Which is probably
what you want for a thumbnail, but I was thinking in a more general
way (sorry for not mentioning the shift in focus).

There is a plugin for Firefox called Screengrab which I use. It is able
to take a snapshot of the entire contents of the browser window (not the
window decorations, though).

Ah, that's a nice one. Didn't know that.

hp
 

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,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top