Re: Desktop screenshot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


Claudio


-- 
Claudio Saavedra <csaavedra@xxxxxxxxx>

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux