note 33145 added to function.imagecolorallocatealpha

From: Date: Tue, 17 Jun 2003 16:29:56 +0000
Subject: note 33145 added to function.imagecolorallocatealpha
Groups: php.notes 
Request: Send a blank email to php-notes+get-50518@lists.php.net to get a copy of this message
OK, i got the alpha transparacency to work. You need to use: imagecreatetruecolor instead of: imagecreate Now the issue is to get 2 circles to overlap with transparency so that it turns colors where they overlap. If anyone knows if this can be done that would be great. This is the code that works for creating circles that overlap with transparency. $Image=imagecreatetruecolor(600,600); $yellowX = 100; $yellowY = 75; $redX = 120; $redY = 165; $blueX = 187; $blueY = 125; $yellow = imagecolorallocatealpha ( $Image, 255, 255, 0, 75); ImageArc($Image, $yellowX, $yellowY,$radius*2,$radius*2,0,360,$yellow); imagefill ($Image, $yellowX, $yellowY, $yellow); $red = imagecolorallocatealpha ( $Image, 255, 0, 0, 75); ImageArc($Image, $redX, $redY,$radius*2,$radius*2,0,360,$red); imagefill ($Image, $redX, $redY, $red); $blue = imagecolorallocatealpha ( $Image, 0, 0, 255, 75); ImageArc($Image, $blueX, $blueY,$radius*2,$radius*2,0,360,$blue); imagefill ($Image, $blueX, $blueY, $blue); ImagePNG($Image); ImageDestroy($Image); ---- Manual Page -- http://www.php.net/manual/en/function.imagecolorallocatealpha.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33145 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33145&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33145&report=yes

« previous php.notes (#50518) next »