Closed sreerajp closed 9 months ago
Hi,
If ImageMagick is in the path, Damselfly will find it. If not, there's nothing I can do.
Sorry I can't be of more help.
ImageMagick is in path. But in your code you are checking for exitcode 0. It is returning exit code 4
Code for Test.exe namespace Test { class Program { private const string imageMagickExe = "convert"; static void Main(string[] args) {
var process = new Process();
process.StartInfo.FileName = imageMagickExe;
process.StartInfo.Arguments = "-version";
process.StartInfo.RedirectStandardError = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
var success = process.Start();
if (success)
{
process.WaitForExit();
Console.WriteLine("Success: " + process.ExitCode);
}
else {
Console.WriteLine("Failure");
}
}
}
}
According to SO, it looks like error code 4 is happening because a convert.exe command that isn't ImageMagick is being executed.
So I suspect the answer is to move the PATH entry for ImageMagick nearer to the start of the path. Either that, or copy convert.exe into the folder that Damselfly runs from.
I could add an option to explicitly specify the IM path, but
Sorry I can't help more.
If this is for HEIC support, I have a recently opened issue to handle that natively, rather than using ImageMagick. I'm far more likely to work on that. https://github.com/Webreaper/Damselfly/issues/479
ImageMagick not found is being shown while starting Damselfly server in Windows. ImageMagick is already installed. If we run the command "convert --version" the exitcode is 4.
Please fix