Hello,
My program transforms  svg data into  jpeg
JPEGTranscoder t = new JPEGTranscoder();
   TranscoderInput input = new TranscoderInput(document);
   TranscoderOutput output = new TranscoderOutput(ostream);
   t.transcode(input, output);

If I have an image referenced from my svg it won't get rendered onto target jpeg. I'll get jpeg with "broken image" sign where an image used to be in SVG.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>

<svg contentScriptType="text/ecmascript" width="600.0px" xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify" contentStyleType="text/css" height="600.0px" preserveAspectRatio="xMidYMid meet"
    xmlns="http://www.w3.org/2000/svg"; version="1.0">
*<image x="94.0" y="120.0" width="278.0" xlink:href="157935032_30ff9bc6f8.jpg" height="148.0"
        preserveAspectRatio="none"/>*
</svg>


As I understand batik transcoder renders svg into sort of canvas and then raw image data are encoded into jpeg. I think svg which references image from the file-system loads image too late, that is after it has been encoded into result data. I guess there should be way of tweaking batik transformer with sleep or timeout when loading external resources.

Is it a feature limitation of batik or there is a way to overcome it? How would you suggest transforming such svg files into jpeg?

If anyone has investigated this issue I would appreciate any help.

thank you,
Nazar


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

Reply via email to