guess_image_type now uses Imagick::getImageMimeType()

This commit is contained in:
Domovoy 2012-07-22 15:17:40 +02:00
parent 5d0bd98d2a
commit 0acb983be4

View file

@ -600,7 +600,7 @@ function guess_image_type($filename, $fromcurl=false) {
* we won't be tricked by a manipulated extension
*/
$image = new Imagick($filename);
$type = 'image/'. strtolower($image->getImageFormat());
$type = $image->getImageMimeType();
} else {
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$types = Photo::supportedTypes();