500) $brushSize = 500;
}
header("Content-type: plain/text");
// load current image from store.jpg
$im = imageCreateFromJpeg("store.jpg");
// prepare brush using given size and color
$brush = imagecreate($brushSize,$brushSize);
$white = imagecolorallocate($brush,255,255,255);
imagecolortransparent ($brush, $white);
if($paintColor==65280)
$c = imagecolorallocate($brush,0,255,0); //green
else if($paintColor==16711680)
$c = imagecolorallocate($brush,255,0,0); //red
else if($paintColor==16776960)
$c = imagecolorallocate($brush,255,255,0); //yellow
else
$c = imagecolorallocate($brush,0,0,255); //blue
imageFilledEllipse($brush,$brushSize/2,$brushSize/2,$brushSize,$brushSize,$c);
imagesetbrush ($im, $brush);
// process data and draw line using brush
$coord = split(",",$data);
for($i=0;$i