Also center vertically when cropping previews

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-12-22 15:07:11 +01:00
parent 4bec80ee0d
commit 6df44e407a
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
1 changed files with 1 additions and 1 deletions

View File

@ -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));