Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
简单使用GDK例子- 截全屏幕图
社区开发
2410
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
deepin donwloader don't catch download launch from browsers
deepin 23 internal testing update on December 20, 2024
Popular Events
More
:roll: