How to run ImageMagick compareCmd in Java? Getting error magick no images found for operation `-metric' at CLI arg 1

How do you run CompareCmd in Java from imageMagick version 7?

The previous versions running compare would run compare, but now in

version 7 running compare runs magick compare, which throws error

magick: no images found for operation `-metric' at CLI arg 1 @

error/operation.c/CLIOption/5227. Please advise.

CompareCmd compare = new CompareCmd();

compare.setErrorConsumer(StandardStream.STDERR);

IMOperation op = new IMOperation();

op.metric("AE");

op.fuzz(10.0);

op.addImage(screenShotPath1);

op.addImage(screenShotPath2);

op.addImage(imageCompareResultFile.getAbsolutePath());

//Execute the Operation

try {

compare.run(op);

isSame=true;

}

catch (Exception e)

{

isSame=false;

}...

Read More »

By: StackOverFlow - Saturday, 21 July

Related Posts