Alpha Channel Question
| From: | Anzak Wolf | Date: | Tue, 02 Jul 2002 19:23:53 +0000 |
| Subject: | Alpha Channel Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104998@lists.php.net to get a copy of this message | ||
I'm having a small problem understanding Alpha channels. I thought that the Alpha Channel was the level of transparency but the following code does not seem to work.
$DI = 50;
$MOD = 127/$DI;
ImageAlphaBlending($im, true);
for ($x=0; $x<$DI; $x++) {
$AL = 127-$MOD*$x;
$GLColor=ImageColorResolveAlpha($im,255,255,255,$AL);
ImageFilledArc($im, $WD/2, $HT/2, $DI-$x, $DI-$x, 0, 360, $GLColor, 4);
}
The idea is to create a simple glare effect by taking a white circle and making it more transparent around the edges. Though this only produces a white circle with fuzzy edges. Can anyone tell me what I'm doing wrong and clue me in on this whole Alpha Channel Biz.
-Jim
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com