In a beamer presentation, is it possible to zoom in on an image to make it full screen and if possible to highlight (something like illuminating a part of picture by bright light while other areas of the slide fade ) the desired location on the image?
2 Answers
This is a modification of samcarter's answer. As it stands, the zoomed image will not occupy the whole frame if a theme which installs header/footer is used or if the frame has a title. However, the beamer
documentation explains how to overcome this (page 109):
\documentclass{beamer}
\usetheme{Warsaw}
\begin{document}
\begin{frame}<1>[label=zooms]
\frametitle<1>{Example Grid}
\framezoom<1><2>[border](0cm,0cm)(2cm,1.5cm)
\framezoom<1><3>[border](1cm,3cm)(2cm,1.5cm)
\framezoom<1><4>[border](3cm,2cm)(3cm,2cm)
\pgfimage[height=8cm]{example-grid-100x100bp.pdf}
\end{frame}
\againframe<2->[plain]{zooms}
\end{document}
EDIT
You could use something like the fadings
library to highlight a particular area of the slide if you wished. This isn't quite what you wanted, I know, but perhaps you can modify it to provide something suitably useful:
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{tikz}
\usetikzlibrary{fadings, backgrounds}
\tikzfading[name=fade out, inner color=transparent!100, outer color=transparent!25]
\tikzfading[name=fade in, inner color=transparent!100, outer color=transparent!0]
\begin{document}
\begin{frame}<1>[label=zooms]
\frametitle<1>{Example Grid}
\framezoom<1><2>[border](1cm,3cm)(2cm,1.5cm)
\framezoom<1><3>[border](3cm,2cm)(3cm,2cm)
\begin{tikzpicture}[outer sep=0, inner sep=0]
\only<2>{%
\fill [path fading=fade out, black] (-3,-.5) rectangle +(2,1.5);
}
\only<3>{%
\fill [path fading=fade in, white] (-1,-.25) rectangle +(3,2.25);
}
\begin{scope}[on background layer]
\node at (0,0) {\includegraphics[height=8cm]{example-grid-100x100bp.pdf}};
\end{scope}
\end{tikzpicture}
\end{frame}
\againframe<2->[plain]{zooms}
\end{document}
-
Hello! How could I change the colour of the zoom box? I actually only want the box not the zooming, so I want it to "pop" more. Sep 8 at 9:57
-
1@canIchangethis Just draw a box over the graphic in that case. No need for the zoom stuff at all. There are some questions around here about easy ways to draw over images and you can use a temporary grid to help with the positioning (which you remove once you've got the coordinates).– cfrSep 8 at 12:47
-
1Not really, if I want to have the feature that when I move my mouse over it, it changes the colour within the zoom box. I have no idea, how I would do that with a graphic box. But thanks nontheless. I also made my own question: tex.stackexchange.com/questions/695494/… as i thought it might be OT here! Sep 9 at 9:51
-
@canIchangethis Ah, that's a different thing and definitely a new question. Maybe
hyperref
but it's likely to be viewer dependent.– cfrSep 9 at 15:38
Following an example in http://de.slideshare.net/mustainmtn/beamer-guide-by-kijoo-kim-aka-daisyweb, p.32 this can easily be done:
\documentclass{beamer}
\begin{document}
\begin{frame}
\framezoom<1><2>[border](0.5cm,0.5cm)(2cm,1.5cm) \framezoom<1><3>[border](1cm,3cm)(2cm,1.5cm)
\framezoom<1><4>[border](3cm,2cm)(2cm,2cm)
\pgfimage[height=6cm]{example-grid-100x100bp.pdf}
\end{frame}
\end{document}
-
(+1) for
\framezoom
but that won't use the whole screen if the theme inserts header/footer or if there is a frame title. I've added an answer based on yours which should use the whole screen even in these other cases.– cfrJul 1, 2014 at 1:59
framezoom
command inbeameruserguide
.