git-svn-id: https://develop.svn.wordpress.org/trunk@9727 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
647180ee18
commit
abdc564e7a
@ -319,13 +319,8 @@ function file_is_displayable_image($path) {
|
||||
$info = @getimagesize($path);
|
||||
if ( empty($info) )
|
||||
$result = false;
|
||||
elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) )
|
||||
// only gif, jpeg and png images can reliably be displayed
|
||||
elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed
|
||||
$result = false;
|
||||
elseif ( $info['channels'] > 0 && $info['channels'] != 3 ) {
|
||||
// some web browsers can't display cmyk or grayscale jpegs
|
||||
$result = false;
|
||||
}
|
||||
else
|
||||
$result = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user