> 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).

Alexey Ivanov 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 seven additional 
commits since the last revision:

 - Merge master
 - Add @library to compile GIFWriter (/javax/imageio/plugins/gif)
 - Move GIFLoopAnimationTest.java to /sun/awt/image/gif/
 - Clarify the usage of `stoppingAnimation` (as well as `startingAnimation`)
 - 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:
  - all: https://git.openjdk.org/jdk/pull/33701/files
  - new: https://git.openjdk.org/jdk/pull/33701/files/b9dea664..e1d802eb

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

  Stats: 209690 lines in 2057 files changed: 78059 ins; 94819 del; 36812 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