I'm using im4java to call imagemagick from a grails app. The command line I'm trying to get it to use is convert "c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage.jpg" -resize 100x100 "c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage_thumbnail100.jpg"
or convert c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage.jpg -resize 100x100 c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage_thumbnail100.jpg
The args passed to ProcessBuilder look correct. There are 5 separate Strings as follows.
convert
c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage.jpg
-resize
100x100
c:\ZonesG\web-app\spresources\summarypage_images\00\09\18\myimage_thumbnail100.jpg
I get an error that the -resize parameter is not valid when I run it through processbuilder. That makes it seem as if it is calling the convert function, but something has happened to the parameters so that it no longer recognizes them. It's not the hypens in the directories. I tried it to different directories and it still doesn't work.
When I run it from the command line it works perfectly.
I've tried adding double quotes around the two file names. Again it works great in the command window but doesn't work from the java code.
Any Ideas?