transparent image thumbnails have white background instead of black
This commit is contained in:
parent
80d95d09f9
commit
a78cf9f6bb
@ -29,6 +29,7 @@ function mkthumbnail($src_file, $dest_file, $width, $height) {
|
||||
$im = imagecreatefromstring(file_get_contents($src_file));
|
||||
|
||||
$dest = imagecreatetruecolor($width, $height);
|
||||
imagefilledrectangle($dest, 0, 0, $width, $height, imagecolorallocate($dest, 0xFF, 0xFF, 0xFF));
|
||||
|
||||
$scale = max( $width/$src_width, $height/$src_height ); // overscale + crop
|
||||
|
||||
|
Reference in New Issue
Block a user