# Remove photo padding in moderncv classic

When \photo is used in moderncv, it includes a ~3px padding between the image and the border. How does one remove this? I have found the part of the moderncvstyleclassic.sty that deals with the photo (line 160), but don't know how to change it. I'd also like to know how to change the colour of the border, or even remove it entirely.

-
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Marco Daniel May 10 '13 at 9:09
It's also very important to add you version of moderncv. In the last weeks there are many updates. – Marco Daniel May 10 '13 at 9:10
The current macro \photo has two options, one for the photo size, one for the thickness of the border. To remove the border use 0pt. – Kurt May 10 '13 at 10:44
Guess I'm using an old version of moderncv then T_T – user973066 May 10 '13 at 11:51

To remove the border for the border just use a current version of moderncv and try the following MWE (just to show you how a MWE could be for your case). In line 21 you have the border activated, in the commented line 22 the border is deactivated. Just move the comment sign %.

The macro \photo[width photo][border thickness]{name of photo} does for you what you want.

Please note that I used a picture from package MWE, that should be installed on your computer but must not be loaded to use the included pictures.

%http://tex.stackexchange.com/questions/113566/remove-photo-padding-in-moderncv-classic
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

%\setlength{\hintscolumnwidth}{3cm}  % change the width of the column with the dates
\setlength{\footskip}{37pt} % defines space for footer

% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title}         % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, ...
\mobile{+1~(234)~567~890}                          % optional, ...
\phone{+2~(345)~678~901}                           % optional, ...
\fax{+3~(456)~789~012}                             % optional, ...
\email{john@doe.org}                               % optional, ...
\homepage{www.johndoe.com}                         % optional, ...
\photo[64pt][0.4pt]{example-image-a}              % Photo with border with 0.4pt thickness
%\photo[64pt][0pt]{example-image-a}                % Photo without border
\quote{Some quote}                                 % optional, ...

\begin{document}

\makecvtitle

\end{document} %===== File mwe-mcv.tex =====

-

The previous answer covered how to remove the border altogether around the photo in moderncv, using the syntax provided by this package. Here I'm going to show you how to remove the padding, which was initially asked and is a little bit less immediate (using moderncv 1.5.1).

moderncv uses a \framebox{} to get a border around your photo. As shown in here, the only way to modify the padding is through the \fboxsep variable. Knowing that you can use the command \setlength{\fboxsep}{0pt} somewhere before the \photo command in order to remove the padding (be it preambule or near the photo declaration, or even in the package itself, depending on how it makes most sense to you)

MWE:

\documentclass[10pt, a4paper]{moderncv}

%% ModernCV themes
\moderncvstyle{classic}
\moderncvcolor{red}

%% Character encoding
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

%% Personal data
\firstname{John}
\familyname{Doe}