If a GIF image contains one frame and the loop count isn't set to 1, it is 
still animated.

The GIF decoder starts the animation thread that decodes the single frame over 
and over again. The image itself looks static, but decoding consumes CPU and 
memory.

The proposed fix stops animating the image if it contains one frame only.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Amend the bug id for #five-frames-loop5 subtest
 - Revert accidental changes to problem list
 - 8316165: GIF image with one frame set to loop indefinitely causes excessive 
memory usage

Changes: https://git.openjdk.org/jdk/pull/33701/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33701&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8316165
  Stats: 467 lines in 5 files changed: 464 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/33701.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33701/head:pull/33701

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

Reply via email to