Merge pull request #7022 from sanderha/fix-gd-rotate-png-transparency

keep PNG transparancy on GDBackend::rotatePixelByPixel
This commit is contained in:
Loz Calver 2017-06-15 14:38:10 +01:00 committed by GitHub
commit d1ed92ad26

View File

@ -321,6 +321,7 @@ class GDBackend extends Object implements Image_Backend {
}
$rotate=imagecreatetruecolor($destWidth,$destHeight);
imagealphablending($rotate, false);
imagesavealpha($rotate, true); // to maintain PNG transparency
for ($x = 0; $x < ($sourceWidth); $x++) {
for ($y = 0; $y < ($sourceHeight); $y++) {
$color = imagecolorat($this->gd, $x, $y);