Beamer: Image Animation

Beamer makes it very easy to include a series of images and display them in a serial animated style in separate frames (slides).

For example, to display the images foobar-0.png, foobar-1.png and foobar-2.png in a serial fashion use:

\usepackage{xmpmulti}
\begin{frame}
\multiinclude[format=png]{foobar}
\end{frame}

xmpmulti is a package that ships along with the Beamer package. \multiinclude is the command that takes care of putting the foobar-x.png into different frames. Make sure that the files are named as basename-number.format, i.e., the basename and the number are separated by a hyphen. The format option is the extension of the files.

\multiinclude starts from file number 0. To start from a different number, say 9:

\multiinclude[format=png,start=9]{foobar}

\multiinclude inserts all files that are in the above format. To make it stop at a certain number, say 7:

\multiinclude[format=png,end=7]{foobar}

Typically, images are inserted using the \includegraphics command. The settings passed to \includegraphics can be passed to \multiinclude using its graphics option. For example, to set the scale of the image to 0.3:

\multiinclude[format=png,graphics={scale=0.3}]{foobar}

By default, the images are placed one on top of another. To replace each image by the next image try:

\multiinclude[<+>][format=png]{foobar}

4 thoughts on “Beamer: Image Animation

  1. This doesn’t work for me. It just has all of the slides with all of the images superimposed. I’m never using Beamer again :( .

    • Ian: Check if your Beamer documentclass is set to handout mode. In handout mode, Beamer will produce slides for printout, where it will overlay (or superimpose) the frames of the animation.

  2. It works for me! awesome..but, can we hv the images to NOT to be placed on top of another? I have a diagram that need another image to explain in details about one process in the diagram. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s