";
$pic= ImageCreateFromPng("PNG.png");
//get first white pixel
for($y=0;$y<30;$y++)
{
for($x=0;$x<100;$x++)
{
$pixel1=imagecolorat($pic, $x, $y);
if ($pixel1==1)
{
$firstwhite[$y]=$x;
break;
}
}
}
//end get first white pixel
//get second white pixel
for($y=0;$y<30;$y++)
{
for($x=0;$x<100;$x++)
{
$pixel1=imagecolorat($pic, $x, $y);
if ($pixel1==1)
{
$nextwhite[$y]=$x;
}
}
}
//end get second white pixel
for($a=0;$a<30;$a++)
{
$results[$a]=$nextwhite[$a]-$firstwhite[$a];
echo "$nextwhite[$a]-$firstwhite[$a]=$results[$a]
";
}
echo "
";
for($b=0;$b<30;$b++)
{
$ascii[$b]=chr($results[$b]);
echo "$ascii[$b]";
}
?>