BufferedImage diff =
SVGRenderingAccuracyTest.buildDiffImage(ref, img);
String s = new File(filename).getName();
s = ("test-references/org/apache/batik/transcoder/image/"+
"candidate-variation/"+s);
PNGImageEncoder encoder
= new PNGImageEncoder
(new FileOutputStream(s),
PNGEncodeParam.getDefaultEncodeParam(diff));
encoder.encode(diff);
report.addDescriptionEntry(DIFFERENCE_IMAGE,new File(s));
} catch (Exception e) { }
}