-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b43
-
generic
-
generic
-
Verified
I am reading a trasparent animated GIF imagr from a file using Toolkit API and drawing it to an INT_RGB buffered image. Then I am writing this buffered image to a file using GIF Writer. When I run this application, I am getting an IOException. This happens only for the first frame in the image.
This is reproducible on all platforms using the following PIT build:
java version "1.6.0-2d.pit-jcg-win-03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-2d.pit-jcg-win-03-java2d_25_may_2005_00_37-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b37, mixed mode)
Here is the exception:
java.io.IOException: Bad palette length: 1!
at com.sun.imageio.plugins.gif.GIFImageWriter.getNumBits(GIFImageWriter.java:133)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:638)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:487)
at WriterTest.createBufferedImage(WriterTest.java:99)
at WriterTest.<init>(WriterTest.java:46)
at WriterTest.main(WriterTest.java:111)
I have attached a sample test and a sample image. Run the test as follows:
java WriterTest gif animdog.gif
You would see the IOException on the console.
###@###.### 2005-05-26 16:42:48 GMT
This is reproducible on all platforms using the following PIT build:
java version "1.6.0-2d.pit-jcg-win-03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-2d.pit-jcg-win-03-java2d_25_may_2005_00_37-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b37, mixed mode)
Here is the exception:
java.io.IOException: Bad palette length: 1!
at com.sun.imageio.plugins.gif.GIFImageWriter.getNumBits(GIFImageWriter.java:133)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:638)
at com.sun.imageio.plugins.gif.GIFImageWriter.write(GIFImageWriter.java:487)
at WriterTest.createBufferedImage(WriterTest.java:99)
at WriterTest.<init>(WriterTest.java:46)
at WriterTest.main(WriterTest.java:111)
I have attached a sample test and a sample image. Run the test as follows:
java WriterTest gif animdog.gif
You would see the IOException on the console.
###@###.### 2005-05-26 16:42:48 GMT