Image::Info::XS - Extract meta information from image files. XS implementation of Image::Info.
use Image::Info::XS qw(image_info image_type); my $info = image_info('image.jpg'); if (!$info) { die "Can't parse image info\n"; } my $color = $info->{'color_type'}; my $type = image_type("image.jpg"); if (!$type) { die "Can't determine file type\n"; } die "No gif files allowed!" if $type eq 'GIF';
This module provide functions to extract various kind of meta information from image files.
image_info( $file )
image_info( \$imgdata )
image_type( $file )
image_type( \$imgdata )
BMP GIF ICO JPEG PNG TIFF PSD
Image::Info
Dmitry Kosenkov, <d.kosenkov AT rambler-co.ru>, <junker AT front.ru>
<d.kosenkov AT rambler-co.ru>
<junker AT front.ru>
Copyright (C) 2011 by Dmitry Kosenkov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
To install Image::Info::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Info::XS
CPAN shell
perl -MCPAN -e shell install Image::Info::XS
For more information on module installation, please visit the detailed CPAN module installation guide.