diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-12-23 08:36:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-23 08:36:10 +0100 |
commit | 323fe46ba1b61e886f3eef707b914c4df8dc996e (patch) | |
tree | f5e823549f4152de527f01fc6268eb4357888cae /lib | |
parent | 1d8da461d596616bd048f73b1e7abf852789198d (diff) | |
parent | 6df44e407afbfdbf5ab4ad13602ee8aedf22d125 (diff) | |
download | nextcloud-server-323fe46ba1b61e886f3eef707b914c4df8dc996e.tar.gz nextcloud-server-323fe46ba1b61e886f3eef707b914c4df8dc996e.zip |
Merge pull request #18536 from nextcloud/enhancement/preview-center-vertically
Also center vertically when cropping previews
Diffstat (limited to 'lib')
-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)); |