I am getting CommandException while running the compare.run()
Exception:
org.im4java.core.CommandException: org.im4java.core.CommandException: 799603
at org.im4java.core.ImageCommand.run(ImageCommand.java:219)
Caused by: org.im4java.core.CommandException: 799603
at org.im4java.core.ImageCommand.finished(ImageCommand.java:253)
at org.im4java.process.ProcessStarter.run(ProcessStarter.java:314)
at org.im4java.core.ImageCommand.run(ImageCommand.java:215)
... 2 more
Code Snippet:
CompareCmd compare = new CompareCmd();
ArrayListOutputConsumer output = new ArrayListOutputConsumer();
IMOperation cmpOp = new IMOperation();
cmpOp.metric("AE"); // root mean squared (normalized root mean squared)
cmpOp.fuzz(10.0);
cmpOp.addImage();
cmpOp.addImage();
cmpOp.addImage();
please provide more information, like os-version, java-version and so on - the stack-trace is not really helpful. Please also try to run the command from the commandline, maybe this gives some insight. Does a simple convert example work for you, or does it fail as well?
Bernhard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running it on Mac OSX 10.9.2 and my java version is 1.7.0_45. I was able to run the command just fine from the command line. Even here the convert command converts the images to MIFF and the compare command throws exception. Let me know if you need more info to debug..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you have the same error on the commandline, then you should upgrade your ImageMagick installation (im4java just calls the commandline program). Maybe you can also ask on the ImageMagick forums for help.
Bernhard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you can't even run the test-case, it is probably not an error of im4java. Are you sure you have setup your environment correctly as described in the user's guide? If you run compare on the commandline you might have a different search-path.
Anyhow, if you want more help you should not post it here, but on the mailing list as documented on the im4java-homepage. The chance that some Mac users are reading the mailing-list is much higher.
Bernhard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting CommandException while running the compare.run()
Exception:
org.im4java.core.CommandException: org.im4java.core.CommandException: 799603
at org.im4java.core.ImageCommand.run(ImageCommand.java:219)
Caused by: org.im4java.core.CommandException: 799603
at org.im4java.core.ImageCommand.finished(ImageCommand.java:253)
at org.im4java.process.ProcessStarter.run(ProcessStarter.java:314)
at org.im4java.core.ImageCommand.run(ImageCommand.java:215)
... 2 more
Code Snippet:
CompareCmd compare = new CompareCmd();
ArrayListOutputConsumer output = new ArrayListOutputConsumer();
IMOperation cmpOp = new IMOperation();
cmpOp.metric("AE"); // root mean squared (normalized root mean squared)
cmpOp.fuzz(10.0);
cmpOp.addImage();
cmpOp.addImage();
cmpOp.addImage();
try {
compare.setOutputConsumer(output);
compare.run(cmpOp, getScreenshotDir+ "/MIFF-"+nonBaseImg,
getScreenshotDir+ "/MIFF-"+baseImg,
getScreenshotDir+ "/MIFF-"+nonBaseImg+"diff");
DisplayCmd.show(getScreenshotDir+ "/MIFF"+nonBaseImg+"diff");
log.info('\n');
} catch (IOException | InterruptedException | IM4JavaException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Hi,
please provide more information, like os-version, java-version and so on - the stack-trace is not really helpful. Please also try to run the command from the commandline, maybe this gives some insight. Does a simple convert example work for you, or does it fail as well?
Bernhard
I am running it on Mac OSX 10.9.2 and my java version is 1.7.0_45. I was able to run the command just fine from the command line. Even here the convert command converts the images to MIFF and the compare command throws exception. Let me know if you need more info to debug..
Hi,
if you have the same error on the commandline, then you should upgrade your ImageMagick installation (im4java just calls the commandline program). Maybe you can also ask on the ImageMagick forums for help.
Bernhard
Thats the thing I am not getting error when I run the same command through command line..
Can anybody help with the above issue? I can not even run the std Testcase24.java due to this issue..
If you can't even run the test-case, it is probably not an error of im4java. Are you sure you have setup your environment correctly as described in the user's guide? If you run compare on the commandline you might have a different search-path.
Anyhow, if you want more help you should not post it here, but on the mailing list as documented on the im4java-homepage. The chance that some Mac users are reading the mailing-list is much higher.
Bernhard