http://www.perlmonks.org?node_id=872839


in reply to Imager transparent background instead of black

By default Imager->new creates a 3 channel image, which has no alpha channel.

To create a transparent image, create a 4 channel image:

my $im = Imager->new(xsize => $width, ysize => $height, channels => 4);