Update Photo.php

This commit is contained in:
celestora 2022-12-21 01:26:00 +02:00 committed by GitHub
parent 3c4f41e58c
commit e834fae0fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ class Photo extends Media
$px = (int) $props[0];
$py = (int) $props[1];
if(($image->getImageWidth() / $image->getImageHeight()) > ($px / $py)) {
$height = ceil(($px * $image->getImageWidth()) / $py);
$height = (int) ceil(($px * $image->getImageWidth()) / $py);
$image->cropImage($image->getImageWidth(), $height, 0, 0);
$res[0] = true;
}