6

In a Beamer document, I would like to insert an image that would be progressively "updated" from a very blurry version to the normal one in X seconds.

To give a concrete exemple, I would like to have a "reveal effect" such as the ones used on TV when giving the result of a presidential election.

How would you do that in Beamer ?

AlexG
  • 54,894
Manuel Selva
  • 1,839
  • You can use the animate package (works only in Adobe Reader), but you need to make the individual images with various levels of blur yourself. See for example https://tex.stackexchange.com/questions/117543/animation-using-a-sequence-of-images-in-a-single-pdf-file. – Marijn Jan 07 '20 at 14:15

1 Answers1

9

enter image description here

The sequence of images with changing grades of blur would need to be prepared with an external software, such as ImageMagick.org. Here, https://ctan.org/lion/files/ctan_lion_350x350.png is used as the source image:

for sigma in {0..10}
do
  magick convert ctan_lion_350x350.png -blur 0x$sigma ctan_lion_350x350_blurred_$sigma.png  
done

The <sigma> value in the convert option -blur 0x<sigma> may need to be played with for other source images. Bash is used here for convenience to build a loop around convert.

Example document with embedded animation (11 frames at 10 FPS give 1 s of duration)

\documentclass{beamer}
\usepackage{animate}
\usepackage{graphicx}

\begin{document}
\begin{frame}[allowframebreaks]{The \TeX{} Lion blurred}
  Go ahead.\\
\framebreak
  Here we are:
  \begin{center}
  \animategraphics[autoplay,width=0.5\linewidth]{10}{ctan_lion_350x350_blurred_}{10}{0}
  \end{center}
\end{frame}
\end{document}
AlexG
  • 54,894