Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-12-22 17:07:11 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-12-22 17:07:11 +0300
commit6df44e407afbfdbf5ab4ad13602ee8aedf22d125 (patch)
tree17b10fa2ba2ab38346e5d97ccfa1617531013175
parent4bec80ee0d7ed76645b680cb1d7834a4c1f478a3 (diff)
Also center vertically when cropping previews
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--lib/private/Preview/Generator.php2
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));