For PHP>=5.4, use alpha component for colors

This commit is contained in:
Tailszefox 2015-04-01 16:54:08 +02:00
parent 952931da54
commit 862f55961f

View file

@ -28,11 +28,11 @@ for($i = 0; $i < imagecolorstotal($from); $i++)
if($getFrom == $getTo)
{
imagecolorset($from, $i, 255 - $colorFrom["red"], 255 - $colorFrom["green"], 255 - $colorFrom["blue"]);
imagecolorset($from, $i, 255 - $colorFrom["red"], 255 - $colorFrom["green"], 255 - $colorFrom["blue"], $colorFrom["alpha"]);
}
else
{
imagecolorset($from, $i, $colorFrom["red"], $colorFrom["green"], $colorFrom["blue"]);
imagecolorset($from, $i, $colorFrom["red"], $colorFrom["green"], $colorFrom["blue"], $colorFrom["alpha"]);
}
}
}