# # remkhtml.pl - create framesets for digital pictures # Copyright (C) 2002 - Anthony Tonns # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # --- # # ATonns Tue Jun 18 23:40:00 EST 2002 # do all image processing # # ATonns Sat Jul 27 09:48:00 EST 2002 # made more Win32/UNIX portable # # ATonns Sun Sep 22 16:25:00 EDT 2002 # gutted all.pl just to make HTML # # what remkhtml.pl does is re-create the HTML files # (in html dir) for each pic and re-generate left.html with # preview of each thumb. this is basically step 5 of # all.pl all over again, but if you've flipped images # left or right, you need to remake the HTML to get the # sizing done with Image::Size right. # use strict; use Image::Size; # program names, etc. for Win32/UNIX portability my $mogrify="C:\\progra~1\\ImageMagick\\mogrify.exe"; my $copy = "copy"; my $move = "move"; my $dirsep = "\\"; my $ext = "JPG"; my $prev_index = "index.html"; # size to create images for viewing my $image_width = "640"; my $image_height = "480"; my $image_size = "${image_width}x${image_height}"; # size to create thumbnails for previewing my $thumb_width = "128"; my $thumb_height = "128"; my $thumb_size = "${thumb_width}x${thumb_height}"; # simple subroutine to execute system calls (or easily not run them) sub runme { my $runme=join(" ",@_); print "$runme\n"; system("$runme"); } if ( ! -d "images" ) { print STDERR "whoops - i need an 'images' directory \n"; exit(1); } if ( ! -d "html" ) { print STDERR "whoops - no 'html' directory (where will i put this stuff??)\n"; exit(1); } # get a list of image files (ONLY! no movies here) chdir "images"; my @files = glob "*.$ext"; chdir ".."; # create the thumnail nav bar (L) my $prevname = ""; open(L,">left.html"); print L qq!\n!; print L qq!
\n!; print L qq!