What's wrong with transparency by GD?



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;


.



Relevant Pages

  • Re: How can I insert BOTH a header and upper-right page numbering
    ... The essential difference is that unlike WordPerfect, ... It does not have discrete and transparent codes to display. ...
    (microsoft.public.word.docmanagement)
  • Re: graduated circles
    ... be a bunch of concentric graduated circles with a transparent cursor ... So I need to make graduated circles with the divisions in various ... see how far each one deviates from this as they are overlaid with each ...
    (rec.music.theory)
  • Re: transparent printer with pc
    ... Don't concern yourself about serial vs. ip connections because they're ... In the application there's probably a place to set escape codes. ... transparent off = 1B5B3469 ... The emulator catches that code and sends the input ...
    (comp.unix.sco.misc)
  • Custom Control with Transparent Background
    ... How can I give my custom System.Windows.Forms.Control a transparent ... When the background of the controls iis transparent, both circles ... Brush brush; ... public MyForm() ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: transparent printer with pc
    ... Don't concern yourself about serial vs. ip connections because they're ... In the application there's probably a place to set escape codes. ... The application prefixes the job with the escape code that switches on transparent print. ... The emulator catches that code and sends the input to the printer you define in the emulator setup. ...
    (comp.unix.sco.misc)