1
edit
mNo edit summary |
|||
Line 96: | Line 96: | ||
#!/usr/bin/perl | #!/usr/bin/perl | ||
die "Usage: $0 file xdiv ydiv res\n" if | die "Usage: $0 file xdiv ydiv res\n" if $#ARGV != 3; | ||
$file = shift | $file = shift; | ||
$xdiv = shift | $xdiv = shift; | ||
$ydiv = shift | $ydiv = shift; | ||
$res = shift | $res = shift; | ||
die "Must start with a .png file\n" if | die "Must start with a .png file\n" if $file !~ /\.png$/; | ||
# extract image dimensions | # extract image dimensions | ||
Line 110: | Line 110: | ||
$info =~ s/,//g; | $info =~ s/,//g; | ||
($junk, $type, $junk, $junk, $width, $junk, $height, $junk) | ($junk, $type, $junk, $junk, $width, $junk, $height, $junk) | ||
= split( | = split(' ', $info, 8); | ||
print "$width - $height\n"; | print "$width - $height\n"; | ||
edit