IMOperation op = new IMOperation();
op.identify().list("format");
try {
final Pattern p = Pattern.compile("[\\s]+" + format.toUpperCase() + "[\\s]+rw");
final Boolean[] supported = new Boolean[1];
imageMagick.setOutputConsumer(new OutputConsumer() {
public void consumeOutput(InputStream is) throws IOException {
String output = IOUtils.toString(is);
Matcher m = p.matcher(output);
supported[0] = new Boolean(m.find());
}