From a78cf9f6bb1bbffbe8c16041817d0a65bcc5d777 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 9 Nov 2013 13:36:24 +1300 Subject: [PATCH] transparent image thumbnails have white background instead of black --- rebuild.php | 1 + 1 file changed, 1 insertion(+) diff --git a/rebuild.php b/rebuild.php index 675999c..cdc19a9 100644 --- a/rebuild.php +++ b/rebuild.php @@ -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