How to get a PNG (alpha channel) screenshot of Gtk window?
问题 Gtk windows support transparency using Cairo. I tried to get a screenshot with the code here. But it prints pure black for windows that use transparency. How can I make a screenshot (PNG) which caputures the alpha channel too? EDIT: I tried with alpha pixbuf, but the output is still with no alpha. Here's my code (sing Gtk#, but it's pretty identical to C): static void GetScreenshot(Gtk.Window win) { var pixbuf = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, true, 8, 500, 500); var pix = pixbuf