11

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?

2 Answers 2

20

imagesx() and imagesy() functions seem to work with images made with imagecreatefromstring(), too.

Sign up to request clarification or add additional context in comments.

Comments

7

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);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.