Skip to content

Commit

Permalink
Merge branch 'master' into feature/url-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Apr 3, 2016
2 parents 09ca74e + 1a82c11 commit 034d0bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions system/classes/upload.class.php
Expand Up @@ -701,6 +701,12 @@ function _copyFile()
unlink ($filename);
}

// Prevent transparent area of a JPEG image from being painted black
if (is_callable('imagealphablending') && is_callable('imagesavealpha')) {
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 Expand Up @@ -1343,5 +1349,3 @@ function uploadFiles()
}
}
}

?>

0 comments on commit 034d0bb

Please sign in to comment.