Ok,
hi again. The last solution wasn’t right. I recognized it just now. But here is the final solution, and for me and the images i have it works.
so again go to the wp-content\plugins\nextgen-gallery\admin\functions.php, line 272 and replace
if ($ngg->options['thumbfix']) {
// check for portrait format
if ($thumb->currentDimensions['height'] < $thumb->currentDimensions['width']) {
// first resize to the wanted width
$thumb->resize($ngg->options['thumbwidth'], 0);
// get optimal y startpos
$ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
$thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
} else {
// first resize to the wanted height
$thumb->resize(0, $ngg->options['thumbheight']);
// get optimal x startpos
$xpos = ($thumb->currentDimensions['width'] - $ngg->options['thumbwidth']) / 2;
$thumb->crop($xpos, 0, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
}
//this create a thumbnail but keep ratio settings
} else {
$thumb->resize($ngg->options['thumbwidth'],$ngg->options['thumbheight']);
}
with
if ($ngg->options['thumbfix']) {
// check for portrait format
$wratio = $ngg->options['thumbwidth'] / $thumb->currentDimensions['width'];
$hratio = $ngg->options['thumbheight'] / $thumb->currentDimensions['height'];
if ($wratio > $hratio) {
// first resize to the wanted width
$thumb->resize($ngg->options['thumbwidth'], 0);
// get optimal y startpos
$ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
$thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
} else {
// first resize to the wanted height
$thumb->resize(0, $ngg->options['thumbheight']);
// get optimal x startpos
$xpos = ($thumb->currentDimensions['width'] - $ngg->options['thumbwidth']) / 2;
$thumb->crop($xpos, 0, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
}
//this create a thumbnail but keep ratio settings
} else {
$thumb->resize($ngg->options['thumbwidth'],$ngg->options['thumbheight']);
}
i hope it works for you too, and it would be nice if this bugfix would be implemented in the original plugin, so we dont have to reimplement it everytime a new version of the plug in comes out.
cu,
jimmy aka alekz