guess_image_type now uses Imagick::getImageMimeType()
This commit is contained in:
@@ -600,7 +600,7 @@ function guess_image_type($filename, $fromcurl=false) {
|
|||||||
* we won't be tricked by a manipulated extension
|
* we won't be tricked by a manipulated extension
|
||||||
*/
|
*/
|
||||||
$image = new Imagick($filename);
|
$image = new Imagick($filename);
|
||||||
$type = 'image/'. strtolower($image->getImageFormat());
|
$type = $image->getImageMimeType();
|
||||||
} else {
|
} else {
|
||||||
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
$types = Photo::supportedTypes();
|
$types = Photo::supportedTypes();
|
||||||
|
|||||||
Reference in New Issue
Block a user