mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 13:30:25 +02:00
two fixes
git-svn-id: file:///svn/phpbb/trunk@8011 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -652,11 +652,23 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||
if ($type['version'] == 1)
|
||||
{
|
||||
$new_image = imagecreate($new_width, $new_height);
|
||||
|
||||
if ($new_image === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
imagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_image = imagecreatetruecolor($new_width, $new_height);
|
||||
|
||||
if ($new_image === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user