Update Editor.php

This commit is contained in:
全栈小学生 2025-09-20 09:11:31 +08:00
parent a12b495d74
commit 7a410a6c77

View File

@ -657,7 +657,7 @@ final class Editor implements EditorInterface
if (($resizeWidth > $newWidth) or ($resizeHeight > $newHeight)) { // Oops, either with or height does not fit if (($resizeWidth > $newWidth) or ($resizeHeight > $newHeight)) { // Oops, either with or height does not fit
// So base on height instead // So base on height instead
$resizeHeight = $newHeight; $resizeHeight = $newHeight;
$resizeWidth = $newHeight * $ratio; $resizeWidth = round($newHeight * $ratio);
} }
$this->_resize($image, round($resizeWidth, 2), round($resizeHeight, 2)); $this->_resize($image, round($resizeWidth, 2), round($resizeHeight, 2));
@ -1176,4 +1176,4 @@ final class Editor implements EditorInterface
return array($x,$y); return array($x,$y);
} }
} }