On Wed, 7 May 2025 02:58:01 GMT, Jeremy Wood <d...@openjdk.org> wrote:

>> 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 two additional 
> commits since the last revision:
> 
>  - 8356120: updating (c) year
>  - 8356137: cleaning up error message

Reopening: I think this PR should come first.

I have a set of 4 tickets related to GIF problems (8356137, 8356320, 8351913, 
and one TBD based on incident 9078482). I wrote a helper class GifComparison 
that all 4 PR's can use. It compares the output of the AWT-based parser with 
the ImageIO parser, and it fails if there's any deviation.

Once the GIfComparison clears code review the others PRs will be only a few 
lines of code.

This PR can pass in isolation.
The PR for the TBD bug can pass in isolation, but it's blocked by triage (for 
now).
The PR for 8356320 relies on the TBD bug to pass.
The PR for 8351913 can pass in isolation, but I want to save that for last 
because of [this 
comment](https://github.com/openjdk/jdk/pull/24271#issuecomment-2831430009)

With all 4 PRs merged: I've scanned over 100 modern gifs from popular websites 
(like giphy, pixabay) and found the ToolkitImage renderer to be identical to 
ImageIO's renderer. (And I've visually inspected most of those results, too.) 
So I don't anticipate adding to this set of 4 issues.

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

PR Comment: https://git.openjdk.org/jdk/pull/25044#issuecomment-2881889090

Reply via email to