#!/usr/bin/perl
# by Wesley R. Elsberry
#
# Script to resize pictures for the web
# Take original and produce 240x160 thumbnail
# Take original and produce 480x320 web version

$inpic = $ARGV[0];

$inpic =~ /^(.+)(....)$/o;

$inpic_tn = $1 . "_tn" . $2;
$inpic_ws = $1 . "_ws" . $2;

#$cmd = "cp $inpic $inpic_tn; cp $inpic $inpic_ws";
$cmd = "copy $inpic $inpic_tn";
system($cmd);
$cmd = "copy $inpic $inpic_ws";
system($cmd);

$cmd = "mogrify -normalize -resize 480x480 $inpic_ws";
system($cmd);

$cmd = "mogrify -normalize -resize 240x240 $inpic_tn";
system($cmd);
