# show image one by one at a time

I have four images aligned in one slide and I want to show one picture at a time.

I was able to show the text using the code below

\begin{frame}
\begin{itemize}
\item<1-> Introduction
\item<2-> Algorithm for reducing finite automata
\item<3-> Reliability models
\item<4-> Reduction steps
\item<5-> References
\item<6-> Conclusion
\end{itemize}
\end{frame}


In the same way I want to show the images.

I have aligned the images as follows

\begin{frame}
\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc5.jpg}}
\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc6.jpg}}
\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc8.jpg}}
\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc7.jpg}}
\end{frame}

-
I think for this you can have a look to 4 images on a frame appearing each a a time fine tuning beamer. –  Claudio Fiandrino Oct 21 '12 at 11:07
you can wrap them in \only<3>{.....} to show just on the third layer –  David Carlisle Oct 21 '12 at 11:08
It would be useful if you show the definition of \vcenteredhbox or add a pointer for it. –  egreg Oct 21 '12 at 11:13

Maybe with \alt and \phantom, assuming you used the custom definition for \vcenteredhbox, that I found here.

\documentclass{beamer}
\usepackage{graphicx}

\newcommand*{\vcenteredhbox}[1]{\begingroup
\setbox0=\hbox{#1}\parbox{\wd0}{\box0}\endgroup}

\newcommand{\thepic}{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pic.png}}

\begin{document}

\begin{frame}
\vcenteredhbox{\thepic}
\vcenteredhbox{\alt<2->{\thepic}{\phantom{\thepic}}}
\vcenteredhbox{\alt<3->{\thepic}{\phantom{\thepic}}}
\vcenteredhbox{\alt<4->{\thepic}{\phantom{\thepic}}}
\end{frame}

\end{document}


-

Maybe just uncover would be sufficient.

\documentclass[demo]{beamer}

\newcommand*{\vcenteredhbox}[1]{#1}

\begin{document}

\begin{frame}
\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc5.jpg}}
\uncover<2->{\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc6.jpg}}}
\uncover<3->{\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc8.jpg}}}
\uncover<4->{\vcenteredhbox{\includegraphics[width=5cm,height=5cm,keepaspectratio]{pc7.jpg}}}
\end{frame}

\end{document}


-