RFR: 8356137: GifImageDecode can produce opaque image when disposal method changes [v2]

Jeremy Wood duke at openjdk.org
Tue May 6 17:13:56 UTC 2025


> This resolves a gif parsing bug where an unwanted opaque rectangle could appear under these conditions:
> 
> 1. The disposal method for frames is 1 (meaning "do not dispose", aka "DISPOSAL_SAVE")
> 2. The transparent pixel is non-zero
> 3. There's more than one such consecutive frame
> 
> Previously: the GifImageDecoder would leave the saved_image pixels as zero when they were supposed to be transparent. This works great if the transparent pixel index is zero, but it flood fills the background of your frame with the zeroeth color otherwise.

Jeremy Wood has updated the pull request incrementally with five additional commits since the last revision:

 - 8356137: removing sentence fragment
   
   This is in response to:
   https://github.com/openjdk/jdk/pull/25044#discussion_r2075200131
 - 8356137: fixing typo
 - 8356137: adding empty line at bottom of file
   
   This is in response to:
   https://github.com/openjdk/jdk/pull/25044#discussion_r2075192144
 - 8356137: removing layered pass/fail pattern
   
   This is in response to:
   https://github.com/openjdk/jdk/pull/25044#discussion_r2075190122
 - 8356137: removing (c) 2002
   
   This is in response to:
   https://github.com/openjdk/jdk/pull/25044#discussion_r2075186796

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/25044/files
  - new: https://git.openjdk.org/jdk/pull/25044/files/5dbf7a11..925d558c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25044&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25044&range=00-01

  Stats: 10 lines in 1 file changed: 1 ins; 6 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/25044.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25044/head:pull/25044

PR: https://git.openjdk.org/jdk/pull/25044


More information about the client-libs-dev mailing list