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

Only use getimagesize() for GIFs, JPGs and PNGs. #22

Closed
wants to merge 1 commit into from

Conversation

leofeyer
Copy link
Member

So SVGs and other images are not unnecessarily run through getimagesize().

@ausi
Copy link
Member

ausi commented Nov 16, 2016

getimagesize() supports much more image formats than just the three major ones: jpeg2000, swf, psd, bmp, wbmp, xbm, tiff_ii, tiff_mm, iff, jb2, jpc, jp2, jpx, swc, ico, webp.

I think the case for a different format than those (apart from SVG) is very uncommon and calling getimagesize() on a different format produces not much overhead IMO.

The case for SVG images should get solved by #23.

@leofeyer
Copy link
Member Author

getimagesize() supports much more image formats than just the three major ones: jpeg2000, swf, psd, bmp, wbmp, xbm, tiff_ii, tiff_mm, iff, jb2, jpc, jp2, jpx, swc, ico, webp.

Yes, but that strongly depends on the GDlib version. E.g. webp support has only been added in one of the most recent versions, therefore the only formats that can be handled reliably by all versions are gif, jpg and png (and bmp).

@leofeyer
Copy link
Member Author

But anyway, #23 looks promising, therefore I'm closing this PR.

@leofeyer leofeyer closed this Nov 17, 2016
@leofeyer leofeyer deleted the get-dimensions branch November 17, 2016 08:39
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