From 015cd9ee6f07d60c6f29550b44d465568a3074c4 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 2 Mar 2006 08:19:29 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/render/rtf/SVGConverter.java | 6 ++++-- 1 file 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); -- 2.39.5