Skip to content

endless looping GIFs with PillowWriter #11789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/users/next_whats_new/endless_gif.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:orphan:

Endless Looping GIFs with PillowWriter
--------------------------------------

We acknowledge that most people want to watch a gif more than once. Saving an animation
as a gif with PillowWriter now produces an endless looping gif.
2 changes: 1 addition & 1 deletion lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def grab_frame(self, **savefig_kwargs):
def finish(self):
self._frames[0].save(
self._outfile, save_all=True, append_images=self._frames[1:],
duration=int(1000 / self.fps))
duration=int(1000 / self.fps), loop=0)


# Base class of ffmpeg information. Has the config keys and the common set
Expand Down