Skip to content

Conversation

anovsiradj
Copy link
Contributor

@anovsiradj anovsiradj commented Jun 5, 2023

remove deprecated message from php8.2

edit: i guest this PR related to #843 😳

Deprecated: Implicit conversion from float 345.5 to int loses precision in ...\vendor\imagine\imagine\src\Gd\Image.php on line 191

on

if (imagecopymerge(/*dst_im*/$this->resource, /*src_im*/$image->resource, /*dst_x*/$start->getX(), /*dst_y*/$start->getY(), /*src_x*/0, /*src_y*/0, /*src_w*/$size->getWidth(), /*src_h*/$size->getHeight(), /*pct*/$alpha) === false) {

imagecopymerge() need dst_x and dst_y to be int.

but $start->getX() and $start->getY() could return float.

remove deprecated message from php8.2

`Deprecated: Implicit conversion from float 345.5 to int loses precision in ...\vendor\imagine\imagine\src\Gd\Image.php on line 191`
@mlocati
Copy link
Collaborator

mlocati commented Jun 5, 2023

Why ceil instead of round?

@anovsiradj
Copy link
Contributor Author

anovsiradj commented Jun 5, 2023

hello, i have revert previous commit and adjust it based on #843 (comment)

edit: i have also run the test, the only error is gmagick, because there is no dll for php v8.1

@mlocati mlocati merged commit b987af3 into php-imagine:develop Jun 6, 2023
@mlocati mlocati mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants