#!/bin/csh -f
# Kenneth Kang
# 11-17-99
# Makes an image map index for a set of JPEGs.
set size = 96
set grid = 100
set cols = 6
set color = "white"
set col = 0
set row = 0
set tmp = /tmp/htmlindex.$$
set thumbnail = $tmp\.thumbnail.pnm
set cell = $tmp\.cell.pnm
set cur = $tmp\.cur.pnm
set out = $tmp\.out.pnm
set target = "$1"
shift
echo ''
echo -n ''
echo ""
# Append last row (if any)
if ( -r $cur && -r $out ) then
pnmcat -tb -jleft $out $cur > $tmp
mv $tmp $out
else
mv $cur $out
endif
cjpeg $out > $target
# Clean up
foreach file ( $tmp $thumbnail $cell $cur $out )
if ( -r $file ) rm -f $file
end