#11650: Make 'convert' the standard way to produce animated gifs (again)
--------------------------+-------------------------------------------------
   Reporter:  jhpalmieri  |          Owner:  jason, was            
       Type:  defect      |         Status:  needs_review          
   Priority:  major       |      Milestone:  sage-4.7.2            
  Component:  graphics    |       Keywords:  animate convert ffmpeg
Work_issues:              |       Upstream:  N/A                   
   Reviewer:              |         Author:  John Palmieri         
     Merged:              |   Dependencies:  #11170                
--------------------------+-------------------------------------------------
Changes (by jhpalmieri):

  * status:  needs_work => needs_review


Comment:

 Here's a new patch; the only changes are the following:
 {{{
 #!diff
 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 `a.save('foobar.gif', use_ffmpeg=True)`.

 I'm not seeing the issue with `delay` being a string.  Can you please try
 again?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11650#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to