gpt4 book ai didi

c++ - 使用 ImageMagick++ 捕获 X11 屏幕截图

转载 作者:太空宇宙 更新时间:2023-11-04 14:25:47 25 4
gpt4 key购买 nike

我如何使用 ImageMagick++ 在 C++ 中轻松截取 X11 屏幕的屏幕截图,类似于“导入”命令?

最佳答案

使用来源,卢克。如果在 ImageMagick++ 中找不到它,请回退到它的依赖项。您要查找的代码在 ImageMagick/wand/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 显示的实际捕获的唯一位置,因此这是您的起点。

关于c++ - 使用 ImageMagick++ 捕获 X11 屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4089320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com