2003/12/25 23:54:52
[org.ibex.core.git] / src / org / xwt / translators / PNG.java
index a3578f9..6b7b11f 100644 (file)
@@ -33,6 +33,7 @@ public class PNG {
         if (g == null) g = new PNG();
         try {
             g._load(is, p);
+            p.data = g.data;
         } catch (Exception e) {
             if (Log.on) Log.log(PNG.class, e);
             return;
@@ -59,7 +60,7 @@ public class PNG {
         if ((inputStream.read() != 137) || (inputStream.read() != 80) || (inputStream.read() != 78) || (inputStream.read() != 71) ||
             (inputStream.read() != 13) || (inputStream.read() != 10) || (inputStream.read() != 26) || (inputStream.read() != 10)) {
             Log.log(this, "PNG: error: input file is not a PNG file");
-            data = new int[] { };
+            data = p.data = new int[] { };
             p.width = p.height = 0;
             return;
         }
@@ -558,7 +559,7 @@ public class PNG {
     private boolean complete = false;
     private boolean error = false;
 
-    private int[] data = null;
+    int[] data = null;
 
     private InputStream underlyingStream = null;
     private DataInputStream inputStream = null;