diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-02-07 11:44:49 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-02-07 11:44:49 +0000 |
commit | 42c14d6c02efdbdf41ed828a6f44941965a83f3a (patch) | |
tree | d50f13769713ee3ca33584094cb6358fec2c8699 /src/java-1.4 | |
parent | f183113d083c5e0306cc0e96f28445258419ceb5 (diff) | |
download | xmlgraphics-fop-42c14d6c02efdbdf41ed828a6f44941965a83f3a.tar.gz xmlgraphics-fop-42c14d6c02efdbdf41ed828a6f44941965a83f3a.zip |
Bugzilla #41488:
Fix for NPE with PNG images for RTF output.
Support for GIF images in RTF output (RTF handler, only. Does not affect the RTF library.).
Reverts revision 503326 and fixes the problem in a different way. But the fix is only a work-around and will need to be revisited when redesigning the image package. At any rate, the resolution problem introduced with the previous patch can been avoided with the new approach.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@504511 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java-1.4')
-rw-r--r-- | src/java-1.4/org/apache/fop/image/ImageIOImage.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/java-1.4/org/apache/fop/image/ImageIOImage.java b/src/java-1.4/org/apache/fop/image/ImageIOImage.java index 1af4f0b9a..7ec6b9004 100644 --- a/src/java-1.4/org/apache/fop/image/ImageIOImage.java +++ b/src/java-1.4/org/apache/fop/image/ImageIOImage.java @@ -64,10 +64,7 @@ public class ImageIOImage extends AbstractFopImage { * @see org.apache.fop.image.AbstractFopImage#loadDimensions() */ protected boolean loadDimensions() { - if ((this.width > 0) && (this.height > 0)) { - return true; - } - else if (this.bitmaps == null) { + if (this.bitmaps == null) { return loadBitmap(); } return true; @@ -211,7 +208,11 @@ public class ImageIOImage extends AbstractFopImage { /** @see org.apache.fop.image.AbstractFopImage#loadOriginalData() */ protected boolean loadOriginalData() { - return loadDefaultOriginalData(); + if (inputStream == null && getBitmaps() != null) { + return false; + } else { + return loadDefaultOriginalData(); + } } /** @see org.apache.fop.image.FopImage#hasSoftMask() */ |