"; $centerX = $width / 2; $centerY = $height / 2; echo "
The center of the image is at " .$centerX . ", " . $centerY ; echo '
Test Trig Fucntions php
Get all cordinates for a circle
'; $r = 1 ; $sum = 0; echo 'Radiuz == ' . $r . '
X, Y, PixelColour at that point.

'; $im = imagecreatefromjpeg($fiel); $Pi = pi(); for ($a=0; $a<=1; $a++) { $ax = $r*cos($a*$Pi/180) + $centerX ; //x $ay = $r*sin($a*$Pi/180) + $centerY ; //y $PXCol = imagecolorat($im, $ax, $ay); echo $ax . ", " . $ay . ", " . $PXCol . "
"; //$sum = $sum + $PXCol; //$avg = $sum / 360; } //Says red ff0000 is 16646144 //echo "
Average Pixel Value in ring is: ". $avg . "
"; //$trunc = round($avg); //echo "
Trucated Average: ".$trunc."
"; echo "
Average in Hex: ". dechex(16646144) ."
"; echo "
The value FF0000 should be: ". hexdec("#FF0000") ."
"; ?>