Image::JpegCheck - is this jpeg?
use Image::JpegCheck; is_jpeg('foo.jpg'); # => return 1 when this is jpeg
Image::JpegCheck is jpeg file checker for perl.
Yes, I know. I know the Imager, GD, Image::Magick, Image::Size, etc.But, I need tiny one. I want to use this module in the mod_perl =)
Code is taken from Image::Size, and optimized it.
is_jpeg($stuff) validates your jpeg.stuff is:
scalar: filename scalarref: jpeg itself file-glob: file handle Path::Class::File: file object
Tokuhiro Matsuno <tokuhirom ah! gmail.com>
kazeburo++
yappo++
Image::Size
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Image::JpegCheck, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::JpegCheck
CPAN shell
perl -MCPAN -e shell install Image::JpegCheck
For more information on module installation, please visit the detailed CPAN module installation guide.