Skip to content

Commit

Permalink
Merge pull request #675 from ivywe/pngupload
Browse files Browse the repository at this point in the history
[fix] PNG image transparency can't be preserved
  • Loading branch information
mystralkk committed Apr 3, 2016
2 parents ea67150 + 0329ddb commit 023038b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/classes/upload.class.php
Expand Up @@ -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']);
Expand Down

0 comments on commit 023038b

Please sign in to comment.