Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们需要通过单击 X11 中的按钮来拍摄正在运行的应用程序的快照。我们使用 XCopyArea 函数并将当前图像复制到 Pixmap 中。我们需要一种方法来与硬盘中的图像文件相同。请帮助我们。提前致谢。
您可以使用以下命令将 Pixmap 写入文件:
int XWriteBitmapFile(Display *display, char *filename, Pixmap bitmap, unsigned int width, unsigned int height, int x_hot, int y_hot);