From 862f55961f601e10103ba827fc02aa9c02bf0ac4 Mon Sep 17 00:00:00 2001 From: Tailszefox Date: Wed, 1 Apr 2015 16:54:08 +0200 Subject: [PATCH] For PHP>=5.4, use alpha component for colors --- fusion.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fusion.php b/fusion.php index defabe1..8422ff3 100644 --- a/fusion.php +++ b/fusion.php @@ -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"]); } } }