#!/bin/bash

#rm HEADER.html
touch HEADER.html

for image in P*.JPG; do
    i=${image%%.JPG}
    echo $image
    jpegtopnm $image | pnmscale -xysize 100 100 | pnmtojpeg > _thumb${i}.jpg
    echo "<a href=\"${i}.JPG\" target=\"new\"><img src=\"_thumb${i}.jpg\"></a>" >> HEADER.html
done

