I have a tif image where I am trying to draw a box and compress the image with LZW compression simultaneously.
this is the command I am running, and it works fine from windows command line.
C:\ImageMagick-7.1.0\convert.exe "C:\Users\admin\Orig.tif" -draw "rectangle 576,1069,943,1114" -compress LZW "C:\Users\admin\DrawLZW.tif"
when I try to execute the same command with my java program, I get an image file created, but the file size is 1kb
String[] cmd = {"C:\\ImageMagick-7.1.0\\convert.exe", "\"C:\\Users\\chris.macwilliams\\Orig.tif\"", "-draw", "\"rectangle 576,1069,943,1114\"", "–compress","LZW", "\"C:\\Users\\chris.macwilliams\\DrawLZWwithJava.tif\""};
LOGGER.info(cmd);
Process pt = Runtime.getRuntime().exec(cmd);
pt.waitFor();
if (pt.exitValue() != 0) {
LOGGER.error("ERROR with Image Magic Command exit value:" + pt.exitValue()+ " "+ commandTIF);
Any Ideas here?
Using IM Version: ImageMagick-7.1.0 I have included the test images that I am getting the errors on. zip file download