|
2 | 2 | Animated plots
|
3 | 3 |
|
4 | 4 | Animations are generated from a list (or other iterable) of graphics
|
5 |
| -objects. Images are produced by calling the ``save_image`` method on |
6 |
| -each input object, and using ImageMagick's ``convert`` program [IM] or |
7 |
| -``ffmpeg`` [FF] to generate an animation. The output format is GIF by |
8 |
| -default, but can be any of the formats supported by ``convert`` or |
9 |
| -``ffmpeg``. |
| 5 | +objects. |
| 6 | +Images are produced by calling the ``save_image`` method on each input |
| 7 | +object, creating a sequence of PNG files. |
| 8 | +These are then assembled to various target formats using different |
| 9 | +tools. |
| 10 | +In particular, the ``convert`` program from ImageMagick_ can be used to |
| 11 | +generate an animated GIF file. |
| 12 | +FFmpeg_ (with the command line program ``ffmpeg``) provides support for |
| 13 | +various video formats, but also an alternative method of generating |
| 14 | +animated GIFs. |
10 | 15 |
|
11 | 16 | .. Warning::
|
12 | 17 |
|
|
15 | 20 | convert`` at a command prompt to see if ``convert`` (part of the
|
16 | 21 | ImageMagick suite) is installed. If it is, you will be given its
|
17 | 22 | location. Similarly, you can check for ``ffmpeg`` with ``which
|
18 |
| - ffmpeg``. See [IM] or [FF] for installation instructions. |
| 23 | + ffmpeg``. See the websites of ImageMagick_ or FFmpeg_ for |
| 24 | + installation instructions. |
19 | 25 |
|
20 | 26 | EXAMPLES:
|
21 | 27 |
|
|
27 | 33 | Animation with 5 frames
|
28 | 34 | sage: a.show() # optional -- ImageMagick
|
29 | 35 |
|
30 |
| -Animate using ffmpeg instead of ImageMagick:: |
| 36 | +Animate using FFmpeg_ instead of ImageMagick:: |
31 | 37 |
|
32 | 38 | sage: f = sage.misc.temporary_file.tmp_filename(ext='.gif')
|
33 | 39 | sage: a.save(filename=f,use_ffmpeg=True) # optional -- ffmpeg
|
|
80 | 86 | - John Palmieri
|
81 | 87 | - Niles Johnson (2013-12): Expand to animate more graphics objects
|
82 | 88 |
|
83 |
| -REFERENCES: |
| 89 | +.. REFERENCES (not rendered as a section, but linked inline): |
84 | 90 |
|
85 |
| -.. [IM] http://www.imagemagick.org |
86 |
| -
|
87 |
| -.. [FF] http://www.ffmpeg.org |
| 91 | +.. _ImageMagick: http://www.imagemagick.org |
| 92 | +.. _FFmpeg: http://www.ffmpeg.org |
88 | 93 |
|
89 | 94 | """
|
90 | 95 |
|
|
0 commit comments