Dont create borders around previews when scaling up is disabled

This commit is contained in:
Robin Appelman 2014-05-05 14:54:34 +02:00
parent 1a454f61ed
commit 578eb33c20
1 changed files with 1 additions and 1 deletions

View File

@ -615,7 +615,7 @@ class Preview {
return; return;
} }
if ($newXSize < $x || $newYSize < $y) { if (($newXSize < $x || $newYSize < $y) && $scalingUp) {
if ($newXSize > $x) { if ($newXSize > $x) {
$cropX = floor(($newXSize - $x) * 0.5); $cropX = floor(($newXSize - $x) * 0.5);
$image->crop($cropX, 0, $x, $newYSize); $image->crop($cropX, 0, $x, $newYSize);