ThumbnailTranscoder t = new ThumbnailTranscoder();
t.addTranscodingHint(PNGTranscoder.KEY_WIDTH, new Float(width));
t.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, new Float(height));
// Don't clone. Assume this is used safely.
TranscoderInput input = new TranscoderInput(document);
t.transcode(input, null);
return t.getLastImage();
}
/**
* Dump the SVG plot to a debug file.