note 33145 deleted from function.imagecolorallocatealpha by cece

From: Date: Sat, 16 Aug 2003 19:35:36 +0000
Subject: note 33145 deleted from function.imagecolorallocatealpha by cece
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54426@lists.php.net to get a copy of this message
Note Submitter: jimizim@yahoo.com ---- 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);

« previous php.notes (#54426) next »