我正在尝试获取特定文件中图像的分辨率、宽度、高度。
我有以下代码。
#use strict;
use Image::Info qw(image_info dim);
use File::List;
#perl2exe_include Image::Info::JPEG;
#perl2exe_include PerlIO;
my $file = <ImageFilePath>;
my $info = image_info($file);
my $res = $info->{resolution};
print "$$res[0]\n";
我有 Perl 版本 5.16.3
我收到以下错误:
Can't locate Image/Info.pm in @INC (@INC contains: c:\program files\Perl\lib c:/program files/Perl/site/lib c:/program files/Perl/lib .) at Img_Res.pl line 3.
BEGIN failed--compilation aborted at Img_Res.pl line 3.
谁能给我解决方案?