It seems like a trivial problem, but nothing I've tried will make the background transparent.
use strict;
use warnings;
use GD
GD::Image->trueColor(1);
my $im = new GD::Image(100, 100);
my $clear = $im->colorAllocateAlpha(255, 255, 255, 127);
my $black = $im->colorAllocateAlpha(0, 0, 0, 0);
$im->alphaBlending(0);
$im->filledRectangle(0, 0, 100, 100, $clear);
$im->alphaBlending(1);
$im->stringFT($black, "a-ttf-font.ttf", 12, 0, 20, 20, "x");
binmode STDOUT;
print $im->png;
Thanks for any guidance.