javaimagemagickimage-manipulationjmagick

JMagick: Program terminates unexpectedly and returns -1073740940


I am trying to do some image manipulations via JMagick interface to ImageMagick. The test program I tried compiles without a problem but during execution it gets stuck at the constructor of MagickImage and after some seconds of waiting the program terminates and returns -1073740940.

public static void main(String[] args)
{
    try
    {
        ImageInfo imageInfo = new ImageInfo( "test.jpg" );

        MagickImage magickImage = new MagickImage( imageInfo ); //<-- Here the program gets stuck

                    //Do some image manipulation
    }
    catch (MagickException e)
    {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

Has anyone an idea how to solve this?


Solution

  • I solved the problem: The version of the ImageMagick executables refered by the PATH variable must be exactly equal to the version of the JMagick library.