Hi Zentara,

I would like to thank you for timely response.

But when I execute this code it gave lots of compliataion error, I have
attached the screen shot.
Pls help me to run this code successfully and to get the output.
And also wanted to know that do I need to do any pre-requisite procedure
beofre running this code.

your quick response and help with this regard would be very much
appriciated.

Awaiting for your quick response.

Thanks,
Srinivasa Prasad

-----Original Message-----
From: zentara [mailto:zent...@highstream.net]
Sent: Tuesday, January 13, 2009 7:13 PM
To: beginners@perl.org
Subject: Re: need help on perl script

On Tue, 13 Jan 2009 10:46:29 +0530, srinivasa.pras...@wipro.com wrote:


>"Take the inputs as for perl scripts and java objects and measure the
>resolution of the desktop image by a screen image capture through a
>print screen"
>I have to write the perl script for the above scenario. Pls help me how

Grabs the root screen.

#!/usr/bin/perl
use warnings;
use strict;

use Gtk2 -init;
my $s = Gtk2::Gdk::Screen->get_default;
my $w = $s->get_root_window;

my $p = Gtk2::Gdk::Pixbuf->get_from_drawable (
            $w, undef, 0, 0, 0, 0, $s->get_width, $s->get_height);

$p->save ($0.'.jpg', 'jpeg', quality => 10); __END__


zentara



Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to