You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2006/03/02 09:19:32 UTC
svn commit: r382317 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java
Author: jeremias
Date: Thu Mar 2 00:19:29 2006
New Revision: 382317
URL: http://svn.apache.org/viewcvs?rev=382317&view=rev
Log:
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.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java?rev=382317&r1=382316&r2=382317&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/SVGConverter.java Thu Mar 2 00:19:29 2006
@@ -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 @@
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 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);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org