How can I save the pixel of a GdkWindow/GdkWidget to a file?



Hi,

Can someone please tell me can I save the pixel of a GdkWindow/GdkWidget to a file?


The only think I find is saving from a GdkDrawable (the 2 functions below). But how can I get a GdkDrawable from a GdkWidget/GdkWindow?

GdkPixbuf* pixBuf = gdk_pixbuf_get_from_drawable (NULL,
gd, NULL, 0, 0, 0, 0, w, h);

gdk_pixbuf_save (pixBuf, "snapshot.png", "png", &err, NULL);

Thank you.
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.




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