What's wrong with transparency by GD?
- From: "Ela" <ela@xxxxxxxxxx>
- Date: Wed, 30 Apr 2008 16:05:05 +0800
After testing different parameters, I'm still unable to obtain 2 transparent
circles. Could anybody tell me what's wrong in the following codes?
#!/usr/bin/perl
use GD;
$im = new GD::Image(550,450);
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);
$red = $im->colorAllocateAlpha(255,0,0,119);
$blue = $im->colorAllocateAlpha(0,0,255,119);
$im->transparent($white);
$im->alphaBlending(1);
$im->setStyle($black);
$im->filledArc(460,380,95,75,0,360,$red);
$im->filledArc(500,380,95,75,0,360,$blue);
open(IMG, ">test.png");
binmode IMG;
print IMG $im->png;
close IMG;
.
- Follow-Ups:
- Re: What's wrong with transparency by GD?
- From: smallpond
- Re: What's wrong with transparency by GD?
- Prev by Date: FAQ 3.9 Is there a ctags for Perl?
- Next by Date: Re: Global symbol "%Properties" requires explicit package name
- Previous by thread: FAQ 3.9 Is there a ctags for Perl?
- Next by thread: Re: What's wrong with transparency by GD?
- Index(es):
Relevant Pages
|