CODE
Severity: Warning
Message: imagecolorsforindex() [function.imagecolorsforindex]: Color index -2147483648 out of range
Filename: scripts/class.upload.php
Line Number: 3374
Message: imagecolorsforindex() [function.imagecolorsforindex]: Color index -2147483648 out of range
Filename: scripts/class.upload.php
Line Number: 3374
This is what is on line 3374
CODE
$pixel = imagecolorsforindex($image_dst, imagecolorat($image_dst, $x, $y));
if ($pixel['alpha'] == 127) {
// we have full transparency. we make the pixel transparent
imagesetpixel($image_dst, $x, $y, $transparency);
} else if ($pixel['alpha'] > 0) {
// we have some transparency. we combine the color with the default color
$alpha = ($pixel['alpha'] / 127);
$pixel['red'] = round(($pixel['red'] * (1 -$alpha) + $red * ($alpha)));
$pixel['green'] = round(($pixel['green'] * (1 -$alpha) + $green * ($alpha)));
$pixel['blue'] = round(($pixel['blue'] * (1 -$alpha) + $blue * ($alpha)));
$color = imagecolorclosest($image_dst, $pixel['red'], $pixel['green'], $pixel['blue']);
imagesetpixel($image_dst, $x, $y, $color);
}
if ($pixel['alpha'] == 127) {
// we have full transparency. we make the pixel transparent
imagesetpixel($image_dst, $x, $y, $transparency);
} else if ($pixel['alpha'] > 0) {
// we have some transparency. we combine the color with the default color
$alpha = ($pixel['alpha'] / 127);
$pixel['red'] = round(($pixel['red'] * (1 -$alpha) + $red * ($alpha)));
$pixel['green'] = round(($pixel['green'] * (1 -$alpha) + $green * ($alpha)));
$pixel['blue'] = round(($pixel['blue'] * (1 -$alpha) + $blue * ($alpha)));
$color = imagecolorclosest($image_dst, $pixel['red'], $pixel['green'], $pixel['blue']);
imagesetpixel($image_dst, $x, $y, $color);
}
The first line in the code belongs to line 3374