Remove gif support, add png support.
Don't overzoom large version of images.
This commit is contained in:
parent
95e225adf1
commit
1b29c13911
1 changed files with 19 additions and 19 deletions
|
@ -78,7 +78,7 @@ sub is_newer {
|
||||||
# Make images (both large and small)
|
# Make images (both large and small)
|
||||||
#
|
#
|
||||||
|
|
||||||
@FILES = `ls $src/*.jpg $src/*.JPG $src/*.gif`;
|
@FILES = `ls $src/*.jpg $src/*.JPG $src/*.png`;
|
||||||
|
|
||||||
foreach $file ( @FILES ) {
|
foreach $file ( @FILES ) {
|
||||||
chop $file;
|
chop $file;
|
||||||
|
@ -87,15 +87,15 @@ foreach $file ( @FILES ) {
|
||||||
if ( is_newer( "$src/$file", "$ldir/$file" ) || ! -e "$ldir/$file" ) {
|
if ( is_newer( "$src/$file", "$ldir/$file" ) || ! -e "$ldir/$file" ) {
|
||||||
print "Updating $ldir/$file\n";
|
print "Updating $ldir/$file\n";
|
||||||
system("cp -f $src/$file $ldir");
|
system("cp -f $src/$file $ldir");
|
||||||
system("mogrify -geometry $lwidth" . "X" .
|
system("mogrify -geometry \'$lwidth" . "X" .
|
||||||
"$lheight -interlace LINE -quality 80 $ldir/$file");
|
"$lheight>\' -interlace LINE -quality 80 $ldir/$file");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_newer( "$ldir/$file", "$sdir/$file" ) || ! -e "$sdir/$file" ) {
|
if ( is_newer( "$ldir/$file", "$sdir/$file" ) || ! -e "$sdir/$file" ) {
|
||||||
print "Updating $sdir/$file\n";
|
print "Updating $sdir/$file\n";
|
||||||
system("cp -f $ldir/$file $sdir");
|
system("cp -f $ldir/$file $sdir");
|
||||||
system("mogrify -geometry $swidth" . "X" .
|
system("mogrify -geometry \'$swidth" . "X" .
|
||||||
"$sheight -interlace LINE -quality 80 $sdir/$file");
|
"$sheight>\' -interlace LINE -quality 80 $sdir/$file");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ open( MASTER, "<master.idx" );
|
||||||
|
|
||||||
while ( <MASTER> ) {
|
while ( <MASTER> ) {
|
||||||
chop;
|
chop;
|
||||||
if ( m/\.jpg$/ || m/\.JPG$/ || m/\.gif$/ ) {
|
if ( m/\.jpg$/ || m/\.JPG$/ || m/\.png$/ ) {
|
||||||
push @imagelist, $_;
|
push @imagelist, $_;
|
||||||
} else {
|
} else {
|
||||||
# just ignore everything else
|
# just ignore everything else
|
||||||
|
@ -190,7 +190,7 @@ while ( <MASTER> ) {
|
||||||
print OUT "<P>\n";
|
print OUT "<P>\n";
|
||||||
$j = 1;
|
$j = 1;
|
||||||
$in_table = 0;
|
$in_table = 0;
|
||||||
} elsif ( m/\.jpg$/ || m/\.JPG$/ || m/\.gif$/ ) {
|
} elsif ( m/\.jpg$/ || m/\.JPG$/ || m/\.png$/ ) {
|
||||||
# insert image in 3 wide tables
|
# insert image in 3 wide tables
|
||||||
|
|
||||||
$in_table = 1;
|
$in_table = 1;
|
||||||
|
@ -209,8 +209,8 @@ while ( <MASTER> ) {
|
||||||
$linkname = `basename $i .jpg`;
|
$linkname = `basename $i .jpg`;
|
||||||
} elsif ( $i =~ m/\.JPG$/ ) {
|
} elsif ( $i =~ m/\.JPG$/ ) {
|
||||||
$linkname = `basename $i .JPG`;
|
$linkname = `basename $i .JPG`;
|
||||||
} else {
|
} elsif ($i =~ m/\.png$/ ) {
|
||||||
$linkname = `basename $i .gif`;
|
$linkname = `basename $i .png`;
|
||||||
}
|
}
|
||||||
chop($linkname);
|
chop($linkname);
|
||||||
# print OUT "<TD WIDTH=220 HEIGHT=160>\n";
|
# print OUT "<TD WIDTH=220 HEIGHT=160>\n";
|
||||||
|
@ -334,7 +334,7 @@ while ( <MASTER> ) {
|
||||||
# Generate Links
|
# Generate Links
|
||||||
#
|
#
|
||||||
|
|
||||||
# @FILES = `ls $src/*.jpg $src/*.JPG $src/*.gif`;
|
# @FILES = `ls $src/*.jpg $src/*.JPG $src/*.png`;
|
||||||
|
|
||||||
$first = $imagelist[0];
|
$first = $imagelist[0];
|
||||||
if ( $first =~ m/\.jpg$/ ) {
|
if ( $first =~ m/\.jpg$/ ) {
|
||||||
|
@ -344,8 +344,8 @@ if ( $first =~ m/\.jpg$/ ) {
|
||||||
# print " ext = JPG\n";
|
# print " ext = JPG\n";
|
||||||
$firstname = `basename $first .JPG`;
|
$firstname = `basename $first .JPG`;
|
||||||
} else {
|
} else {
|
||||||
# print " ext = gif\n";
|
# print " ext = png\n";
|
||||||
$firstname = `basename $first .gif`;
|
$firstname = `basename $first .png`;
|
||||||
}
|
}
|
||||||
chop($firstname);
|
chop($firstname);
|
||||||
|
|
||||||
|
@ -357,8 +357,8 @@ if ( $last =~ m/\.jpg$/ ) {
|
||||||
# print " ext = JPG\n";
|
# print " ext = JPG\n";
|
||||||
$lastname = `basename $last .JPG`;
|
$lastname = `basename $last .JPG`;
|
||||||
} else {
|
} else {
|
||||||
# print " ext = gif\n";
|
# print " ext = png\n";
|
||||||
$lastname = `basename $last .gif`;
|
$lastname = `basename $last .png`;
|
||||||
}
|
}
|
||||||
chop($lastname);
|
chop($lastname);
|
||||||
|
|
||||||
|
@ -385,8 +385,8 @@ for ($i = 0; $i <= $#imagelist; $i++) {
|
||||||
$linkname = `basename $file .JPG`;
|
$linkname = `basename $file .JPG`;
|
||||||
$ext = "JPG";
|
$ext = "JPG";
|
||||||
} else {
|
} else {
|
||||||
$linkname = `basename $file .gif`;
|
$linkname = `basename $file .png`;
|
||||||
$ext = "gif";
|
$ext = "png";
|
||||||
}
|
}
|
||||||
chop($linkname);
|
chop($linkname);
|
||||||
$nice_name = $linkname;
|
$nice_name = $linkname;
|
||||||
|
@ -399,8 +399,8 @@ for ($i = 0; $i <= $#imagelist; $i++) {
|
||||||
# print " ext = JPG\n";
|
# print " ext = JPG\n";
|
||||||
$prevname = `basename $prev .JPG`;
|
$prevname = `basename $prev .JPG`;
|
||||||
} else {
|
} else {
|
||||||
# print " ext = gif\n";
|
# print " ext = png\n";
|
||||||
$prevname = `basename $prev .gif`;
|
$prevname = `basename $prev .png`;
|
||||||
}
|
}
|
||||||
chop($prevname);
|
chop($prevname);
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ for ($i = 0; $i <= $#imagelist; $i++) {
|
||||||
} elsif ( $next =~ m/\.JPG$/ ) {
|
} elsif ( $next =~ m/\.JPG$/ ) {
|
||||||
$nextname = `basename $next .JPG`;
|
$nextname = `basename $next .JPG`;
|
||||||
} else {
|
} else {
|
||||||
$nextname = `basename $next .gif`;
|
$nextname = `basename $next .png`;
|
||||||
}
|
}
|
||||||
chop($nextname);
|
chop($nextname);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue