I am running the example SaveAsJpeg.java on Batik :

JPEGTranscoder transcoder = new JPEGTranscoder(  );

// set the transcoding hints
transcoder.addTranscodingHint( JPEGTranscoder.KEY_QUALITY, new Float(
.8 ) );

// create the transcoder input
//String svgURI = new File( "Images/BPOBeanTemplate.svg");
String svgURI =
"D:/DevlTools/Eclipse/workspace/Project_For_Testing/Images/BPOBeanTemplate.s
vg";
TranscoderInput input = new TranscoderInput( svgURI );

// create the transcoder output
OutputStream ostream = new FileOutputStream(
"D:/DevlTools/Eclipse/workspace/Project_For_Testing/Archived_Images/out.jpg"
 );
TranscoderOutput output = new TranscoderOutput( ostream );

// save the image
transcoder.transcode( input, output );

// flush and close the stream then exit
ostream.flush(  );
ostream.close(  );

But I am getting this exception :

java.io.IOException: Unable to make sense of URL for connection
        at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown Source)
        at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
        at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
        at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
        at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
        at testing.Testing.main(Testing.java:44)
ERROR : org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
Unable to make sense of URL for connection

I find this strange, because when I am pasting the URL for svgURI, I can see
the image.
So, what do I do wrong ?

Thanks in advance
/Gergely

Ps.What is the loaction of the page where I can see the mailing lists (
where this message
will appear ) ? Ds.



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

Reply via email to