Webreaper / Damselfly

Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageMagick not found

sreerajp opened this issue · comments

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

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

image

image

image

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.

https://stackoverflow.com/questions/50582885/imagemagick-convert-command-returning-error-code-4-when-used-with-php

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

  1. It's not really high on my list of priorities for Damselfly. I need to get image editing working, and face recognition up and running again.
  2. It would have to be Windows-only, and I don't really want to add OS specific logic.
  3. I only really support docker installations (as specified in the documentation) otherwise I'd spend my life trying to fix people's windows install issues, and I have little enough time to work on Damselfly as it is.

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. #479