I had trouble getting Gimp to do my bidding via the console for batch processing. Learn Scheme? Yet another language? Well, Image Magick is amazing, and Darwin comes with a version of it. So, from here (IM tutorial) and here (Bash scripting guide) we have a pretty simple script to make a quick and dirty image gallery:
And BTW, putting code in Blogger is a pain, because blogger interprets the html, so here is an applet from Francois to do the conversions. Thanks Francois!#!/bin/sh
#Call using say ./gallery.sh "*.JPG"
gfn="gallery.html"
mkdir Thumbs
mogrify -format jpg -path Thumbs -auto-orient -thumbnail 100x100 *.JPG
echo "
<html>
<body>" > $gfn
for img in $1
do
echo "<a href=\"$img\"><img src=\"Thumbs/$img\"></a>" >> $gfn
done
echo "
</body>
</html>" >> $gfn
Just what I was searching for. Thanks! :-)
ReplyDelete