mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7022 from sanderha/fix-gd-rotate-png-transparency
keep PNG transparancy on GDBackend::rotatePixelByPixel
This commit is contained in:
commit
d1ed92ad26
@ -321,6 +321,7 @@ class GDBackend extends Object implements Image_Backend {
|
|||||||
}
|
}
|
||||||
$rotate=imagecreatetruecolor($destWidth,$destHeight);
|
$rotate=imagecreatetruecolor($destWidth,$destHeight);
|
||||||
imagealphablending($rotate, false);
|
imagealphablending($rotate, false);
|
||||||
|
imagesavealpha($rotate, true); // to maintain PNG transparency
|
||||||
for ($x = 0; $x < ($sourceWidth); $x++) {
|
for ($x = 0; $x < ($sourceWidth); $x++) {
|
||||||
for ($y = 0; $y < ($sourceHeight); $y++) {
|
for ($y = 0; $y < ($sourceHeight); $y++) {
|
||||||
$color = imagecolorat($this->gd, $x, $y);
|
$color = imagecolorat($this->gd, $x, $y);
|
||||||
|
Loading…
Reference in New Issue
Block a user