Thanks.  Does this just slow things down, or does it change the
output?

There are at least three alternatives to imagemagick.  One is to use
javascript to animate frames; the result wouldn't be saveable though.
There's a 2-year-old ticket for this that no one ever got quite right:
http://trac.sagemath.org/sage_trac/ticket/1483

Another option is to use Ogg and Theora codecs.  This is tracked at:
http://trac.sagemath.org/sage_trac/ticket/7298

Finally, what I do currently is to use ffmpeg.  Because of patent and
license issues I think this cannot be part of the standard Sage, but
it does a great job and is very flexible.  For larger movies this is
crucial, since I don't think much compression is possible with GIFs.

-Marshall

On Apr 1, 7:48 pm, ObsessiveMathsFreak <[email protected]>
wrote:
> I was having a problem with sage when trying to animate large images
> with many frames. Essentially, when the image was either being shown
> or saved to a gif file, the Imagemagick convert process would consumes
> gigabytes of memory, go out to swap, and the whole system would grind
> to a halt.
>
> I managed to solve this problem, as Imagemagick has done this to me
> before. The fix involves changing the command in the animate.py file
> where imagemagick is called.
>
> The convert command line needs to be changed from
>
> cmd = 'cd "%s"; sage-native-execute convert -delay %s -loop %s *.png
> "%s"'%(d, int(delay), int(iterations), savefile)
>
> to something like the following
>
> cmd = 'cd "%s"; sage-native-execute convert -limit memory 64mb -limit
> map 64mb -limit area 64mb -limit disk 128mb -delay %s -loop %s *.png
> "%s"'%(d, int(delay), int(iterations), savefile)
>
> Note the inclusion of resource usage limit commands. The numbers here
> I have essentially plucked from mid air. They work for me, but
> obviously need more looking into.
>
> I hope this is of use to anyone who may be having the same problem
> with showing and saving large animations.

-- 
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-support
URL: http://www.sagemath.org

Reply via email to