> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
$total+=$g+$b+$r;
}
for($x=199; $x>160; $x--)
{
$rgb = imagecolorat($im, $x, $y);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
$total+=$r+$g+$b;
}
$ave=$total;
echo $ave.'
';
$column[$y]=$ave;
empty($total);
}
$newy=0;
for($a=0; $a<=40000; $a++)
{
for($b=0; $b<=sizeof($column); $b++)
{
if($column[$b]==$a)
{
for($x=0; $x