Browse Source

Disabled the resolution setting because it can lead to ugly side-effects. Resolution is poort now (72dpi) but at least the SVG gets rendered correctly.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@382317 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_92-beta
Jeremias Maerki 18 years ago
parent
commit
015cd9ee6f
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/java/org/apache/fop/render/rtf/SVGConverter.java

+ 4
- 2
src/java/org/apache/fop/render/rtf/SVGConverter.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 2005 The Apache Software Foundation.
* Copyright 2005-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@ package org.apache.fop.render.rtf;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.ImageTranscoder;
import org.apache.batik.transcoder.image.JPEGTranscoder;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.logging.Log;
@@ -49,8 +48,11 @@ public final class SVGConverter {
*/
public static byte[] convertToJPEG(XMLImage image) {
JPEGTranscoder transcoder = new JPEGTranscoder();
/* TODO Disabled to avoid side-effect due to the mixing of source and target resolutions
* This should be reenabled when it has been determined how exactly to handle this
transcoder.addTranscodingHint(ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER,
new Float(25.4f / 300)); //300dpi should be enough for now.
*/
transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(0.9f));
TranscoderInput input = new TranscoderInput(image.getDocument());
ByteArrayOutputStream baout = new ByteArrayOutputStream(16384);

Loading…
Cancel
Save