Remove other unnecessary function checks

This commit is contained in:
Kijin Sung 2021-01-19 14:45:32 +09:00
parent adb6203f1b
commit 015238d75f

View file

@ -638,7 +638,7 @@ class FileHandler
return FALSE;
}
if($target_type == 'png' && function_exists('imagecolorallocatealpha') && function_exists('imagesavealpha') && function_exists('imagealphablending'))
if($target_type == 'png')
{
imagefill($thumb, 0, 0, imagecolorallocatealpha($thumb, 0, 0, 0, 127));
imagesavealpha($thumb, TRUE);
@ -661,14 +661,7 @@ class FileHandler
$y = (int) ($resize_height / 2 - $new_height / 2);
}
if(function_exists('imagecopyresampled'))
{
imagecopyresampled($thumb, $source, $x, $y, 0, 0, $new_width, $new_height, $width, $height);
}
else
{
imagecopyresized($thumb, $source, $x, $y, 0, 0, $new_width, $new_height, $width, $height);
}
imagecopyresampled($thumb, $source, $x, $y, 0, 0, $new_width, $new_height, $width, $height);
}
// create directory