Re: What's wrong with transparency by GD?
- From: smallpond <smallpond@xxxxxxxx>
- Date: Wed, 30 Apr 2008 09:05:45 -0700 (PDT)
On Apr 30, 11:20 am, "Ela" <e...@xxxxxxxxxx> wrote:
"Blending mode is not available when drawing on palette images."
You need to be in true color mode, the default is palette mode.
--S
You're correct. But why does color mode change lead to background
blackening?
New questions should go in new threads.
You need to initialize the background.
# Draw a transparent background
$bkg = $im->colorAllocateAlpha(0,0,0,127);
$im->transparent($bkg);
$im->alphaBlending(0); # replace pixels
$im->filledRectangle(0,0,549,449,$bkg);
# Now draw with blending
$im->alphaBlending(1);
now draw your circles
.
- References:
- What's wrong with transparency by GD?
- From: Ela
- Re: What's wrong with transparency by GD?
- From: smallpond
- Re: What's wrong with transparency by GD?
- From: Ela
- What's wrong with transparency by GD?
- Prev by Date: Re: Read 20 lines when pressing n for next
- Next by Date: Re: Devel::SmallProf claims "return 1" needs much time !?
- Previous by thread: Re: What's wrong with transparency by GD?
- Next by thread: Devel::SmallProf claims "return 1" needs much time !?
- Index(es):