PHP ImageMagick getImageType returns array... how to associate with type? -


the php imagemagick function getimagetype returns array number, can't find documentation how associate type.

i need know if it's png, jpg, gif, etc...

$image = new imagick("test.png"); $ext = $image->getimagetype();  // prints 6 echo $ext 

i suggest way works fine me

    $image = new imagick('image.gif');     $image->getimageformat();     echo $image; // output gif 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -