Hello,

Yes it is possible, even if Batik does not help a lot for Vector images (new raster formats seem to be very simple to transcode to, if you are able to write a File of your format of choice with a BufferedImage).

For Vector formats: You can subclass the SVGAbstractTranscoder class to make Batik writing in a Graphics2D pipeline (you can borrow some code from ImageTranscoder. Then you "only" need to write another Graphics2D subclass to output to your format. You may even be able to keep the structure of the original SVG document, if you format also has a nested structure. I wrote several transcoders this way from SVG to specific proprietary formats and it worked well for me.

Thinking about that, I should send a patch with an abstract subclass of SVGAbstractTranscoder which takes care of some of the dirty work (approx. 800 lines, but I'm sure it could have been shorter). Maybe it could be useful to somebody apart from me, after all ;-)

Hervé Girod

Fei chang wrote:
Hi all,

I am using Batik for converting svg to other format picture. That format is defined by myself. Is it possible ? any idea.
Thanks a lot ....
 Fei Chang

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

Reply via email to