LaTeX is putting a border around my figures

This could be because your images include the border already, before including them. If this is the case, you can trim and clip some of the edges of the included image using the trim=<lx> <ly> <ux> <uy>,clip option of \includegraphics. This trims <lx> from the left, <ly> from the bottom, <ux> from the right and <uy> from the top in big points bp. Here is a minimal example showing this effect:

enter image description here

\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
\begin{figure}
  \centering \includegraphics[width=0.3\linewidth]{patent.png} \qquad
  \includegraphics[width=0.3\linewidth,trim=4 4 4 4,clip]{patent.png}
  \caption{Diagram from Patent Application 12/475,048}
\end{figure}
\end{document}

The image on the left is used unadjusted from a capture of your images (showing the original border included), while the image on the right has been trimmed/clipped by 4bp on all 4 sides (removing the added border).


I figured it out. I'm posting the solution here in-case anyone else has similar issues.

I had saved the images directly out of PowerPoint using "Save as Picture" in the Right-Click menu. This apparently puts a small 1 pixel transparent border around the images.

I suppose LaTeX doesn't render this border transparently, so it was drawing the gray border instead. Cropping the image to remove this transparent border solved my issues.


This also happens when you're using \floatstyle{boxed}. If that's the case the solution is to return to plain style:

\floatstyle{plain}
\restylefloat{figure}

As described in Floatstyle how to come back to the default theme