From c7ec874e15b80b6b371282531dc53475c900aa9e Mon Sep 17 00:00:00 2001 From: Jannis Nikou Date: Mon, 22 Apr 2024 17:45:32 -0700 Subject: [PATCH] Update Image.php --- src/Image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Image.php b/src/Image.php index f0d1dc2..e3628f9 100644 --- a/src/Image.php +++ b/src/Image.php @@ -48,7 +48,7 @@ public static function resizeImage($originalFile, $newWidth = null, $newHeight = return false; } - $newImg = imagecreatetruecolor($newWidth, $newHeight); + $newImg = imagecreatetruecolor(intval($newWidth), intval($newHeight)); if ($type == IMAGETYPE_GIF || $type == IMAGETYPE_PNG) { imagecolortransparent( @@ -60,7 +60,7 @@ public static function resizeImage($originalFile, $newWidth = null, $newHeight = imagesavealpha($newImg, true); } - imagecopyresampled($newImg, $srcImg, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height); + imagecopyresampled($newImg, $srcImg, 0, 0, 0, 0, intval($newWidth), intval($newHeight), $width, $height); switch ($type) {