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
Post a Comment