|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-25 07:49 UTC] mkoppanen@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: mkoppanen
[2013-09-25 07:49 UTC] mkoppanen@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 20:00:02 2025 UTC |
Description: ------------ It would be nice if identifyImage() can return the mime type. Currently, it does not do that, so, I need to save the image to a temporary place and run getimagesize() on it, which is part of GD. Test script: --------------- <?php $img = new Imagick('https://www.google.com.au/images/srpr/logo4w.png'); var_dump($img->identifyImage()); Expected result: ---------------- array (size=7) 'format' => string 'PNG (Portable Network Graphics)' (length=31) 'geometry' => array (size=2) 'width' => int 550 'height' => int 190 'units' => string 'Undefined' (length=9) 'type' => string 'Palette' (length=7) 'colorSpace' => string 'sRGB' (length=4) 'compression' => string 'Zip' (length=3) 'fileSize' => string '18.9KB' (length=6) 'mimeType' => 'image/png' Actual result: -------------- array (size=7) 'format' => string 'PNG (Portable Network Graphics)' (length=31) 'geometry' => array (size=2) 'width' => int 550 'height' => int 190 'units' => string 'Undefined' (length=9) 'type' => string 'Palette' (length=7) 'colorSpace' => string 'sRGB' (length=4) 'compression' => string 'Zip' (length=3) 'fileSize' => string '18.9KB' (length=6)