1
如何使用ImageMagick ++轻松截取C++中的X11屏幕截图,类似于“导入”命令?用ImageMagick ++捕获X11屏幕截图
如何使用ImageMagick ++轻松截取C++中的X11屏幕截图,类似于“导入”命令?用ImageMagick ++捕获X11屏幕截图
使用来源,卢克。如果您在ImageMagick ++中找不到它,请回退到它的依赖项。你要找的代码在ImageMagick的/棒/ import.c:
% ImportImageCommand() reads an image from any visible window on an X server
% and outputs it as an image file. You can capture a single window, the
% entire screen, or any rectangular portion of the screen. You can use the
% display utility for redisplay, printing, editing, formatting, archiving,
% image processing, etc. of the captured image.</dd>
如果你不希望它到一个文件,你必须弄清楚什么代码正在做自己的。这看起来是代码中唯一可以执行可访问X11显示的捕获的地方,所以这是您的出发点。
根窗口上的XGetImage?