From 5d7b0816666992dde66be24ded94b9ec019cdbba Mon Sep 17 00:00:00 2001 From: Buchholz Date: Sat, 9 Oct 2021 21:22:09 +0200 Subject: [PATCH] needs int instead float --- include/tool/Image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tool/Image.php b/include/tool/Image.php index 6792fd8..3ad8992 100644 --- a/include/tool/Image.php +++ b/include/tool/Image.php @@ -154,10 +154,10 @@ namespace gp\tool{ // scale to fit into new width/height if( $old_aspect_ratio > $new_aspect_ratio ){ // old img is wider than new one - $new_h = round($new_h / $old_aspect_ratio * $new_aspect_ratio); + $new_h = int(round($new_h / $old_aspect_ratio * $new_aspect_ratio)); }else{ // old img is narrower than new one - $new_w = round($new_w / $new_aspect_ratio * $old_aspect_ratio); + $new_w = int(round($new_w / $new_aspect_ratio * $old_aspect_ratio)); } }else{ // crop to cover new width/height