#!/usr/bin/perl
##############################################################################
# thumbnail.pl v.9      1 October 1995  Dale Bewley     dbewley@iupui.edu
#-----------------------------------------------------------------------------
# This script and others found at http://www.engr.iupui.edu/~dbewley/perl
#
# Uses convert (must be on your system) to create thumbnails
# of your flavorite graphics.
#       Boy this is a complicated one! :)
#
##############################################################################

$CONVERT = "/usr/local/bin/convert";    #location of convert program
$THUMBNAIL_SIZE = 200;                  #pixel width of thumbnail
$THUMBNAIL_PATH = "thumbnails/";        #dir where thumbnails will be stored

$CONVERT="$CONVERT -geometry ${THUMBNAIL_SIZE}x${THUMBNAIL_SIZE}+0+0";

if (!$ARGV[0]) { die "Usage: $0 (graphic filename)\n"; }

while (@ARGV) {
        system "$CONVERT $ARGV[0] $THUMBNAIL_PATH$ARGV[0]";
        shift @ARGV;
}


