Open WelshDev opened 2 years ago
I'm using gregwar/image "2.1.0" in a Symfony PHP 8.1 app and I'm getting the following exception...
Deprecated: Implicit conversion from float 768.1159420289855 to int loses precision
In my code I'm calling..
$img->save($absoluteDir . $outputDirectory . '/' . $newName, 'jpg', 90);
And I believe the exception is being thrown in "/vendor/gregwar/image/Gregwar/Image/Adapter/GD.php" on line 90...
imagecopyresampled($n, $this->resource, ($target_width - $new_width) / 2, ($target_height - $new_height) / 2, 0, 0, $new_width, $new_height, $width, $height);
Thanks
I'm using gregwar/image "2.1.0" in a Symfony PHP 8.1 app and I'm getting the following exception...
Deprecated: Implicit conversion from float 768.1159420289855 to int loses precision
In my code I'm calling..
$img->save($absoluteDir . $outputDirectory . '/' . $newName, 'jpg', 90);
And I believe the exception is being thrown in "/vendor/gregwar/image/Gregwar/Image/Adapter/GD.php" on line 90...
imagecopyresampled($n, $this->resource, ($target_width - $new_width) / 2, ($target_height - $new_height) / 2, 0, 0, $new_width, $new_height, $width, $height);
Thanks