aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-03-02 08:19:29 +0000
committerJeremias Maerki <jeremias@apache.org>2006-03-02 08:19:29 +0000
commit015cd9ee6f07d60c6f29550b44d465568a3074c4 (patch)
tree07f0758d110e0389f1cc4197b567b7ecec27ec9a /src/java/org/apache
parent1526176a7d4b7b8edd0a4981f000debe591832a1 (diff)
downloadxmlgraphics-fop-015cd9ee6f07d60c6f29550b44d465568a3074c4.tar.gz
xmlgraphics-fop-015cd9ee6f07d60c6f29550b44d465568a3074c4.zip
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
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/render/rtf/SVGConverter.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/rtf/SVGConverter.java b/src/java/org/apache/fop/render/rtf/SVGConverter.java
index f8fb5f275..e608c6f1d 100644
--- a/src/java/org/apache/fop/render/rtf/SVGConverter.java
+++ b/src/java/org/apache/fop/render/rtf/SVGConverter.java
@@ -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);