#!/usr/bin/perl -w use lib "/home/httpd/html/"; use Image::Size; use lib "/home/httpd/html/perl/"; use newBanners; #argument to script is a subdirectory of web/html/imgs # e.g. sibley/ NOTE the trailing slash #thumbnails are put in a thumbdir2k directory under the specified path #html page for displaying them in thumbnails2k.html in the specified path #e.g./home/httpd/html/imgs/sibley/thumbnails2k.html displays the thumbnails #in /home/httpd/html/imgs/sibley/thumbdir2k/ #$dir=shift; $dir="birdquest/"; $path="/home/httpd/html/imgs/"; $THM="thumbdir2k/";$i=0; for (grep /^$dir/,@newbanners) { ($dir,$url,$artist,$birdname,$prov) = split /\|/; $img="$birdname.jpg";$dir="$dir\/"; map {s/_/ /g;s/\d//;s/\:/\'/}$birdname; my $return=`montage -background white $path$dir$img $path$dir$THM$img`; my $query="$dir$img|$url|$artist|$prov|$birdname";$query =~ s/ /\+/g; if ((($i)%5) == 0){ $T.=qq!
|
$birdname<\/small><\/td>\n!; if ((($i++)%5) == 4){ $T.=qq!<\/tr><\/table>\n!} } unless ((($i++)%5) == 0){ $T.=qq!<\/tr><\/table>\n!} $link = ($url eq "")?"":qq!$url!; $file = "$path"."$dir"."thumbnails2k.html";print $file; open (F, "> $file") or die "couldnt open F"; print F < $link The images are the property of and copyrighted by the artist. They are used here with permission. Further use or reproduction requires permission of the artist. $T EOF close F; |