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

Used native PHP function for image types #167

Merged
merged 2 commits into from Apr 4, 2018
Merged

Used native PHP function for image types #167

merged 2 commits into from Apr 4, 2018

Conversation

holantomas
Copy link
Contributor

Used image_type_to_extension and image_type_to_mime_type

  • bug fix? no
  • new feature? no
  • BC break? no

I think it's better to use native functions instead of work with arrays.
http://php.net/manual/en/function.image-type-to-mime-type.php
http://php.net/manual/en/function.image-type-to-extension.php

Used `image_type_to_extension` and `image_type_to_mime_type`
@dg
Copy link
Member

dg commented Apr 2, 2018

image_type_to_extension() returns jpeg or jpg? Will it work with imagecreatefromjpeg()?

@holantomas
Copy link
Contributor Author

Yes and yes. Didn't find a way to get only jpg from this function.

@dg dg force-pushed the master branch 3 times, most recently from b7cd30e to 3e2c4ed Compare April 3, 2018 18:22
@holantomas
Copy link
Contributor Author

holantomas commented Apr 4, 2018

Here you can see it's returning "jpeg" from php 5.6.0 to 7.2.4.
https://3v4l.org/Bo0Ek

@dg
Copy link
Member

dg commented Apr 4, 2018

ok, thanks

@dg dg merged commit fb40556 into nette:master Apr 4, 2018
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.

None yet

2 participants