Michael Voyes wrote:
Ok, it is working with the command add-on concerning memory. Furthermore, the result is GOOD.
I'm therefore wondering if my code is good :
remember :
I would take the approach taken in contrib/tiledTranscoder/TiledImageTranscoder (which it looks like
you filched code from). In particular I'm not sure the GVT tree
is good after 'transcode(...)' completes (the bridge context is
disposed of which _may_ be the source of your problems).
So I would subclass SVGAbstractTranscoder and generate your output in the transcode method. Don't try and use anything from the transcoder after the transcode method completes.
OutputStream outputStream = new FileOutputStream (outputFileName); ByteArrayOutputStream ostream = new ByteArrayOutputStream(); TranscoderOutput output = new TranscoderOutput(ostream); SVGAbstractTranscoder transDoc = new SVGAbstractTranscoder(); transDoc.transcode((Document)doc, (OutputStream)outputFileName, output); Filter f = transDoc.root.getGraphicsNodeRable(true); curTxf = new AffineTransform(); RenderContext rc = new RenderContext(curTxf, null, null); RenderedImage img = f.createRendering(rc);
you seem to not agree with this piece of code to Render the doc DOM. Again, if this code is causing the wrong result i described (and it seems to be the case), i'm asking what is your piece of code advise to get the good result taking a DOM in input ?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]