About the hanging thread:
Are you using JDK 1.3.x? If you are, I believe this happening because AWT can't
run headlessly in 1.3.x.
About the file not being created:
Have you tried setting your OutputStream to an absolute path. ie.
"C:\\testNHEM.png".
--Marc
Quoting Nico H�ffffe9monic <[EMAIL PROTECTED]>:
> Hi everybody,
>
> I would like to convert a svg file into a png file (I would prefer GIF file,
> but it is not
> implemented yet).
> When I try to transcode my svg, everything seems to go right until the end of
> the program.
> In fact, the program does not finish well. It seems that some threads are
> still alive and waiting
> for something. Last but not the least: My PNG file is not created!
>
> Here is my code (it is the same as the example of Batik)
>
> PNGTranscoder t = new PNGTranscoder();
> // create the transcoder input
> String svgURI = new File("C:\\partage\\test.svg").toURL().toString();
> TranscoderInput input = new TranscoderInput(svgURI);
> // create the transcoder output
> OutputStream ostream = new FileOutputStream("testNHEM.png");
> TranscoderOutput output = new TranscoderOutput(ostream);
> // save the image
> t.transcode(input, output);
> // flush and close the stream then exit
> ostream.flush();
> ostream.close();
>
> Here are the list of the thread which stay alive:
> - SunToolkit.PostEventQueue
> - AWT-EventQueue
> - AWT-Windows
>
> I have tried to put "System.exit(0)" at the end, but the PNG file is still
> not created.
>
> Do you know what goes wrong?
>
> Thanks in advance for your help
>
> Nicolas
>
>
>
>
>
>
> Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
> Cr�ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
>
> Dialoguez en direct avec vos amis gr�ce � Yahoo! Messenger !T�l�chargez
> Yahoo! Messenger sur http://fr.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
-------------------------------------------------
FastQ Communications
Providing Innovative Internet Solutions Since 1993
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]