Convert a SVG image to a JPEG image using Apache Batik
问题 I'm trying to convert a SVG image into JPEG as shown in https://xmlgraphics.apache.org/batik/using/transcoder.html#createImage example. Here is the code: public void saveAsjpeg() throws Exception { // Create a JPEG transcoder JPEGTranscoder t = new JPEGTranscoder(); // Set the transcoding hints. t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(.8)); // Create the transcoder input. String svgURI = new File(inputFilePath).toURL().toString(); TranscoderInput input = new TranscoderInput