From 7a410a6c77796898ae132cf4e4bde43638cbc5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Sat, 20 Sep 2025 09:11:31 +0800 Subject: [PATCH] Update Editor.php --- niucloud/vendor/kosinix/grafika/src/Grafika/Gd/Editor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/niucloud/vendor/kosinix/grafika/src/Grafika/Gd/Editor.php b/niucloud/vendor/kosinix/grafika/src/Grafika/Gd/Editor.php index f51b8d2df..cc4823b6e 100644 --- a/niucloud/vendor/kosinix/grafika/src/Grafika/Gd/Editor.php +++ b/niucloud/vendor/kosinix/grafika/src/Grafika/Gd/Editor.php @@ -657,7 +657,7 @@ final class Editor implements EditorInterface if (($resizeWidth > $newWidth) or ($resizeHeight > $newHeight)) { // Oops, either with or height does not fit // So base on height instead $resizeHeight = $newHeight; - $resizeWidth = $newHeight * $ratio; + $resizeWidth = round($newHeight * $ratio); } $this->_resize($image, round($resizeWidth, 2), round($resizeHeight, 2)); @@ -1176,4 +1176,4 @@ final class Editor implements EditorInterface return array($x,$y); } -} \ No newline at end of file +}