C++ 运行 imagemagick 命令

标签 c++ command imagemagick

我想在后台执行 imagemagick 命令,而不是使用 ShellExecute 显示窗口控制台或 ShellExecuteEx , 但无法获取输出文件。

ShellExecuteEx(0, _T("open"), _T("D:/convert.exe"),
               _T("convert clipboard:myimage test.png"), NULL, SW_HIDE)

最佳答案

这更像是评论而不是答案。如果你已经在写 申请,为什么不包括Magik++ library进入你的项目?

#include <Magick++.h>

// ...
Magick::Image img("clipboard:myimage");
img.write("test.png");
// ...

关于C++ 运行 imagemagick 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34603420/

相关文章:

c++ - 在短范围内验证字符串

c++ - 为什么有时需要写 `typename T` 而不是 `T` ?

linux - jmeter执行复杂的shell命令

带转义字符的 Linux 命令

node.js - 通过保持纵横比nodejs将图像大小调整为精确大小

c++ - 断点当前不会被命中。没有与此行关联的可执行代码

c++ - 用于 pthreads 的对象定义中指向对象的指针的草率解决方案

jsf - JSF CommandButton onclick不调用Javascript函数

php - 在 ImageMagick 和 PHP 上以自动调整大小的 PNG 创建透明背景

Node.js 在 Windows 7 上看不到 ImageMagick