CommmandLineProcess : ImageMagick
I am trying to use CommmandLineProcess step to flip an image using imageMagick commands. I have installed the imageMagick software on my machine and able to execute the commands on command prompt and operate on the images on my system, But when i configure a command in AEM CommandLineProcess step in a workflow and execute the workflow for an image i get the below error
09.06.2015 16:14:51.433 *INFO* [JobHandler: /etc/workflow/instances/2015-06-09/model_109813702252312:/content/dam/geometrixx/portraits/yolanda_huggins.jpg] com.day.cq.dam.core.process.CommandLineProcess execute: executing command line [convert C:\Users\MMANJA~1\AppData\Local\Temp\cqdam3684189622130797275.tmp/yolanda_huggins.jpg -flip C:\Users\MMANJA~1\AppData\Local\Temp\cqdam3684189622130797275.tmp/yolanda_huggins.flipped.jpg] for asset [/content/dam/geometrixx/portraits/yolanda_huggins.jpg].
09.06.2015 16:14:51.461 *ERROR* [JobHandler: /etc/workflow/instances/2015-06-09/model_109813702252312:/content/dam/geometrixx/portraits/yolanda_huggins.jpg] com.day.cq.dam.core.process.CommandLineProcess execute: failed to execute command [convert C:\Users\MMANJA~1\AppData\Local\Temp\cqdam3684189622130797275.tmp/yolanda_huggins.jpg -flip C:\Users\MMANJA~1\AppData\Local\Temp\cqdam3684189622130797275.tmp/yolanda_huggins.flipped.jpg] for asset [/content/dam/geometrixx/portraits/yolanda_huggins.jpg]: org.apache.commons.exec.ExecuteException: Process exited with an error: 4(Exit value: 4)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:346)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:136)
at com.day.cq.dam.core.process.CommandLineProcess.execute(CommandLineProcess.java:235)
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:208)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:139)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:378)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Below is the command
convert ${directory}/${filename} -flip ${directory}/${basename}.flipped.jpg
I have attached the screenshot of the dialog properties i have configured
I have verified the permissions for the folder it looks fine. Any help is appreciated.