]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #41488:
authorJeremias Maerki <jeremias@apache.org>
Sat, 3 Feb 2007 22:31:34 +0000 (22:31 +0000)
committerJeremias Maerki <jeremias@apache.org>
Sat, 3 Feb 2007 22:31:34 +0000 (22:31 +0000)
Fix for NPE with PNG images for RTF output.
Submitted by: Dominic Brügger <bruegger.at.puzzle.ch>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@503326 13f79535-47bb-0310-9956-ffa450edef68

src/java-1.4/org/apache/fop/image/ImageIOImage.java
status.xml

index ebb4a09eb4e5bacb244b679f20a0253c750dbbf1..1af4f0b9af35cad8fad6e87c613cbc078302a17a 100644 (file)
@@ -64,7 +64,10 @@ public class ImageIOImage extends AbstractFopImage {
      * @see org.apache.fop.image.AbstractFopImage#loadDimensions()
      */
     protected boolean loadDimensions() {
-        if (this.bitmaps == null) {
+        if ((this.width > 0) && (this.height > 0)) {
+            return true;
+        }
+        else if (this.bitmaps == null) {
             return loadBitmap();
         }
         return true;
index 5e11e4247a9d976a7af8b719ad1d7e54d7b0ee0d..49750b3d2bab67ef621fa9a1daf52adc87f7ef52 100644 (file)
@@ -28,6 +28,9 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="fix" fixes-bug="41488" due-to="Dominic Brügger">
+        Fix for NPE with PNG images for RTF output.
+      </action>
       <action context="Code" dev="JM" type="add">
         Support for soft masks (transparency) with ImageIO image adapter.
       </action>