Skip to content

Deprecated: Implicit conversion from float 768.1159420289855 to int loses precision #187

Description

@WelshDev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions