Hello all.
I'm developing a Flash app in which the user traces his or her face. Done. The coordinates are being sent to a PHP page which fills a polygon. Done. Now what I would like to do is instead of filling the polygon, convert it to alpha. Can this be done? I'm attaching my code and a screenshot of what I've done so far.
Any help is appreciated.
Code:<? /* INITIALIZE A VARIABLE */ $coordinates=substr($_GET['c'],0,strlen($_GET['c'])-1); /* BUILD AN ARRAY */ $temp=split(',',$coordinates); /* CREATE THE IMAGE */ $image=imagecreatetruecolor(400, 370); /* USE A FILL */ $fill_color=imagecolorallocate($image, 255, 255, 255); /* DRAW IT */ imagefilledpolygon($image, $temp, (count($temp)/2), $fill_color); /* SET THE HEADER */ header('Content-type: image/png'); /* FLUSH THE IMAGE */ imagepng($image); imagedestroy($image); ?>


Reply With Quote