git-svn-id: http://svn.automattic.com/wordpress/trunk@9727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ca12b7518
commit
01e981dfdb
|
@ -319,13 +319,8 @@ function file_is_displayable_image($path) {
|
||||||
$info = @getimagesize($path);
|
$info = @getimagesize($path);
|
||||||
if ( empty($info) )
|
if ( empty($info) )
|
||||||
$result = false;
|
$result = false;
|
||||||
elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) )
|
elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and png images can reliably be displayed
|
||||||
// only gif, jpeg and png images can reliably be displayed
|
|
||||||
$result = false;
|
$result = false;
|
||||||
elseif ( $info['channels'] > 0 && $info['channels'] != 3 ) {
|
|
||||||
// some web browsers can't display cmyk or grayscale jpegs
|
|
||||||
$result = false;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
$result = true;
|
$result = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue