mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
Remove other unnecessary function checks
This commit is contained in:
parent
adb6203f1b
commit
015238d75f
1 changed files with 2 additions and 9 deletions
|
|
@ -638,7 +638,7 @@ class FileHandler
|
||||||
return FALSE;
|
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));
|
imagefill($thumb, 0, 0, imagecolorallocatealpha($thumb, 0, 0, 0, 127));
|
||||||
imagesavealpha($thumb, TRUE);
|
imagesavealpha($thumb, TRUE);
|
||||||
|
|
@ -661,15 +661,8 @@ class FileHandler
|
||||||
$y = (int) ($resize_height / 2 - $new_height / 2);
|
$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);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// create directory
|
// create directory
|
||||||
self::makeDir(dirname($target_file));
|
self::makeDir(dirname($target_file));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue