diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-22 15:07:11 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-22 15:07:11 +0100 |
commit | 6df44e407afbfdbf5ab4ad13602ee8aedf22d125 (patch) | |
tree | 17b10fa2ba2ab38346e5d97ccfa1617531013175 | |
parent | 4bec80ee0d7ed76645b680cb1d7834a4c1f478a3 (diff) | |
download | nextcloud-server-6df44e407afbfdbf5ab4ad13602ee8aedf22d125.tar.gz nextcloud-server-6df44e407afbfdbf5ab4ad13602ee8aedf22d125.zip |
Also center vertically when cropping previews
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | lib/private/Preview/Generator.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 74fabc55a9a..dcd4ccd130c 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -385,7 +385,7 @@ class Generator { $preview->preciseResize((int)round($scaleW), (int)round($scaleH)); } $cropX = (int)floor(abs($width - $preview->width()) * 0.5); - $cropY = 0; + $cropY = (int)floor(abs($height - $preview->height()) * 0.5); $preview->crop($cropX, $cropY, $width, $height); } else { $preview->resize(max($width, $height)); |