On Tue, 27 May 2025 14:19:23 GMT, Jayathirth D V <[email protected]> wrote:
> I think this is better then current approach of having check multiple times.
OK. I switched back to this approach.
(The downside being: now we'll invoke Arrays.fill(..) for *all* gifs with that
disposal method. I assume (?) gifs with this architecture/problem are a small
subset of that group; but it's impossible to quantify that hunch.)
> test/jdk/sun/awt/image/gif/GifEmptyBackgroundTest.java line 40:
>
>> 38: BufferedImage bi = GifComparison.run(srcURL);
>> 39:
>> 40: if (new Color(bi.getRGB(20, 20), true).getAlpha() != 0) {
>
> Without the product fix this test fails while checking opacity of (0,0)
> itself and we don't hit this check.
>
> `Exception in thread "main" java.lang.Error: pixels at (0, 0) have different
> opacities: 0 vs ff000000`
OK, this is removed.
That was a redundant check intended to:
A. Reinforce what inspired this test
B. Double-check that ImageIO also did the right thing. (That is: the new
GifComparison makes sure ImageIO and ToolkitImage are identical. But if they
happened to *both* be wrong then GifComparison would be satisfied, so this
confirmed the test gif file really was parsed correctly.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25044#issuecomment-2913381669
PR Review Comment: https://git.openjdk.org/jdk/pull/25044#discussion_r2109776140