I often have a small set of images that I’d like to combine into a single animated gif. I do this for moving screen shot examples among other things. This is easy to do with ImageMagick.
convert -delay 100 -loop 5 -dispose previous 1.png 2.png 3.png animated.gif
-delay is in hundredths of seconds.
A value of
-loop will result in an endless loop.
-dispose previous flag clears the previous frame before drawing the next (this is what you typically want). See the documentation for more information about that.