RFR: 8351913: ToolkitImage renders some gifs wrong [v5]
Jeremy Wood
duke at openjdk.org
Mon May 26 05:13:50 UTC 2025
> I do not have much background in LZW compression or in C, but I'm reasonably confident this resolves the problem I'm observing. It looks like the GifImageDecoder was not always correctly handling compression codes after the table reached its limit of ~4096. If anyone has suggestions for improvements I'm happy to make adjustments.
>
> Luckily while debugging this: I was able to compare the flawed implementation (GifImageDecoder) with ImageIO's implementation (GIFImageReader) to help identify how the suffix/prefix tables are supposed to work.
>
> ImageIO's implementation may have suffered a similar bug (maybe https://bugs.openjdk.org/browse/JDK-7131823 ?), and that appears to have been backported.
>
> I have dozens of additional test cases for this problem, but unfortunately I don't have the rights to commit them to the OpenJDK repo. Feel free to email me for additional context/test cases.
Jeremy Wood has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 29 additional commits since the last revision:
- 8356320: trivial whitespace and comment changes
- Merge branch 'master' into JDK-8351913
- Merge branch 'master' of https://github.com/mickleness/jdk
- 8351913: renaming class, rewording comment
There's a cluster of 4 related gif tickets I intend to put in this /gif/ directory. I want to better clarify exactly what this test focuses on.
- GifComparison: fixing error message
- GifComparison: code cleanup
- 8351913: change package to access GifComparison
- GifComparison: adding common helper class for gif bugs
- Merge branch 'master' into JDK-8351913
- Merge branch 'master' of https://github.com/mickleness/jdk
- ... and 19 more: https://git.openjdk.org/jdk/compare/088fc5f5...e5dbed64
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24271/files
- new: https://git.openjdk.org/jdk/pull/24271/files/1733a85e..e5dbed64
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24271&range=03-04
Stats: 125812 lines in 2777 files changed: 77417 ins; 33246 del; 15149 mod
Patch: https://git.openjdk.org/jdk/pull/24271.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24271/head:pull/24271
PR: https://git.openjdk.org/jdk/pull/24271
More information about the client-libs-dev
mailing list