.Hello tex.se community,
I have a problem when I put a\frame around an overpic environment.
The top border of the frame is overlapped by the picture.
Is it a bug or a wrong use of\frame command ?
I can't find anithing on the Internet or tex.se.
I just want to put a frame around the image.
Here is the mwe :
\documentclass{article}
\usepackage{graphicx}
\usepackage{overpic}
\begin{document}
\begin{figure}
\centering
\frame{\includegraphics[width=0.7\textwidth]{foo}}
\caption{framed figure include with \emph{includegraphics}.}
\end{figure}
\begin{figure}
\centering
\frame{\begin{overpic}[width=0.7\textwidth]{foo}
\put(50,20){foo}
\end{overpic}}
\caption{framed figure include with \emph{overpic}.}
\end{figure}
\end{document}

Edit 1
The issue doesn't seems to come from the viewer and thin border rendering.
See this screenshot of the pdf rendering with xpdf and evince.
In this case, the image is a grey square an cross the right border of the frame.

EDIT by cfr
The following image can be used to reproduce the issue:

Adapted MWE:
\documentclass{article}
\usepackage{graphicx}
\usepackage{overpic}
\begin{document}
\begin{figure}
\centering
\frame{\includegraphics[width=0.7\textwidth]{img}}
\caption{framed figure include with \emph{includegraphics}.}
\end{figure}
\begin{figure}
\centering
\frame{\begin{overpic}[width=0.7\textwidth]{img}
\put(50,10){foo}
\end{overpic}}
\caption{framed figure include with \emph{overpic}.}
\end{figure}
\end{document}
Effect:





\fboxis the normal command and includes some padding. – David Carlisle Mar 08 '15 at 21:06foo.) – cfr Mar 08 '15 at 21:07absandpercentbut didn't rememberpermiland so didn't think to try it. – cfr Mar 09 '15 at 22:38