From 226d507cca0c8400d69bee7eb324158e3cbe246e Mon Sep 17 00:00:00 2001 From: Bruno Meilick Date: Mon, 20 Mar 2023 15:27:20 +0000 Subject: [PATCH] closes https://github.com/claviska/SimpleImage/issues/317 (#318) Signed-off-by: bnomei --- src/claviska/SimpleImage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/claviska/SimpleImage.php b/src/claviska/SimpleImage.php index 36b6d8b..5ef9efe 100644 --- a/src/claviska/SimpleImage.php +++ b/src/claviska/SimpleImage.php @@ -972,7 +972,7 @@ public function resize(int $width = null, int $height = null): static // Resize to height if (! $width && $height) { - $width = $height * $this->getAspectRatio(); + $width = (int) round($height * $this->getAspectRatio()); } // If the dimensions are the same, there's no need to resize