From: Jeremias Maerki Date: Wed, 6 Aug 2008 19:37:18 +0000 (+0000) Subject: Bugfix: Don't use getWidth/Height() from superclass as this is accessing the original... X-Git-Tag: fop-1_0~115^2~158 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e2c7140243263b2d7d27074c68004fbb5ffa05fa;p=xmlgraphics-fop.git 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 --- 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(); }