Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4489762
Votes 0
Synopsis Error decoding 4-bit RLE compressed BMP image
Category jai:codec_sample
Reported Against 1.1 , 1.1.1-dev
Release Fixed
State 1-Dispatched, bug
Priority: 4-Low
Related Bugs 4504854
Submit Date 08-AUG-2001
Description
Error decoding 4-bit RLE compressed BMP image.
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   

Submitted On 02-APR-2003
ammwuh
I don't know if this is related, but I've been having problems
with decoding BMP images using JAI.create("url",...), both
with certain images being decoded into a corrupted form, and
others failing to decode with a 
java.lang.ArrayIndexOutOfBoundsException.

This was *only* happening when running in an applet - and
I've finally managed to trace it to the code in question
attempting to create a file in the temp folder and failing
because of the applets tightened up security policy.

The workaround was to supply a user/system policy file to the 
JRE being used by the plugin to run the applet that specified:
____

grant codeBase "http://yourserver/-" {
  permission java.io.FilePermission "${java.io.tmpdir}${/}
*", "read, write, delete";
};
____

If this the problem, presumably it can be avoided in future
releases by using an in-memory buffer/stream to decode
rather than storing the file in the local tmp directory.

Also, it only happens with certain BMPs - most work fine.



PLEASE NOTE: JDK6 is formerly known as Project Mustang