简体   繁体   中英

PHP GD, imagecreatefromstring( ); how to get the image dimensions?

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?

imagesx()imagesy()函数似乎也适用于使用imagecreatefromstring()图像。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM