PHP GD, imagecreatefromstring( ); how to get the image dimensions?
Question
Normally I use imagecreatefromjpeg()
and then getimagesize()
, but with Firefox 3 I need to go round this different. So now im using imagecreatefromstring()
, but how do I retreive the image dimensions now?
Solution
imagesx()
and imagesy()
functions seem to work with images made with imagecreatefromstring()
, too.
OTHER TIPS
ah yes! i just found the answer on the internet a second ago :)
for those who still interested :
$image = imagecreatefromstring($img_str);
$w = imagesx($image);
$h = imagesy($image);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow