X11中的屏幕截图 [英] Screenshots in X11

查看:539
本文介绍了X11中的屏幕截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Xlib库可以使用哪些函数截取X11桌面的屏幕截图?我更喜欢一种比获取单个像素更有效的方法。 感谢。

What functions would one use to take a screenshot of an X11 desktop, using the Xlib library? I would prefer a method that's more efficient than getting individual pixels. Thanks.

推荐答案

X11中截取屏幕截图的标准工具是使用

The standard tool for taking screenshots in X11 is to use

xwd -root > myscreen.xwd

然后,使用

xwd2pnm myscreen.xwd > myscreen.pnm

因此,你可以找到xwd的源代码,看看它是如何实现的,
http:/ /cvsweb.xfree86.org/cvsweb/xc/programs/xwd/xwd.c?rev=HEAD&content-type=text/vnd.viewcvs-markup

Therefore, you can locate the source code of xwd and see how it is implemented, http://cvsweb.xfree86.org/cvsweb/xc/programs/xwd/xwd.c?rev=HEAD&content-type=text/vnd.viewcvs-markup

这篇关于X11中的屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆