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 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)
After spending a few hours on ImageMagick with no result (I kept getting error messages), I decided to go for a Photoshop + Acrobat Pro solution. Here's how I did it.

---

Required software

* Acrobat Pro (I'm using Acrobat X), or any other PDF reader that allows you to export or save the PDF pages as images
* Photoshop (I'm using CS3, and presumably newer, or even slightly older, versions will work as well)

---

Steps:
------

1. Generate a PDF file of your Beamer slides
2. In Acrobat Pro, go to `File` > `Save as` > `Image` > `<select PNG or JPEG>`. In the pop-up window, select `Settings...` on the right, and under "Coversion" change "Resolution" to `600 pixels/inch` or above (the default resolution is very low). Then click `OK` and `Save`, and images of each page will be saved to the specified location as `<PDF_Name>_Page_#.png`.
3. Open Photoshop, go to `File` > `Script` > `Load Files into Stack`. `Browse` and select all the image files generated in step 2 and click `OK`. Now all the pages should be imported as layers of a Photoshop document.
4. Go to `Window` and select `Animation` to show the animate panel.
5. From the flyout menu in the top right of the animation panel, select `Make frames from layers`, and then `Reverse frames` to set the frames in correct order.
6. Select all the frames in the animation panel (click the first frame, and then `Shift`+click the last one), and choose a frame rate at the bottom right corner of any frame. You can also set the repeat option at the bottom left of the panel. Preview by clicking the play button.
7. Lastly, go to `File` > `Save for Web & Devices...` > `Save` (top right) > give it a name, and make sure to select `.gif` as the extension. Then we're done!

Note: If you want to crop the PDF file, then after step 6, select all layers in the layers panel, use the Crop Tool to crop the images.

![gif of string recognition](https://i.stack.imgur.com/1bphp.gif)

![gif of wave](https://i.stack.imgur.com/DPLAX.gif)