X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPNG.java;h=03b05f9426050a69a8745896500bc12a7b70901e;hb=d0548addbb58927955df317a6f7eb1435ea07394;hp=1c06968bb954cb53cfb6e5cfaae99db6d57bb7f5;hpb=4a77ff1c730ec929befb3a031d6ac5f7061ccb33;p=org.ibex.core.git diff --git a/src/org/xwt/PNG.java b/src/org/xwt/PNG.java index 1c06968..03b05f9 100644 --- a/src/org/xwt/PNG.java +++ b/src/org/xwt/PNG.java @@ -159,7 +159,11 @@ public class PNG implements ImageDecoder { /** handle transparency chunk; modifies palette */ private void handletRNS() throws IOException { int chunkLen = chunkLength; - if (palette == null) throw new IOException("tRNS chunk encountered before pLTE"); + if (palette == null) { + if (Log.on) Log.log(this, "warning: tRNS chunk encountered before pLTE; ignoring alpha channel"); + inputStream.skip(chunkLength); + return; + } int len = palette.length; if (colorType == 3) { transparency = true;