Create jpg instead of gif.

This commit is contained in:
hjp 1998-05-14 08:41:18 +00:00
parent 08bde4065f
commit c5dc023bbf
1 changed files with 3 additions and 2 deletions

View File

@ -47,6 +47,7 @@ $pnmfile = "/usr/local/bin/pnmfile";
$pnmscale = "/usr/local/bin/pnmscale"; $pnmscale = "/usr/local/bin/pnmscale";
$ppmquant = "/usr/local/bin/ppmquant"; $ppmquant = "/usr/local/bin/ppmquant";
$ppmtogif = "/usr/local/bin/ppmtogif"; $ppmtogif = "/usr/local/bin/ppmtogif";
$cjpeg = "/usr/local/bin/cjpeg";
chdir($fotodir) or die "cannot cd to $fotodir: $!"; chdir($fotodir) or die "cannot cd to $fotodir: $!";
@ -104,7 +105,7 @@ open(HTML, ">map.html") or die "cannot open map.html for writing: $!";
print HTML "<html><head><title>Wifo: Photo Gallery</title></head>\n"; print HTML "<html><head><title>Wifo: Photo Gallery</title></head>\n";
print HTML "<body>\n"; print HTML "<body>\n";
print HTML qq| <img src="map.gif" usemap="#map" width=|, print HTML qq| <img src="map.jpg" usemap="#map" width=|,
$fw * $gifw, qq| height=|, $fh * $gifh, qq| border=0>\n|; $fw * $gifw, qq| height=|, $fh * $gifh, qq| border=0>\n|;
print HTML qq|<map name="map">\n|; print HTML qq|<map name="map">\n|;
@ -136,4 +137,4 @@ print HTML "</html>\n";
if (!close (HTML)) { if (!close (HTML)) {
print "$0: error closing map.html: $!\n"; print "$0: error closing map.html: $!\n";
} }
system("$pnmcat -topbottom -jleft -white " . join(" ", @col) . "| $ppmquant 256 | $ppmtogif > map.gif"); system("$pnmcat -topbottom -jleft -white " . join(" ", @col) . "| $cjpeg -progressive > map.jpg");