# How can I set the background of a slide with a background image?

I have a background image for one of my slides which is partially transparent. I'd like to set the background color for this slide to black, but it does not work.

Example:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}


-
Please, next time propose a complete MWE, from \documentclass to \end{document}. And if you can, provide a transparent image. This way will be easier to test your code and help you. – Ignasi Nov 26 '12 at 20:09
Thanks for providing a MWE. – Gonzalo Medina Nov 26 '12 at 23:23

Simply use the bacground template for the image and background canvas for the black background:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}


-
+1 A better solution than the one I proposed... ;-) – Paul Gaborit Nov 26 '12 at 23:27