Fix thumbnails creation for 8bpp and CMYK images, props DD32, fixes #7039 fixes #8231

git-svn-id: http://svn.automattic.com/wordpress/trunk@9727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-15 23:16:36 +00:00
parent 5ca12b7518
commit 01e981dfdb
1 changed files with 1 additions and 6 deletions

View File

@ -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;