-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Make 'convert' the standard way to produce animated gifs (again) #11650
Comments
Dependencies: 11170 |
comment:2
Just by the by, what do you think about bundling GraphicsMagick (a fork of ImageMagick by a group of its original developers) with Sage? Apparently it is faster than ImageMagick (I'm told, by a user, that it is faster by a factor of three for these animation type things). It's also X11-licensed, so if I understand correctly it is possible to bundle it, unlike ImageMagick. The source occupies ~38 MB. |
Changed dependencies from 11170 to #11170 |
comment:4
I've never used GraphicsMagick, but I'll take a look some time. It would be nice to include it, if it's that small. Does it need libjpeg or anything else like that? |
comment:6
Here's a new patch; the only changes are the following: diff --git a/sage/plot/animate.py b/sage/plot/animate.py
--- a/sage/plot/animate.py
+++ b/sage/plot/animate.py
@@ -587,7 +587,7 @@ please install it and try again."""
print "Error running ffmpeg."
raise
- def save(self, filename=None, show_path=False):
+ def save(self, filename=None, show_path=False, use_ffmpeg=False):
"""
Save this animation.
@@ -598,6 +598,10 @@ please install it and try again."""
- ``show_path`` - boolean (default: False); if True,
print the path to the saved file
+ - ``use_ffmpeg`` - boolean (default: False); if True, use
+ 'ffmpeg' by default instead of 'convert' when creating GIF
+ files.
+
If filename is None, then in notebook mode, display the
animation; otherwise, save the animation to a GIF file. If
filename ends in '.sobj', save to an sobj file. Otherwise,
@@ -632,7 +636,8 @@ please install it and try again."""
suffix = '.gif'
if filename is None or suffix == '.gif':
- self.gif(savefile=filename, show_path=show_path)
+ self.gif(savefile=filename, show_path=show_path,
+ use_ffmpeg=use_ffmpeg)
return
elif suffix == '.sobj':
SageObject.save(self, filename) This allows you to do I'm not seeing the issue with |
Attachment: trac_11650-animate.patch.gz |
Merged: sage-4.8.alpha3 |
In ticket #11170, code was added so that if ffmpeg is present, it gets used by default to produce animated gifs. These can be much larger than the ones produced by 'convert', plus there may be other problems with ffmpeg. The attached patch makes 'convert' the default again.
Depends on #11170
Component: graphics
Keywords: animate convert ffmpeg
Author: John Palmieri
Reviewer: Dan Drake
Merged: sage-4.8.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/11650
The text was updated successfully, but these errors were encountered: