- or download this
#!/usr/bin/perl -w
use strict;
...
$image->Read($file);
my ($x,$y) = $image->Get('width', 'height');
- or download this
#!/usr/bin/perl -w
use strict;
use Image::Size;
($x, $y) = imgsize("path/to/yourfile.jpg");
- or download this
...
($height,$width) = unpack( "nn", $1 ) if $_[0] =~ /\xFF\xC0...(...
+.)/;
return ($width,$height);
}