-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta2
-
generic
-
generic
-
Verified
ImageIO.getImageWriter(reader) should return the preferred writer that can
encode the image read by the reader specified. But the above method returns
Null for PNG reader instead of returning the preferred writer for PNG.
Documentation says that this method returns the "preferred" writer, which is the
first in the list returned by javax.imageio.spi.ImageReaderSpi. getImageWriterSpiNames(). getImageWriterSpiNames() returns the corresponding
PNG writer perfectly when invoked with respect to the PNG readerSpi but still
getImageWriter() method fails.
Herewith I have attached the sample code which reproduces this bug.
Compile and run the sample code. You will get a frame with a load button.
Click the load button. if you see the message 'writer is null' at the prompt
then the bug is reporduced.
This works fine for JPEG.
I noticed this in Merlin-beta build 61.
encode the image read by the reader specified. But the above method returns
Null for PNG reader instead of returning the preferred writer for PNG.
Documentation says that this method returns the "preferred" writer, which is the
first in the list returned by javax.imageio.spi.ImageReaderSpi. getImageWriterSpiNames(). getImageWriterSpiNames() returns the corresponding
PNG writer perfectly when invoked with respect to the PNG readerSpi but still
getImageWriter() method fails.
Herewith I have attached the sample code which reproduces this bug.
Compile and run the sample code. You will get a frame with a load button.
Click the load button. if you see the message 'writer is null' at the prompt
then the bug is reporduced.
This works fine for JPEG.
I noticed this in Merlin-beta build 61.
- relates to
-
JDK-4395376 ImageIO.getImageWriter(ImageReader reader) throws ArrayIndexOutOfBoundsException
-
- Closed
-