Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.13
-
None
-
None
-
None
Description
Please consider such code I use for rendering PNG from SVG. We use it for rendering various icon sizes. The majority of sizes are rendered as expected (correct.png) but some are being rendered incorrect (especially 180 and 360). That affects only some environments - on the majority of our MacBooks it works fine for most trials and on VMs it usually results in incorrect PNG rendered as below. Also, I didn't notice it happening for any other text strings that the one from the sample (that obviously doesn't mean it is the only one causing that).
May I ask you to check if that is something to be considered a batik bug? Or, if not - please please point me any investigation directions in terms of my code correctness, possible environment issues worth checking?
Thanks!
Sample code:
```
PNGTranscoder t = new PNGTranscoder()
{
@Override
protected ImageRenderer createRenderer()
};
float size = 180.0f;
// Set the transcoding hints.
t.addTranscodingHint(PNGTranscoder.KEY_WIDTH, size);
t.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, size);
// Create the transcoder input.
String svgURI = new File(args[0]).toURI().toString();
TranscoderInput input = new TranscoderInput(svgURI);
// Create the transcoder output.
OutputStream ostream = new FileOutputStream("out.png");
TranscoderOutput output = new TranscoderOutput(ostream);
// Save the image.
t.transcode(input, output);
```