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";
}
}