git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@472508
13f79535-47bb-0310-9956-
ffa450edef68
// Encode PNG image
ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor(getMimeType());
+ if (writer == null) {
+ throw new IOException("Could not get an ImageWriter to produce "
+ + getMimeType() + ". The most likely explanation for this is a class"
+ + " loading problem.");
+ }
log.debug("Writing image using " + writer.getClass().getName());
writer.writeImage(image, os, params);
} finally {