I have an official logo, which has white background and much margins around. So the logo does not look good without trimming at the top-left corner of Berkley theme in Beamer. Code
\documentclass{beamer}
\usepackage{graphics}
\usepackage{adjustbox}
\usetheme{Berkeley}
\logo{
% llx lly urx ury
\adjustbox{trim=0.2\width{} 0.1\height{} 0.2\width{} 0.1\height{}, clip, height=1.2\textheight{}}{
\includegraphics[height=1cm]{logo.png}
}
}
\begin{document}
\begin{frame}
\begin{titlepage}
Leo Leopold Hertz.
\end{titlepage}
\end{frame}
\end{document}
Fig. 1 Logo example, Fig. 2 Output of the code
Testing samcarter's answer with random image
I try to auto-adjust width and height of the image but I cannot get it to work
% http://tex.stackexchange.com/a/215317/13173
\includegraphics[trim=5.3cm 0.2cm 5cm 1.2cm,clip, width=\beamer@sidebarwidth,height=\beamer@headheight]{logo.png}
Final proposal which works
\includegraphics[trim=5.3cm 0.2cm 5cm 1.2cm,clip, height=\headheight, width=\headheight]{logo.png}
OS: Debian 8.5
TeXLive: 2016



trimandclipoptions of\includegraphics. Theadjustboxpackage provides options to clip or trim LaTeX mateial. – Paul Gaborit Dec 30 '16 at 14:44trimandclipoptions of\includegraphics? If so, what is the problem? – Paul Gaborit Dec 30 '16 at 17:50