- or download this
sub getfilesize{
my @spec=();
...
$height = unpack('s',pack('s',hex($tmp1)));
($height) = $height =~ /(\d+)/;
}
- or download this
use Image::Size;
my ($width, $height) = imgsize($file);
($width) = $width =~ /(\d+)/;
($height) = $height =~ /(\d+)/;
- or download this
sub getfilesize{
my $file = shift;
...
# example of sub call
my ($width, $height) = getfilesize('/path/to/file.gif');