Re: Desktop screenshot
- From: Andy Bell <andy bell allbabel com>
- To: gtk-list gnome org
- Subject: Re: Desktop screenshot
- Date: Mon, 26 Apr 2010 13:49:45 +0200
On Mon, Apr 26, 2010 at 1:47 PM, Claudio Saavedra
<csaavedra gnome org> wrote:
On Mon, 2010-04-26 at 13:37 +0200, Andy Bell wrote:
> Hi,
>
>
> I am trying to get a screenshot of the desktop by using a transparent
> GtkWidget and then using gdk_pixbuf_get_from_drawable. When I check
> the saved GdkPixbuf I am getting a valid image, but the image does not
> include the background of the desktop but just the GtkWidget itself.
> Is there any way of working around this?
Why not simply doing something like this?
window = gdk_get_default_root_window ();
gdk_drawable_get_size (window, &width, &height);
image = gdk_pixbuf_get_from_drawable (NULL, window,
gdk_drawable_get_colormap(window),
0, 0,
0, 0,
width, height);
I just found that method and it works, thanks for quick reply!!
Andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]