Re: [CentOS] convert webpage to image

2013-08-14 Thread Joseph Spenner
>From: Brian Mathis 

>To: CentOS mailing list  
>Sent: Wednesday, August 14, 2013 7:59 AM
>Subject: Re: [CentOS] convert webpage to image
 
>
>This will do exactly what you want without resorting to hackery or using
>external services.  It has a component to convert to both pdf or an image
>and uses webkit.
>   http://code.google.com/p/wkhtmltopdf/


Brian:
  That's pretty cool!   Adding to my list of cool stuff.
Thanks for the link!


(gave wrong guy credit in previous post.  sorry.   :)

 --If life gives you lemons, keep them-- because hey.. 
free lemons.
"~heart~ Sticker"  fixer:  http://microflush.org/stuff/stickers/heartFix.html
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Joseph Spenner
> On Wed, Aug 14, 2013 at 8:47 AM, Carl T. Miller  wrote:

>
>
> This will do exactly what you want without resorting to hackery or using
> external services.  It has a component to convert to both pdf or an image
> and uses webkit.
>     http://code.google.com/p/wkhtmltopdf/

Carl:
  That's pretty cool!   Adding to my list of cool stuff.
Thanks for the link!
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Carl T. Miller
Brian Mathis wrote:
> On Wed, Aug 14, 2013 at 8:47 AM, Carl T. Miller  wrote:
>
>> What is the easiest way to convert a webpage into a jpg
>> or png file?  I've seen several programs that can do
>> various conversions, but nothing open source that can
>> do it in a single conversion.
>
> This will do exactly what you want without resorting to hackery or using
> external services.  It has a component to convert to both pdf or an image
> and uses webkit.
> http://code.google.com/p/wkhtmltopdf/

Yes, this looks like a winner.  It looks like wkhtmltoimage
will do everything I want.  Thanks!

c


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Todd Edwards
On 08/14/2013 11:00 AM, Mihai T. Lazarescu wrote:
> On Wed, Aug 14, 2013 at 03:38:33PM +0100, Marko Vojinovic wrote:
>
>> But what if the size of the website is larger than the screen
>> size?  I assume the OP wants to "see" the whole website in a
>> single picture, and the website might span more than a single
>> visible screen (and require scrolling to see the whole thing).
>>
>> All screenshot-related methods would then need to take
>> multiple pictures, scroll the website in the browser a
>> "windowfull" at a time in all directions, and afterwards
>> calculate how to concatenate all those pictures into a
>> big one.  While this can be done in principle, I think that
>> any implementation would get Real Ugly Real Soon(tm).
>>
>> A more reasonable approach would be to have the browser
>> itself dump the image of the site --- the browser is the one
>> actually rendering the thing from html in the first place.
>> Any browser plugins around for this?
> Among those interactive, the Screengrab Firefox extension
> does it.  Among those non-interactive, phantomjs should do it.
>
> Mihai

phantomjs + rasterize.js (ships with phantomjs in the examples folder) 
is probably the route that I would go...

https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js

usage:
 phantomjs rasterize.js http://www.google.com google.png
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Mihai T. Lazarescu
On Wed, Aug 14, 2013 at 03:38:33PM +0100, Marko Vojinovic wrote:

> But what if the size of the website is larger than the screen
> size?  I assume the OP wants to "see" the whole website in a
> single picture, and the website might span more than a single
> visible screen (and require scrolling to see the whole thing).
>
> All screenshot-related methods would then need to take
> multiple pictures, scroll the website in the browser a
> "windowfull" at a time in all directions, and afterwards
> calculate how to concatenate all those pictures into a
> big one.  While this can be done in principle, I think that
> any implementation would get Real Ugly Real Soon(tm).
>
> A more reasonable approach would be to have the browser
> itself dump the image of the site --- the browser is the one
> actually rendering the thing from html in the first place.
> Any browser plugins around for this?

Among those interactive, the Screengrab Firefox extension
does it.  Among those non-interactive, phantomjs should do it.

Mihai
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread m . roth
Marko Vojinovic wrote:
> On Wed, 14 Aug 2013 07:20:03 -0700 (PDT)
> Joseph Spenner  wrote:
>> >From: Carl T. Miller 
>> >To: CentOS 
>> >Sent: Wednesday, August 14, 2013 5:47 AM
>> >Subject: [CentOS] convert webpage to image
>> >
>> >What is the easiest way to convert a webpage into a jpg
>> >or png file?  I've seen several programs that can do
>> >various conversions, but nothing open source that can
>> >do it in a single conversion.
>>
>> I wrote a few lines to do this, but it involves using firefox, and
>> 'import' from ImageMagick.

> But what if the size of the website is larger than the screen size? I
> assume the OP wants to "see" the whole website in a single picture, and
> the website might span more than a single visible screen (and require
> scrolling to see the whole thing).

, repeat as needed.

   mark

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Brian Mathis
On Wed, Aug 14, 2013 at 8:47 AM, Carl T. Miller  wrote:

> What is the easiest way to convert a webpage into a jpg
> or png file?  I've seen several programs that can do
> various conversions, but nothing open source that can
> do it in a single conversion.
>
> Just wondering if anyone on the list has suggestions
> for something I can put into a script to convert a
> webpage into a file I can use with my screensaver.
>
> c
>


This will do exactly what you want without resorting to hackery or using
external services.  It has a component to convert to both pdf or an image
and uses webkit.
http://code.google.com/p/wkhtmltopdf/

The binaries are standalone and require no special dependencies.  The
command line is sensitive to the order you place options, but otherwise it
works very well.


❧ Brian Mathis
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Marko Vojinovic
On Wed, 14 Aug 2013 07:20:03 -0700 (PDT)
Joseph Spenner  wrote:
> >From: Carl T. Miller 
> >To: CentOS  
> >Sent: Wednesday, August 14, 2013 5:47 AM
> >Subject: [CentOS] convert webpage to image
> >
> >What is the easiest way to convert a webpage into a jpg
> >or png file?  I've seen several programs that can do
> >various conversions, but nothing open source that can
> >do it in a single conversion.
> 
> I wrote a few lines to do this, but it involves using firefox, and
> 'import' from ImageMagick.
> 
> The first script starts firefox in a virtual frame:
> 
> ===
> Xvfb :2 -screen 0 1280x1024x24 > /dev/null 2>&1 &
> export DISPLAY=localhost:2.0
> 
> firefox http://ip.of.your.page/page.html &
> ===
> 
> Then the second script captures/crops what I want:
> 
> ===
> export DISPLAY=localhost:2.0
> import -crop '1024x512+54+235' -window root /path/to/result.png
> ==
> 
> You'll have to adjust the crop values to what you want.

But what if the size of the website is larger than the screen size? I
assume the OP wants to "see" the whole website in a single picture, and
the website might span more than a single visible screen (and require
scrolling to see the whole thing).

All screenshot-related methods would then need to take multiple
pictures, scroll the website in the browser a "windowfull" at a time in
all directions, and afterwards calculate how to concatenate all those
pictures into a big one. While this can be done in principle, I think
that any implementation would get Real Ugly Real Soon(tm).

A more reasonable approach would be to have the browser itself dump the
image of the site --- the browser is the one actually rendering the
thing from html in the first place. Any browser plugins around for this?

Best, :-)
Marko

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Filip Bartmann
I use firefox extension ScreenGrab -
https://addons.mozilla.org/cs/firefox/addon/screengrab-fix-version/

Filip Bartmann

On Wed, 14 Aug 2013 10:16:40 -0400
Scott Robbins  wrote:

> On Wed, Aug 14, 2013 at 09:58:46AM -0400, m.r...@5-cent.us wrote:
> > Carl T. Miller wrote:
> > > What is the easiest way to convert a webpage into a jpg
> > > or png file?  I've seen several programs that can do
> > > various conversions, but nothing open source that can
> > > do it in a single conversion.
> > >
> 
> If you just need what is on your screen, you could use ImageMagick's
> import command.  You select what you need with the mouse, and save it
> as an image format, for example
> 
> import myshot.jpg
> 
> 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Joseph Spenner
>From: Carl T. Miller 

>To: CentOS  
>Sent: Wednesday, August 14, 2013 5:47 AM
>Subject: [CentOS] convert webpage to image
 
>
>What is the easiest way to convert a webpage into a jpg
>or png file?  I've seen several programs that can do
>various conversions, but nothing open source that can
>do it in a single conversion.

I wrote a few lines to do this, but it involves using firefox, and 'import' 
from ImageMagick.

The first script starts firefox in a virtual frame:

===
Xvfb :2 -screen 0 1280x1024x24 > /dev/null 2>&1 &
export DISPLAY=localhost:2.0

firefox http://ip.of.your.page/page.html &
===

Then the second script captures/crops what I want:

===
export DISPLAY=localhost:2.0
import -crop '1024x512+54+235' -window root /path/to/result.png
==

You'll have to adjust the crop values to what you want.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Scott Robbins
On Wed, Aug 14, 2013 at 09:58:46AM -0400, m.r...@5-cent.us wrote:
> Carl T. Miller wrote:
> > What is the easiest way to convert a webpage into a jpg
> > or png file?  I've seen several programs that can do
> > various conversions, but nothing open source that can
> > do it in a single conversion.
> >

If you just need what is on your screen, you could use ImageMagick's
import command.  You select what you need with the mouse, and save it as
an image format, for example

import myshot.jpg


-- 
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread m . roth
Carl T. Miller wrote:
> What is the easiest way to convert a webpage into a jpg
> or png file?  I've seen several programs that can do
> various conversions, but nothing open source that can
> do it in a single conversion.
>
> Just wondering if anyone on the list has suggestions
> for something I can put into a script to convert a
> webpage into a file I can use with my screensaver.

A script? You could easily take a window capture with the Gimp.

  mark

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Steve Clark
On 08/14/2013 09:19 AM, Marios Zindilis wrote:
> On 08/14/2013 04:08 PM, Yves Bellefeuille wrote:
>> On Wednesday 14 August 2013, "Carl T. Miller"  wrote:
>>
>>> What is the easiest way to convert a webpage into a jpg
>>> or png file?
>> JPEG isn't an appropriate format for text. I'm not sure about PNG.
>>
> I use http://snapito.com/
>
> It stores screenshots in PNG format, and has a really simple API that I
> call with wget.
>
Do you want do this automagically?  If not you could use ksnapshot, then use 
gimp to remove the
surrounding browser junk.

-- 
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.cl...@netwolves.com
http://www.netwolves.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Marios Zindilis
On 08/14/2013 04:08 PM, Yves Bellefeuille wrote:
> On Wednesday 14 August 2013, "Carl T. Miller"  wrote:
>
>> What is the easiest way to convert a webpage into a jpg
>> or png file?
>
> JPEG isn't an appropriate format for text. I'm not sure about PNG.
>

I use http://snapito.com/

It stores screenshots in PNG format, and has a really simple API that I 
call with wget.

-- 
Marios Zindilis
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Yves Bellefeuille
On Wednesday 14 August 2013, "Carl T. Miller"  wrote:

> What is the easiest way to convert a webpage into a jpg
> or png file?  

JPEG isn't an appropriate format for text. I'm not sure about PNG.

-- 
Yves Bellefeuille 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Giles Coochey

On 14/08/2013 13:59, Leon Jacobs wrote:
I don't really think this is on topic, 


I'm assuming he's using Centos and wants a solution to a task he wants 
to do with it. So possibly tenuously on-topic...


--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
gi...@coochey.net


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Leon Jacobs
On Wed, Aug 14, 2013 at 2:47 PM, Carl T. Miller  wrote:

> What is the easiest way to convert a webpage into a jpg
> or png file?  I've seen several programs that can do
> various conversions, but nothing open source that can
> do it in a single conversion.
>
> Just wondering if anyone on the list has suggestions
> for something I can put into a script to convert a
> webpage into a file I can use with my screensaver.
>

I don't really think this is on topic, but regardless, have a look at
phantomjs' [1] rendering capabilities [2].

Ciao
-- 
Regards
Leon


[1] http://phantomjs.org/
[2] https://github.com/ariya/phantomjs/wiki/Screen-Capture
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] convert webpage to image

2013-08-14 Thread Giles Coochey

On 14/08/2013 13:47, Carl T. Miller wrote:

What is the easiest way to convert a webpage into a jpg
or png file?  I've seen several programs that can do
various conversions, but nothing open source that can
do it in a single conversion.

Just wondering if anyone on the list has suggestions
for something I can put into a script to convert a
webpage into a file I can use with my screensaver.

c


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
Perhaps use one of the PDF printing tools (where you can print to a PDF 
file) and then use convert from ImageMagick to convert the PDF file to a 
graphics format.?


--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
gi...@coochey.net


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] convert webpage to image

2013-08-14 Thread Carl T. Miller
What is the easiest way to convert a webpage into a jpg
or png file?  I've seen several programs that can do
various conversions, but nothing open source that can
do it in a single conversion.

Just wondering if anyone on the list has suggestions
for something I can put into a script to convert a
webpage into a file I can use with my screensaver.

c


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos