projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a77ff1
)
2002/07/21 01:00:39
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:49:26 +0000
(06:49 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:49:26 +0000
(06:49 +0000)
darcs-hash:
20040130064926
-2ba56-
1cf0eeee0297a512f9401ec0fbc01ef45ba25849
.gz
src/org/xwt/PNG.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/PNG.java
b/src/org/xwt/PNG.java
index
1c06968
..
03b05f9
100644
(file)
--- 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;
/** 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;
int len = palette.length;
if (colorType == 3) {
transparency = true;