Question: As a follow up to [Highlighting specific parts of a TikZ drawing](https://tex.stackexchange.com/questions/23548/highlighting-specific-parts-of-a-tikz-drawing), I'd like to know how to generate an animated image (`gif`) from a series of `beamer` slides.

Martin Scharrer came up with this example:

![Drawing 1](https://i.stack.imgur.com/3w9Xr.gif)

Some hints on cropping the PDF file are also welcome. `=)`

Answer: 
I generated that animated GIF the following way under Ubuntu Linux. It should work under other OSs as well because the external software is also available for Windows, Mac and others.

This assumes a `beamer` `frame` with several overlays as a starting point. The code for the GIF above can be found in my answer to [Highlighting specific parts of a TikZ drawing](https://tex.stackexchange.com/questions/23548/highlighting-specific-parts-of-a-tikz-drawing/23550#23550).

1. Ensure otherwise empty slides, e.g. `\setbeamertemplate{navigation symbols}{}%`
2. Ensure that all slides have the same size.
3. Compile to PDF (directly or indirectly).
4. Crop the PDF, e.g. using `pdfcrop <file>.pdf`.
5. Use [ImageMagick](http://www.imagemagick.org/script/index.php) to generate an animated GIF from the multi-page PDF:

```
convert -verbose -delay 50 -loop 0 -density 300 <file>-crop.pdf <file>.gif

```

Change the settings to your liking.  

`-verbose` is not really required.  

`-delay` states the duration of every image in the animation in 1/100 s.  

`-loop` states the number of repeats. `0` here means repeat indefinitely.  

`-density` determines the density for the raster image in dots-per-inch (dpi). This will influence the GIF size and is required because the PDF is a vector graphic. You can also use `300x300` etc. to select the X and Y density separately.

Here also an external example showing a diagram I had in one of my scientific publications: [MP-DPWM](https://i.imgur.com/mhphx.gif) (300k)

I might add support for this to `standalone`. Conversion support is already added in the developer version.
I do not know if my answer meets the requirements of how the answers should be posted on this site (since it has practically no `LaTeX` code involved), but here it comes.

---

With the emergence of online tools it has become easy to convert documents of a certain extent into others, without the need to download any programs. All those tools are easy-to-use and so not need any space in our computer.

Since the `beamer` output is a `PDF` file, we can convert `PDF` to `GIF` with [EZGIF](https://ezgif.com/pdf-to-gif) by following these simple steps:

1. `Upload` the PDF document
2. `Set up` the GIF (choose slides and delay amount)
3. `Convert!`

Here is an example:

[![enter image description here](https://i.stack.imgur.com/Q4wNz.gif)](https://i.stack.imgur.com/Q4wNz.gif)