Animated Gifs

From UC_Chemistry

Jump to: navigation, search

Here is a nice way to create animated gifs using (e.g. pymol).


Procedure

Step 1:

Create a bunch of sequentially numbered png files e.g. file001.png, file002.png, ..., file<n>.png and make sure that their names are listed correctly when you type:

ls file*.png
ls file[0-9]??.png # if you have any trouble

Step 2:

Use ImageMagick's convert to make the png-s

convert -delay 20 -loop 0 file*.png animation.gif

Delay is in hundreths of a second and you can omit it if you want to find out how good your graphics acceleration is. The loop argument adds information on how many times to loop your animation (zero=infinite). Note that you can add -delay tags in-between files in the list to make an animation with more than one frame-rate.

NOTE: this works with jpg files as well.

Personal tools