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: 6198355
Votes 0
Synopsis JPEG 2000: Native reader fails to read image if data accessor (getWidth(), etc.) is invoked first
Category jai:codec_imageio
Reported Against
Release Fixed 1.0_01
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 21-NOV-2004
Description
Add reader.getWidth() to ReadTest before reader.read() and this exception results:

Exception in thread "main" java.lang.IllegalArgumentException: The destination or source region is empty.
        at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.computeRegionsWrapper(J2KImageReader.java:180)
        at com.sun.media.imageioimpl.plugins.jpeg2000.J2KRenderedImageCodecLib.<init>(J2KRenderedImageCodecLib.java:179)
        at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLib.read(J2KImageReaderCodecLib.java:281)
        at javax.imageio.ImageReader.read(ImageReader.java:919)
        at ReadTest.<init>(ReadTest.java:117)
        at ReadTest.main(ReadTest.java:65)
Work Around
N/A
Evaluation
The various data accessors read the header to get the required information but do not reset the stream after so doing.
  xxxxx@xxxxx   2004-11-21 21:01:00 GMT
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang