如何通过 Perl 模块获取图像的元数据?
我通过 MacPorts 安装了以下组件:
p5-image-info @1.16 (perl, graphics)
Extract meta information from image files
其网站 你可以使用它
Usage is something like this:
use Image::Info qw(image_info);
@info = image_info("filename");
$refto_hash_describing_1st_image = $info[0];
$refto_hash_describing_2nd_image = $info[1];
但是,我运行失败
$perl use Image::Info qw(image_info);
-bash: syntax error near unexpected token `('
$
如何通过Perl模块获取图像的元数据?
I installed the following component by MacPorts:
p5-image-info @1.16 (perl, graphics)
Extract meta information from image files
It says in its website that you can use it by
Usage is something like this:
use Image::Info qw(image_info);
@info = image_info("filename");
$refto_hash_describing_1st_image = $info[0];
$refto_hash_describing_2nd_image = $info[1];
However, I run unsuccessfully
$perl use Image::Info qw(image_info);
-bash: syntax error near unexpected token `('
$
How can you get the metadata of an image by the Perl module?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所描述的语法是如何在 Perl 脚本中使用它,而不是如何将它作为 shell 中的单行使用。
将其放入 .pl 文件中(例如“image_info.pl”):
然后运行它:
并陶醉于它会告诉您的大量信息......
The syntax described is how you would use it within a Perl script, not how you can use it as a single line from the shell.
Put this in a .pl file (e.g. "image_info.pl"):
And run it thus:
and revel in the masses of information it will tell you...
读
http://perldoc.perl.org/perlrun.html
Read
http://perldoc.perl.org/perlrun.html