Skip to content

Commit

Permalink
Merge a916767 into 7834b13
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelo Onyiah committed Jan 17, 2015
2 parents 7834b13 + a916767 commit 7d4ffeb
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions lib/Data/Validate/Image.pm
Expand Up @@ -71,12 +71,6 @@ sub _convert_installed{
Data::Validate::Image - Validates an image and returns basic info
=head1 IMPORTANT
B<REQUIRES> convert (from imagemagick) to be installed and in the path for animated gif/frame detection
I used convert over PerlMagick because I found PerlMagick to be very unstable.
=head1 SYNOPSIS
use Data::Validate::Image;
Expand All @@ -90,27 +84,38 @@ I used convert over PerlMagick because I found PerlMagick to be very unstable.
#invalid image
}
=head1 IMPORTANT
B<REQUIRES> convert (from imagemagick) to be installed and in the path for
animated gif/frame detection.
I used convert over PerlMagick because I found PerlMagick to be very
unstable.
=head1 DESCRIPTION
pretty simple image validator class. returns hash of image properties on success,
A simple image validator class, which provides a single C<validate> method
that upon success returns a hash ref of image properties.
undef for invalid images
=head2 image properties
hash properties are
{
'width' => 'image width',
'height' => 'image height',
'size' => 'image filesize (KB)',
'mime' => 'image mime type',
'file_ext' => '*correct* file extenstion',
'frames' => 'frame count', #requires convert from imagemagick
'animated' => 1 || 0, #requires convert from imagemagick
}
'width' => image width,
'height' => image height,
'size' => image filesize (KB),
'mime' => image mime type,
'file_ext' => *correct* file extenstion,
'frames' => frame count, #requires convert from imagemagic to be installed
'animated' => 1 || 0, #requires convert from imagemagic to be installed
For invalid images the C<validate> method returns C<undef>.
=head1 METHODS
=head2 validate
returns image info or undef for invalid image
Returns image properties for valid image or C<undef> for invalid image
=head1 AUTHORS
Expand Down

0 comments on commit 7d4ffeb

Please sign in to comment.