As I got no answer I'd like to explain that the code is straight forward.

// setting up the svg file - this works as it should

Writer svg = new OutputStreamWriter(
new FileOutputStream(new File(output)),"UTF-8");
svgGenerator.stream(svg, true); svg.flush(); svg.close();
// at this point the svg drawing is available
// setting up the transcoder for jpeg translation


JPEGTranscoder t = new JPEGTranscoder();
t.addTranscodingHint(
JPEGTranscoder.KEY_QUALITY, new Float(.8));
// directing transcoder input to the just generated svg drawing


TranscoderInput tin = new TranscoderInput(
new File(output).toURL().toString());
// setting up the transcoder output to an arbitrary file


Writer jout = new OutputStreamWriter(
new FileOutputStream(new File(jpegOutput)));
TranscoderOutput tout = new TranscoderOutput(jout);
// do the translation from svg to jpeg


t.transcode(tin, tout); jout.flush(); jout.close();
// the problem here is that the output is empty but
// according to the example it should contain the same drawing with jpeg pixels

Has anybody tried that? Has to work that way?

Rolf



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to