Also center vertically when cropping previews
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
4bec80ee0d
commit
6df44e407a
|
@ -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 New Issue