Specifying both a background color and a background image for beamer slides is a bit tricky when notes are shown. I tried three approaches but none works perfectly (the idea is to avoid white borders above and below a full-screen image).
The first solution was inspired by this answer :
\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\begin{document}
{
\setbeamercolor{background canvas}{bg=red}
\setbeamertemplate{background canvas}{
\parbox[c][\paperheight][c]{\paperwidth}{
\centering\includegraphics[width=\paperwidth]{name}
}
}
\begin{frame}[plain]
\end{frame}
}
\end{document}
But setting the background color has no effect. I also tried to include the graphics inside the frame but the image is not centered anymore :
\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\begin{document}
{
\setbeamercolor{background canvas}{bg=red}
\begin{frame}[plain]
\parbox[c][\paperheight][c]{\paperwidth}{
\centering\includegraphics[width=\paperwidth]{name}
}
\end{frame}
}
\end{document}
My last test is based on this answer :
\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\usepackage{tikz}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen=right}\nofiles
\begin{document}
\begin{frame}[plain]
\end{frame}
{
\setbeamercolor{background canvas}{bg=red}
\begin{frame}[plain]
\begin{tikzpicture}[remember picture,overlay]
\node[at=(current page.center)] {
\includegraphics[width=\paperwidth]{name}
};
\end{tikzpicture}
\note{Note}
\end{frame}
}
\end{document}
But the image is not positioned correctly when notes are shown (even with the nofiles trick).
Each solution has a distinct problem. Any idea on one possible fix?