Re: How to do a screenshot with PHP-GTK?
| From: | Justin Clift | Date: | Fri, 27 Aug 2004 04:05:30 +0000 |
| Subject: | Re: How to do a screenshot with PHP-GTK? | ||
| References: | 1 2 3 4 5 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5011@lists.php.net to get a copy of this message | ||
Scott Mattocks wrote:
<snip>
Ok so here is some more realistic psuedo code for the linux function
function printScreen($widget) {
exec('xwd -id ' . $widget->window->xid . ' -out /tmp/temp.img -silent');
my_convert_image_function('/tmp/temp.img/', 'screenshot.jpg');
}
Thanks Scott, that looks like it'll be really useful. :)
Regards and best wishes,
Justin Clift
The xid is a property of the gdkwindow which is a propetry of all gtkwidgets. Therefore you should be able to capture an image of an individual widget and it's children. Scott Mattocks