Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library updates needed. #27

Open
ivose opened this issue Apr 8, 2022 · 3 comments
Open

The library updates needed. #27

ivose opened this issue Apr 8, 2022 · 3 comments

Comments

@ivose
Copy link

ivose commented Apr 8, 2022

Maybe you can update your image-resize-magician.php, because it is not compatible to newer php versions like php 8.2 and other php newer versions. It doesn't work, only displays "saveImage: This is not a resource.". Thank you.

@2konrad
Copy link

2konrad commented May 28, 2022

https://php.watch/versions/8.0/gdimage
PHP brought a changes the the GD graphic model, which needs to be reflected

Line 2428 needs to say
if (!(is_resource($this->imageResized) || ($this->imageResized instanceof \GdImage) )) { .....

Some round() statements are also needed to properly convert from float to int. However those are only optional.

When i have some time i will committ those changes

@2konrad
Copy link

2konrad commented May 29, 2022

Hey, the neccessary change was already implemented and suggested as a pull reuqest (#22).
If you take this version, it should work:

https://github.com/naftali100/php-image-magician

The pull request was already sent long time ago - doesnt seem that pull requets get accepted here any more

By the way: an easy fix would be to comment out line 2428

@ibragims
Copy link

Update:
https://github.com/thanhle7/image_magician-fix-for-php8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants