0
我无法弄清楚我需要为ImageMagick放置文件来处理它们。我试图在我的ASP.NET MVC网站中使用它,并没有找到我的文件进行处理。如果它确实如何指定它们的输出位置?imagemagick文件路径?获取'系统找不到指定的文件错误'
我一直在这里寻找和我MUT失去了一些东西: http://www.imagemagick.org/script/command-line-processing.php
这里是我的代码调用过程:
//Location of the ImageMagick applications
private const string pathImageMagick = @"C:\Program Files\ImageMagick-6.7.3-8";
private const string appImageMagick = "MagickCMD.exe";
CallImageMagick("convert -density 400 SampleCtalog.pdf -scale 2000x1000 hi-res%d.jpg");
private static string CallImageMagick(string fileArgs)
{
ProcessStartInfo startInfo = new ProcessStartInfo
{
Arguments = fileArgs,
WorkingDirectory = pathImageMagick,
FileName = appImageMagick,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true
};
using (Process exeProcess = Process.Start(startInfo))
{
string IMResponse = exeProcess.StandardOutput.ReadToEnd();
exeProcess.WaitForExit();
exeProcess.Close();
return !String.IsNullOrEmpty(IMResponse) ? IMResponse : "True";
}
}