I propose the following changes to solve the problem:
1. Add the following three lines to nggfunctions.php after line 186:
$gallery->thumbwidth = intval($thumbwidth) + 15; // 15 = padding + margin according style sheet, should be a parameter
$gallery->thumbheight = intval($thumbheight) + 21; // 21 = padding + margin according style sheet, should be a parameter
2. Substitute line 41 in view\gallery.php by the following one:
<div class=”ngg-gallery-thumbnail” style=”width:<?php echo $gallery->thumbwidth ?>px; height:<?php echo $gallery->thumbheight ?>px” >
3. Substitute line 41 in view\gallery-caption.php by the following one:
<div class=”ngg-gallery-thumbnail” style=”width:<?php echo $gallery->thumbwidth ?>px; height:<?php echo $gallery->thumbheight ?>px” >