create im4java equivalent code for imageMagick to find histogram
I am trying to execute following command using im4java API -
convert C:/a.tif -compress Group4 -fill black +opaque "rgb(255,255,255)" -format %c histogram:info:
below is the code snippet
IMOperation op = new IMOperation();
op.compress("Group4");
op.fill("black");
op.p_opaque(""rgb(255,255,255)"");
op.format("%c histogram:info:");
op.addImage();
ConvertCmd convert = new ConvertCmd();
convert.run(op, "C:/a.tif");
It gives me following error -
org.im4java.core.CommandException: org.im4java.core.CommandException: convert.exe: no images defined `C:/a.tif' @ error/convert.c/ConvertImageCommand/3254. at org.im4java.core.ImageCommand.run(ImageCommand.java:215)
The file exists at the desired location.
链接地址: http://www.djcxy.com/p/90926.html