Skip to content

Commit

Permalink
don't try to save all the frames when saving to a format that doesn't…
Browse files Browse the repository at this point in the history
… support that
  • Loading branch information
sl1-1 committed Feb 24, 2020
1 parent 75f5c24 commit bec78db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libweasyl/libweasyl/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _write(self, out, *args, **kwargs):
kwargs['format'] = kwargs['format'].lower()
if kwargs['format'] == 'jpg':
kwargs['format'] = 'jpeg'
if self.is_animated:
if self.is_animated and kwargs['format'] in ['gif', 'webp']:
kwargs['save_all'] = True
kwargs['append_images'] = self._frames[1:]
kwargs['duration'] = self.duration
Expand Down

0 comments on commit bec78db

Please sign in to comment.