mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 07:14:31 +02:00
removed unwanted matte color when resizing palette images
This commit is contained in:
@@ -280,7 +280,7 @@ class Image
|
|||||||
|
|
||||||
if ($transIndex != -1) {
|
if ($transIndex != -1) {
|
||||||
$rgba = imagecolorsforindex($image, $transIndex);
|
$rgba = imagecolorsforindex($image, $transIndex);
|
||||||
$transColor = imagecolorallocate($image, $rgba['red'], $rgba['green'], $rgba['blue']);
|
$transColor = imagecolorallocatealpha($image, $rgba['red'], $rgba['green'], $rgba['blue'], 127);
|
||||||
imagefill($image, 0, 0, $transColor);
|
imagefill($image, 0, 0, $transColor);
|
||||||
imagecolortransparent($image, $transColor);
|
imagecolortransparent($image, $transColor);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user