summaryrefslogtreecommitdiffstats
path: root/lib/private/preview.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-05-05 14:54:34 +0200
committerRobin Appelman <icewind@owncloud.com>2014-05-05 14:54:34 +0200
commit578eb33c20e722b47f74ff93c0845dc58bb6864d (patch)
treeb97aabb3be696f609e74c135680d48c5a6b69a79 /lib/private/preview.php
parent1a454f61ed2211e8a5cf11f1292c53a4d6801dd5 (diff)
downloadnextcloud-server-578eb33c20e722b47f74ff93c0845dc58bb6864d.tar.gz
nextcloud-server-578eb33c20e722b47f74ff93c0845dc58bb6864d.zip
Dont create borders around previews when scaling up is disabled
Diffstat (limited to 'lib/private/preview.php')
-rwxr-xr-xlib/private/preview.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 361073a0916..2964b83c508 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -615,7 +615,7 @@ class Preview {
return;
}
- if ($newXSize < $x || $newYSize < $y) {
+ if (($newXSize < $x || $newYSize < $y) && $scalingUp) {
if ($newXSize > $x) {
$cropX = floor(($newXSize - $x) * 0.5);
$image->crop($cropX, 0, $x, $newYSize);