# Beamer: Full width image, aligned to top with a frame title

I would like to include a full width image, aligned to the top of a frame with a frame title. The problem is, I cannot get rid of a line of white space between the orange frame title header and the lion image.

\documentclass[t]{beamer}
% Frames are 128x96mm and top-aligned by default.

% Calculate with \sidebarwidth
\usepackage{calc}
\newlength{\sidebarwidth}

% Theme
\setlength{\sidebarwidth}{28mm}
\usetheme[height=16mm, right, width=\sidebarwidth]{Goettingen}
% Hence, a full frame image is 100x80mm
\usecolortheme{crane}

% Include full-width graphics
\usepackage{graphicx}
\newcommand{\includefullwidthgx}[2][]{%
\noindent\makebox[\columnwidth]{\includegraphics[width=128mm-\sidebarwidth, #1]{#2}}%
}%

\begin{document}
\begin{frame}
\frametitle{frame title text}
\includefullwidthgx{lion.jpg}
\end{frame}
\end{document}


-
What a beautiful picture for TeX site! :-) –  Przemysław Scherwentke Apr 23 '13 at 11:59
That was on purpose! It is a Wikimedia Commons image. Here is the link to the original: commons.wikimedia.org/wiki/File:Lion_in_masai_mara.jpg –  Serge Stroobandt Apr 23 '13 at 12:03
If I'm not wrong, when you fix only one option width (or height) for includegraphics, option keepaspectratio is true by default, so image keeps its original proportions. If you want to cover all this area select another image or also fix option height. –  Ignasi Apr 23 '13 at 12:19
–  Ignasi Apr 23 '13 at 12:23
@Ignasi: I am aware of that, but I do not want to lose the white space below the picture. –  Serge Stroobandt Apr 23 '13 at 12:24

I helped myself out by adding a \vspace{-9.5pt}. The value seems not to change with standard themes. Nor does it matter whether a subtitle is present in the header. Still, I find it a non-general, somewhat sub-optimal solution. Who does better?

\documentclass[t]{beamer}
% Frames are 128x96mm and top-aligned by default.

% Calculate with \sidebarwidth etc.
\usepackage{calc}
\newlength{\sidebarwidth}

% Theme
\setlength{\sidebarwidth}{28mm}
\usetheme[height=16mm, right, width=\sidebarwidth]{Goettingen}
% Hence, a full frame image is 100x80mm
\usecolortheme{crane}

% Include full-width graphics
\usepackage{graphicx}
\newcommand{\includefullwidthgx}[2][]{%
\vspace{-9.5pt}
\noindent\makebox[\columnwidth]{\includegraphics[width=128mm-\sidebarwidth, #1]{#2}}%
}%

\begin{document}
\begin{frame}
\frametitle{Sub-optimal solution.}
\framesubtitle{Anyone does better?}
\includefullwidthgx{lion.jpg}
\end{frame}

\end{document}


-
I am still looking for the mystery length;\vspace{\topskip} also eats too much space. –  Serge Stroobandt May 15 '13 at 18:01