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 ss...@apache.org on 2014/04/28 16:24:22 UTC
svn commit: r1590653 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java
Author: ssteiner
Date: Mon Apr 28 14:24:22 2014
New Revision: 1590653
URL: http://svn.apache.org/r1590653
Log:
FOP-2336 OOM for tiff output
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java?rev=1590653&r1=1590652&r2=1590653&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/AbstractBitmapDocumentHandler.java Mon Apr 28 14:24:22 2014
@@ -229,7 +229,9 @@ public abstract class AbstractBitmapDocu
}
//Set up bitmap to paint on
- this.currentImage = createBufferedImage(bitmapWidth, bitmapHeight);
+ if (currentImage == null || currentImage.getWidth() != bitmapWidth || currentImage.getHeight() != bitmapHeight) {
+ currentImage = createBufferedImage(bitmapWidth, bitmapHeight);
+ }
Graphics2D graphics2D = this.currentImage.createGraphics();
// draw page background
@@ -316,7 +318,6 @@ public abstract class AbstractBitmapDocu
this.multiImageWriter.writeImage(this.currentImage,
getSettings().getWriterParams());
}
- this.currentImage = null;
} catch (IOException ioe) {
throw new IFException("I/O error while encoding BufferedImage", ioe);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org