Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to make thumbnail image from web page?

Reply
Thread Tools

How to make thumbnail image from web page?

 
 
Trenk
Guest
Posts: n/a
 
      12-05-2007
How to make thumbnail image from web page?
Some thing like networksolutions.com do.
eg. http://www.networksolutions.com/whoi...omain=perl.com

Tnx.


 
Reply With Quote
 
 
 
 
Marthan
Guest
Posts: n/a
 
      12-05-2007
Use PHP


"Trenk" <(E-Mail Removed)> wrote in message
news:fj5m11$t5$(E-Mail Removed)-com.hr...
> How to make thumbnail image from web page?
> Some thing like networksolutions.com do.
> eg. http://www.networksolutions.com/whoi...omain=perl.com
>
> Tnx.
>
>



 
Reply With Quote
 
 
 
 
Martina
Guest
Posts: n/a
 
      12-05-2007
Intersting question?
Try with ImageMagics


"Trenk" <(E-Mail Removed)> wrote in message
news:fj5m11$t5$(E-Mail Removed)-com.hr...
> How to make thumbnail image from web page?
> Some thing like networksolutions.com do.
> eg. http://www.networksolutions.com/whoi...omain=perl.com
>
> Tnx.
>
>



 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      12-05-2007
On 2007-12-05 09:39, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
> Trenk wrote:
>> How to make thumbnail image from web page?
>> Some thing like networksolutions.com do.
>> eg. http://www.networksolutions.com/whoi...omain=perl.com
>>
>> Tnx.
>>
>>

>
> Render, then subsample.

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

hp
 
Reply With Quote
 
Michele Dondi
Guest
Posts: n/a
 
      12-06-2007
On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
<(E-Mail Removed)> wrote:

>> Render, then subsample.

> ^^^^^^
> 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
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      12-08-2007
On 2007-12-06 10:15, Michele Dondi <(E-Mail Removed)> wrote:
> On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
><(E-Mail Removed)> wrote:
>>> Render, then subsample.

>> ^^^^^^
>> 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,


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

 
Reply With Quote
 
Michele Dondi
Guest
Posts: n/a
 
      12-08-2007
On Sat, 8 Dec 2007 11:45:55 +0100, "Peter J. Holzer"
<(E-Mail Removed)> wrote:

>> 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).


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
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      12-08-2007
"Peter J. Holzer" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On 2007-12-06 10:15, Michele Dondi <(E-Mail Removed)> wrote:
>> On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
>><(E-Mail Removed)> wrote:
>>>> Render, then subsample.
>>> ^^^^^^
>>> 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,

>
> 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).


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

--
A. Sinan Unur <(E-Mail Removed)>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>

 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      12-08-2007
On 2007-12-08 12:44, A. Sinan Unur <(E-Mail Removed)> wrote:
> "Peter J. Holzer" <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
>> On 2007-12-06 10:15, Michele Dondi <(E-Mail Removed)> wrote:
>>> On Thu, 6 Dec 2007 00:38:52 +0100, "Peter J. Holzer"
>>><(E-Mail Removed)> wrote:
>>>>> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Upload image thumbnail to Web Server ? Problem... tapasmahata Software 0 02-07-2008 10:03 AM
save uploaded image thumbnail to sql db image field dodgeyb ASP .Net 1 12-14-2007 04:29 PM
Displaying a Thumbnail vs. creating a thumbnail David Lozzi ASP .Net 1 02-01-2006 10:34 PM
Ruby way to make a thumbnail of an AVI on Linux Chris Pine Ruby 1 07-18-2004 02:46 PM



Advertisments