0

I want to execute the imagemagick command in background instead of displaying the window console using ShellExecute or ShellExecuteEx, but can't get the output file.

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

2 Answers2

1

This is more of a comment than an answer. If your already writing application, why not include Magik++ library into your project?

#include <Magick++.h>

// ...
Magick::Image img("clipboard:myimage");
img.write("test.png");
// ...
emcconville
  • 23,800
  • 4
  • 50
  • 66
0

Given you wrote ShellExecuteEx I assume this is Windows?

See How to execute child console programs without showing the console window from the Win32 GUI program?

Community
  • 1
  • 1
moof2k
  • 1,678
  • 1
  • 17
  • 19