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?