I like Image::Size. (However, I was unable to get it working on an older RedHat system due to missing modules.) You should use it if you can because it is much more efficient, as it doesn't spawn a process. Here's how:
use Image::Size; # get the image size, and print it out my( $width, $height ) = imgsize( $imagefile_pathname );
But if you want to do it purely using a system command and ImageMagick's identify, here's how:
# (assume identify is in the path) chomp( my $ident = `identify -format "%w %h" "$imagefile_pathname"` ); my( $width, $height ) = split ' ', $ident;
In reply to Re: How can I get image height and width without using Image::Size?
by rapidwiz
in thread How can I get image height and width without using Image::Size?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |