Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
简单使用GDK例子- 截全屏幕图
社区开发
2388
views ·
0
replies ·
To
floor
Go
lovesnow
deepin
2011-12-08 15:00
Author
import gtk.gdk
w = gtk.gdk.get_default_root_window()
width, height = w.get_size()
pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, width, height)
pb = pixbuf.get_from_drawable(w, w.get_colormap(), 0, 0, 0, 0, width, height)
if ( pb != None):
pb.save("screenshot.png", "png")
print "Screenshot saved to srceenshot.png"
else:
print "Unable to get the screenshot"
Copy the Code
:roll:
Reply
Like 0
Favorite
View the author
All Replies
No replies yet
Please
sign
in first
New Thread
Popular Ranking
Change
A Big Step for the Deepin Community in Ecuador
translation
deepin install 23
configurar teclado macbook pro 2011
Google Chrome webapps grouped incorrectly in the dock
Popular Events
More
:roll: