# How to make framezoom zoomed image fit the slide

I'm currently trying to zoom in to (more or less) the top half of an image on a slide in latex beamer class. How can I tell LaTeX to make the zoomed image fit the slide (see attached image)? This is an MWE. In my actual presentation I see that the right area is selected, but the left border of the zoomed image is in the center of the slide. Both the size and the position of the zoomed image make it go off-screen. How can i prevent this behavior, e.g. specify size and position of the zoomed image on the new slide?

MWE

\documentclass{beamer}
\usepackage{mwe}

\begin{document}

\begin{frame}

\frametitle{\huge Title}
\framezoom<1><2>[border=0](0.3cm,0.7cm)(5.6cm,3.1cm)
\begin{figure}[ht]
\includegraphics[width=0.77\textwidth,height=0.77\textheight,keepaspectratio]{example-image}
\end{figure}

\end{frame}

\end{document}


Sorry for the large image, I don't know how to make it smaller.

• You should do \framezoom<1><2>[border=0](1.3cm,0.5cm)(8.2cm,3cm). Right now, you are zooming some white area as well. Clearly visible, if you use border=1 or bigger. Please see tex.stackexchange.com/a/130110 for more explanations. – LaRiFaRi Jun 2 '15 at 9:35

Use border=1 in order to see what you are actually about to zoom. Right now, you have been zooming some white area as well. The following MWE should do what you want.

% arara: pdflatex

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{\huge Spectrum}
\framezoom<1><2>(1.3cm,0.5cm)(8.2cm,3cm)
\begin{figure}
\includegraphics[width=0.77\textwidth,height=0.77\textheight,keepaspectratio]{example-image}
\end{figure}
\end{frame}
\end{document}


• Thank you for your answer. Weirdly, before it used to take the dimensions relative to the border of the image, now it takes it relative to the border of the slide. Maybe because I removed the center environment for the MWE. – stebu92 Jun 2 '15 at 9:44
• The framezoom command does not know anything about the size of your image. In the code above, it appears in front of the figure inclusion. Therefore I guess, it is always taking measures relative to the slide/frame. Maybe, your image was not centred when you tried it before. – LaRiFaRi Jun 2 '15 at 9:47
• well it was not explicitly centered, but LaTeX positioned it in the center. So I never really thought about that. Thank you again! – stebu92 Jun 2 '15 at 9:58
• @stebu92 You are very welcome. – LaRiFaRi Jun 2 '15 at 10:06