Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm using Image::Resize to resize images to fit. It works great unless the image has transparencies (usually gif or png). The result is that the transparent pixels are black. And that is not good. White I can work with, but black no no.
My code is basic:
my $img = Image::Resize->new('file.gif'); #or png my $newImg = $img->resize(150,150); my $imgData = $newImg->gif; #or png open(FH, '>newFile.gif'); binmode FH; print FH $imgData; close FH;
So my question is... what can I do about this black transparencies problem? Can Image::Resize handle something like this? I don't mind using a different module.
Any idea?
|
---|