From 0329ddb35bb41e5ad3bac91be5547bd27cbe45d7 Mon Sep 17 00:00:00 2001 From: Ivy Date: Sun, 3 Apr 2016 09:44:03 +0900 Subject: [PATCH] [fix] PNG image transparency can't be preserved --- system/classes/upload.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/classes/upload.class.php b/system/classes/upload.class.php index 2088fbd83..7c99b779d 100644 --- a/system/classes/upload.class.php +++ b/system/classes/upload.class.php @@ -700,7 +700,8 @@ function _copyFile() $image_dest = @imagecreatefromjpeg ($filename); unlink ($filename); } - + imagealphablending( $image_dest, false ); + imagesavealpha( $image_dest, true ); imagecopyresampled($image_dest, $image_source, 0, 0, 0, 0, $newwidth, $newheight, $imageInfo['width'], $imageInfo['height']);