The goal I'm trying to achieve is to make up an SVG DOM tree by making a series of 
calls to 
SVGGraphics2D. Then while the data for the image is still in the DOM tree (ie still in 
the 
org.w3c.dom.Document) I'd like to give it to JPEGTranscoder. 

In other words, I'd like to avoid the overhead of streaming out the DOM tree. I'd like 
to go directly to 
JPEG after making all the SVGGraphics2D calls. 

It looks like it might be possible to use the Document tree originally given to the 
constructor of the 
SVGGraphics2D object as the input to the constructor for 
org.apache.batik.transcoder.TranscoderInput. 
Then it seems like it ought to be possible to call  
org.apache.batik.transcoder.image.JPEGTranscoder 
object with that TranscoderInput object using the transcode method it inherits from:
   org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(TranscoderInput input, 
TranscoderOutput output)

First of all, is this supposed to be possible to do?

Secondly, do I need to perform any manipulation to the Document object before giving 
it to the 
TranscoderInput constructor?

I ask the second question because SVGGraphics2D.stream(Element svgRoot, Writer writer, 
boolean 
useCss) adds an svgRoot to svgDocument before trying to stream it out. So I'm 
wondering whether 
adding that would be a good or bad or indifferent thing to do before trying to 
generate a JPEG from the 
Docuiment. 





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

Reply via email to