mirror of
https://github.com/openvk/openvk
synced 2024-11-14 11:09:12 +03:00
Update Photo.php
This commit is contained in:
parent
3c4f41e58c
commit
e834fae0fe
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ class Photo extends Media
|
||||||
$px = (int) $props[0];
|
$px = (int) $props[0];
|
||||||
$py = (int) $props[1];
|
$py = (int) $props[1];
|
||||||
if(($image->getImageWidth() / $image->getImageHeight()) > ($px / $py)) {
|
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);
|
$image->cropImage($image->getImageWidth(), $height, 0, 0);
|
||||||
$res[0] = true;
|
$res[0] = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue