7 my $path = dirname
(abs_path
($0));
12 $l-- while($l && substr($x, $l, 1) ne ".");
13 return substr($x, 0, $l) if($l);
20 $l-- while($l && substr($x, $l, 1) ne ".");
21 return substr($x, $l) if($l);
25 my $scale = shift @ARGV;
26 my $suffix = shift @ARGV;
27 die ("syntax: $0 downscalefactor suffix list-of-files") unless $scale =~ /^\d+$/ && defined($suffix);
29 my $newfile = name_wo_ext
($_) . $suffix . file_ext
($_);
30 my $cmd = $path . "/scaledown.out $scale $_ $newfile";