
% Auxiliary environment
\newenvironment{changemargin}[2]{%
  \begin{list}{}{%
      \setlength{\topsep}{0pt}%
      \setlength{\leftmargin}{#1}%
      \setlength{\rightmargin}{#2}%
      \setlength{\listparindent}{\parindent}%
      \setlength{\itemindent}{\parindent}%
      \setlength{\parsep}{\parskip}%
    }%
  \item[]}{\end{list}}


% Fill image to full screen. Pass filename as argument.
\newcommand{\maxFrameImage}[1]{
  \begin{frame}[plain]
    \begin{changemargin}{-1cm}{-1cm}
      \begin{center}
        \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]
        {#1}
      \end{center}
    \end{changemargin}
  \end{frame}
}

% Frame with title and full-beamer image. Pass it the title and filename
\newcommand{\titledFrameImage}[2]{
  \begin{frame}{#1}
    \begin{center}
      \includegraphics[width=108mm,height=\textheight,keepaspectratio]{#2}
    \end{center}
  \end{frame}
}

% Make one image take up the entire slide content area in beamer.:
% centered/centred full-screen image, no title:
% This uses the whole screen except for the 1cm border around it
% all. 128x96mm
\newcommand{\plainFrameImage}[1]{
  \begin{frame}[plain]
    \begin{center}
      \includegraphics[width=108mm,height=76mm,keepaspectratio]{#1}
    \end{center}
  \end{frame}
}

% frame with centered sentence. No frame borders, nothing.
\newcommand{\sentenceFrame}[1]{
  \begin{frame}[plain]
    \begin{center}
      {\LARGE #1}
    \end{center}
  \end{frame}
}

% frame with centered image and sentence. No frame borders, nothing. Sentence first
\newcommand{\sentenceImgFrame}[2]{
  \begin{frame}[plain]
    \begin{center}
      \includegraphics[width=.4\textwidth]{#2}\\[2mm]
      {\LARGE #1}
    \end{center}
  \end{frame}
}