Help for this page

Select Code to Download


  1. or download this
    my $image = GD::Image->new(1, 1);
    my $transparent = $image->colorAllocate(0, 0, 0);
    $image->transparent($transparent);
    
  2. or download this
    my $image = GD::Image->newTrueColor(1, 1);
    $image->alphaBlending(0);
    $image->saveAlpha(1);
    my $transparent = $image->colorAllocateAlpha(0, 0, 0, 127);
    $image->setPixel(0, 0, $transparent);