photo album : imagemagick (part -1)

Quick and dirty way of creating photo album with imagemagick, creating images with black border as it looks good for all

#!/bin/cshset files = `echo [0-9]*.jpg`echo $filesforeach file ( $files )set w = `identify -format  "%w" $file`set h = `identify -format  "%h" $file`if ($w > $h) then  convert $file -thumbnail 500X -bordercolor black -border 1 /tmp/foo100/$fileelse  convert $file -thumbnail X500 -bordercolor black -border 1 /tmp/foo100/$fileendifend

No comments: