Skip to content
Snippets Groups Projects
Unverified Commit 6df44e40 authored by John Molakvoæ's avatar John Molakvoæ
Browse files

Also center vertically when cropping previews

parent 4bec80ee
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment