Revision 4 (by dpavlin, 2007/11/29 11:20:24) added bunch of models and script to resize tif pictures
#!/usr/bin/perl

use strict;
use warnings;

sub resize {
	my $tif = shift;
	my $basename = $tif;
	$basename =~ s|^.*?([^/]+)$|$1|;
	my $to = "share/web/static/pics/$basename.jpg";
	return if -e $to;
	my $cmd = "convert -geometry 320x200 '$tif.tif' $to";
	warn "## $cmd\n";
	system( $cmd );
}

foreach my $tif ( @ARGV ) {
	if ( $tif =~ s/\.tiff*$// ) {
		resize( $tif );
	} else {
		warn "$tif not tif!\n";
		next;
	}
}