Hi, I have a question of using gdk_pixbuf_get_from_drawable(). I have the following code which save the gdk window to a png file. But something I get something which is totally not what is displayed on the window. Can you please tell me what am I missing?
GdkWindow *window ; if (window != NULL) { int x, y, width, height, depth; gdk_window_get_geometry( window, &x, &y, &width, &height, &depth ); printf (" width=%d, height=%d\n", width, height); /* copy the pixmap from the treeview and from the title */ pb = gdk_pixbuf_get_from_drawable(NULL, GDK_DRAWABLE(window), NULL, 0, 0, 0, 0, width, height); /* save the pixbuf to a png file */ gdk_pixbuf_save(pb, filename, "png", NULL, "compression", "9", NULL); } Thank you.
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list