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:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-23 10:36:10 +0300
committerGitHub <noreply@github.com>2019-12-23 10:36:10 +0300
commit323fe46ba1b61e886f3eef707b914c4df8dc996e (patch)
treef5e823549f4152de527f01fc6268eb4357888cae
parent1d8da461d596616bd048f73b1e7abf852789198d (diff)
parent6df44e407afbfdbf5ab4ad13602ee8aedf22d125 (diff)
Merge pull request #18536 from nextcloud/enhancement/preview-center-vertically
Also center vertically when cropping previews
-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));