Hi everybody, I'm using the transcoder functionality of batik 1.7 with more
or less the same code as in the batik page examples:

Transcoder transcoder = new JPEGTranscoder();
transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH, xResolution);
transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_HEIGHT,
yResolution);
Rectangle2D rectangle = new Rectangle2D.Double(0, 0, width, height);
transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_AOI, rectangle);
transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, .8f);
OutputStream ostream = null;
try {
  TranscoderInput input = new TranscoderInput(doc);
  ostream = new FileOutputStream("output.jpg");
  TranscoderOutput output = new TranscoderOutput(ostream);
  transcoder.transcode(input, output);
  ostream.flush();
} catch (Exception e) {
  e.printStackTrace();
} finally {
  IOUtils.closeQuietly(ostream);
}

Based on the input parameters (width, height, xResolution, yResolution) the
output image is sometimes blank or partially blank (some parts are sort of
truncated).

I see no reasons why some parts are converted and some others are not, for
the original SVG contains the same kind of elements in both converted and
blank areas.

I hope my problem is clear.

Thanks for your help
Paolo



--
View this message in context: 
http://batik.2283329.n4.nabble.com/Rasterized-image-is-totally-or-partially-blank-tp4656120.html
Sent from the Batik - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to