Skip to content

Image: add support for webp #73

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

Closed
wants to merge 1 commit into from
Closed

Image: add support for webp #73

wants to merge 1 commit into from

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Aug 3, 2015

Not sure how to write tests - there aren't any tests specific for the other types either.

Also should I check for php version?

@@ -101,7 +101,8 @@ class Image extends Nette\Object
/** image types */
const JPEG = IMAGETYPE_JPEG,
PNG = IMAGETYPE_PNG,
GIF = IMAGETYPE_GIF;
GIF = IMAGETYPE_GIF,
WEBP = -1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar constant for webp does not exist (yet).

@dg
Copy link
Member

dg commented Aug 3, 2015

Does getimagesizefromstring support WEBP?

@enumag
Copy link
Contributor Author

enumag commented Aug 3, 2015

Oh boy of course it does not. :-(

@enumag
Copy link
Contributor Author

enumag commented Aug 3, 2015

There is no way to detect webp images in fromString and fromFile (aside from checking file extension in fromFile) so I removed webp from both. But I still think Nette\Utils\Image should be able to generate webp images.

@dg
Copy link
Member

dg commented Aug 3, 2015

It is possible via $image->webp('file.webp'); Full support is currently IMHO not possible.

@enumag
Copy link
Contributor Author

enumag commented Aug 3, 2015

Ok, closing for now. Thank you.

@enumag enumag closed this Aug 3, 2015
@enumag
Copy link
Contributor Author

enumag commented Oct 8, 2016

Webp support has been added for PHP 7.1RC4. It should be possible to implement this now.

@enumag enumag reopened this Oct 8, 2016
@dg dg closed this in 98717f3 Dec 19, 2016
dg added a commit that referenced this pull request Dec 19, 2016
dg added a commit that referenced this pull request Dec 19, 2016
dg added a commit that referenced this pull request Dec 19, 2016
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

Successfully merging this pull request may close these issues.

2 participants