mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
Preserve alpha transparency for created thumbnails. (Bug #16575)
git-svn-id: file:///svn/phpbb/trunk@8865 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
235f552974
commit
b6949c47ec
1 changed files with 4 additions and 0 deletions
|
@ -686,6 +686,10 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Preserve alpha transparency (png for example)
|
||||||
|
@imagealphablending($new_image, false);
|
||||||
|
@imagesavealpha($new_image, true);
|
||||||
|
|
||||||
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue