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

[BUG]: GD with enabled webp support, but still return error #15977

Closed
borisdelev opened this issue Jun 1, 2022 · 10 comments · Fixed by #15989 or #16044
Closed

[BUG]: GD with enabled webp support, but still return error #15977

borisdelev opened this issue Jun 1, 2022 · 10 comments · Fixed by #15989 or #16044
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release documentation Documentation required new feature request Planned Feature or New Feature Request

Comments

@borisdelev
Copy link
Sponsor Contributor

Description
My PHP GD configuration support webp image format. I test it with simple imagecreatefromwebp function and it worked. But when use \Phalcon\Image\Adapter\Gd- i've got "Installed GD does not support image/webp images" error

PHP
Windows 11, PHP 8.0.15 with Phalcon 5.0.0 Alpha 6 (but i tried it with RC- same error)
image

To Reproduce
Just use next line:

new \Phalcon\Image\Adapter\Gd($path_to_webp_example_file);

Expected behavior
Well... to manipulate webp format images

Details

  • Phalcon version: 5.0.0alpha6
  • PHP Version: 8.0.15
  • Operating System: Windows
  • Server: Apache

Finish
Well- that's it. Maybe i am wrong somewhere or it is not a bug (it is a feature :), but i want to fix so... you are my hope :)
THANK YOU all Phalcon supporters.
Wish u luck and... may the force be with you!

@borisdelev borisdelev added bug A bug report status: unverified Unverified labels Jun 1, 2022
@Jeckerson
Copy link
Member

Jeckerson commented Jun 1, 2022

Well, as you are using alpha6, my suggest is to try RC1, and see if problem persists. but you will probably need to adjust some of code inside your project due namespace changes.

@niden
Copy link
Sponsor Member

niden commented Jun 1, 2022

It is probably the GD in the system that is not recognized by Phalcon. There is no reason why imagecreatefromwebp works in a plain php script and does not in Phalcon

I will see if I can create a failing test.

@borisdelev
Copy link
Sponsor Contributor Author

borisdelev commented Jun 2, 2022

Well, as you are using alpha6, my suggest is to try RC1, and see if problem persists. but you will probably need to adjust some of code inside your project due namespace changes.

yeah, i tried in RC1 too, same error

I tried like this:

$im = imagecreatefromwebp($path_to_webp_example_file);
imagejpeg($im, $path_to_jpg_file, 100);
imagedestroy($im);

         
$image = new \Phalcon\Image\Adapter\Gd($path_to_webp_example_file); // Error here

PS: i've manage to use original PHP GD function and resize/crop webp image format and create fallback to my project... but its good to fix that for the final 5 :) Thanks guys. You are the best!

@borisdelev borisdelev changed the title [BUG]: GD with enabled wenp support, but still return error [BUG]: GD with enabled webp support, but still return error Jun 2, 2022
@niden
Copy link
Sponsor Member

niden commented Jun 10, 2022

@borisdelev I found where the issue lies.....

The Gd adapter does not support webp images. I thought it did but I was reading the wbmp method.

I wrote a couple of tests and will see if I can get this in the next version.

@borisdelev
Copy link
Sponsor Contributor Author

Like i said before- u are the best 😊

@niden niden self-assigned this Jun 10, 2022
@niden niden added new feature request Planned Feature or New Feature Request 5.0 The issues we want to solve in the 5.0 release and removed bug A bug report status: unverified Unverified labels Jun 10, 2022
@niden niden added this to Working on it in Phalcon Roadmap Jun 10, 2022
@niden niden mentioned this issue Jun 10, 2022
5 tasks
@niden niden linked a pull request Jun 10, 2022 that will close this issue
5 tasks
@niden niden added the documentation Documentation required label Jun 10, 2022
@niden
Copy link
Sponsor Member

niden commented Jun 10, 2022

Resolved in #15989

@niden niden closed this as completed Jun 10, 2022
Phalcon Roadmap automation moved this from Working on it to Implemented Jun 10, 2022
@borisdelev
Copy link
Sponsor Contributor Author

borisdelev commented Jul 15, 2022

Hi hi hi... something strange... when i try to save webp image... I am with Phalcon 5.0.0RC3
Phalcon\Image\Exception: Installed GD does not support 'webp' images

But in info file:
image

Sorry to bother you @niden , but can u just check that?

@niden niden reopened this Jul 19, 2022
@niden
Copy link
Sponsor Member

niden commented Jul 19, 2022

Issue has not been resolved in RC3.

@niden niden mentioned this issue Jul 19, 2022
5 tasks
@niden niden linked a pull request Jul 19, 2022 that will close this issue
5 tasks
@niden niden mentioned this issue Aug 5, 2022
5 tasks
@niden niden linked a pull request Aug 5, 2022 that will close this issue
5 tasks
@niden
Copy link
Sponsor Member

niden commented Aug 8, 2022

Resolved in #16044

@niden niden closed this as completed Aug 8, 2022
@niden
Copy link
Sponsor Member

niden commented Aug 8, 2022

@borisdelev I believe it is fixed for good now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release documentation Documentation required new feature request Planned Feature or New Feature Request
Projects
Archived in project
Phalcon Roadmap
  
Implemented
Development

Successfully merging a pull request may close this issue.

3 participants