From 970c98732f842b3bf9700cc218434f0e893f79fa Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 7 Feb 2011 08:36:51 +0000 Subject: [PATCH] Bugfix: toBufferedImage() didn't actually transfer the image data at all. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067879 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java b/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java index b2706c5c2..4bfc74a39 100644 --- a/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java +++ b/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java @@ -213,7 +213,9 @@ public final class BitmapImageUtil { WritableRaster wr = img.getColorModel().createCompatibleWritableRaster( img.getWidth(), img.getHeight()); boolean premult = img.getColorModel().isAlphaPremultiplied(); - return new BufferedImage(img.getColorModel(), wr, premult, null); + BufferedImage buf = new BufferedImage(img.getColorModel(), wr, premult, null); + transferImage(img, buf); + return buf; } } -- 2.39.5