Help for this page

Select Code to Download


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