Merge pull request #18536 from nextcloud/enhancement/preview-center-vertically
Also center vertically when cropping previews
This commit is contained in:
commit
323fe46ba1
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue