use Imager; my $image_source = $ARGV[0]; my $image = Imager->new; $image->read(file=>$image_source) or die "Cannot load $image: ", $image->errstr; #### >perl readpng.pl d2020.png Cannot load Imager=HASH(0x10d970): format 'png' not supported - formats bmp, ico, pnm, raw, sgi, tga available for reading - Can't locate Imager/File/PNG.pm at C:\c\Perl\graphics\boxes.pl line 4. #### use Imager; printf "%s\n", join " ", Imager->read_types; printf " %s\n", join " ", keys %Imager::formats; #### sgi bmp ico pnm tga raw bmp pnm tga ifs raw w32