Is there a relatively simple way (perhaps regular expressions?) of detecting the dimensions -height & width – of an image from a base64 string (and perhaps the filesize)? That is to say without actually creating an image resource?
Is there a relatively simple way (perhaps regular expressions?) of detecting the dimensions -height
Share
Decode the base64, and use
getimagesizefromstring().http://www.php.net/manual/en/function.getimagesizefromstring.php
This will be way more reliable than trying to write your own handling of each image type available.