From e2c7140243263b2d7d27074c68004fbb5ffa05fa Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 6 Aug 2008 19:37:18 +0000 Subject: [PATCH] Bugfix: Don't use getWidth/Height() from superclass as this is accessing the original size, not the effective size of the bitmap (could have been rendered to a different size by an image converter). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@683383 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/render/pdf/ImageRenderedAdapter.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java b/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java index e8988244f..5ddcd06c6 100644 --- a/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java +++ b/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java @@ -75,6 +75,18 @@ public class ImageRenderedAdapter extends AbstractImageAdapter { return ((ImageRendered)this.image); } + /** {@inheritDoc} */ + public int getWidth() { + RenderedImage ri = getImage().getRenderedImage(); + return ri.getWidth(); + } + + /** {@inheritDoc} */ + public int getHeight() { + RenderedImage ri = getImage().getRenderedImage(); + return ri.getHeight(); + } + private ColorModel getEffectiveColorModel() { return encodingHelper.getEncodedColorModel(); } -- 2.39.5