]>
Commit | Line | Data |
---|---|---|
47344604 TC |
1 | #!perl -w |
2 | use strict; | |
3 | use Imager; | |
4 | ||
5 | print "$0\n"; | |
6 | my @allfiles = (@ARGV) x 120; | |
7 | my $srcdir = '.'; | |
8 | ||
a10945af TC |
9 | my %opts1 = (scalefactor=>.333334, qtype => 'mixing'); |
10 | my %opts2 = (scalefactor=>.25, qtype => 'mixing'); | |
47344604 TC |
11 | my %exopts=(); |
12 | for my $file (@allfiles) { | |
13 | # print STDERR "reading $srcdir/$file\n"; | |
14 | my $img=Imager->new(); | |
15 | $img->read(file=>"$srcdir/$file") or die "error on \"$srcdir/$file\": | |
16 | ".$img->{ERRSTR}."\n"; | |
17 | # print STDERR "making med_res_imager/$file\n"; | |
18 | my $scale=$img->scale(%opts1) or die "error on scale: ".$img->{ERRSTR}; | |
19 | $scale->write(file=>"med_res_imager/$file",%exopts); | |
20 | # print STDERR "making icon_imager/$file\n"; | |
21 | my $scale2=$scale->scale(%opts2); | |
22 | $scale2->write(file=>"icon_imager/$file",%exopts); | |
23 | } |