Hi,

 

Please review the following fix in JDK9 at your convenience:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-6334602 

 

Webrev : http://cr.openjdk.java.net/~jdv/6334602/webrev.00/ 

 

Issue : When we create GIF from Opaque PNG image and load it with Toolkit API's 
it is shown as transparent image.

 

Root cause : Issue happens only when we use disposal method - restore to 
background. Because in this case when getTransparentPixel() returns -1, we 
explicitly create transparent IndexColorModel so that we can restore to 
background. While doing this we lose the original IndexColorModel and always 
newly created transparent IndexColorModel will be considered.

 

Solution : After fix in JDK- 4233748 we have extended GifImageDecoder to 
include transparent pixel as part of ColorMap. There is no need for us to 
explicitly check for transparentPixel and try to override present 
IndexColorModel. So removed the logic for creating new transparent 
IndexColorModel in case of disposal method - restore to background.

 

Thanks,

Jay

 

Reply via email to