Making image contact sheets with ImageMagick’s montage & shell scripting

So, if you’re anything like me, you probably have a ton of digital photos laying around your hard drive. For my wife and I, the challenge was to be able to view all of these and figure out what to keep and what to discard. I organized the photos by year, and then by month…but then what to do?

I decided to make some photo contact sheets. I found an article at Pat David’s site on how to do this (thanks, by the way!), but didn’t want to go into multiple directories to do this…so I automated it!

Check out this script, which runs on linux machines.  From a directory of directories, it will switch into each directory (one level down only, my next step is to recurse!) and create a contact sheet for each.

Here is the script:

 for DIR in `ls`
  if test -d "$DIR"
   cd "$DIR"
    montage -verbose -label '%f' -font Helvetica -pointsize 10\
    -background\ '#000000' -fill 'gray' -define jpeg:size=200x200\
    -geometry 200x200+2+2 \ -auto-orient *.jpg\
    cd ..

Let me know what you think, or how this could be improved upon!

Digg this     Create a Bookmark     Add to Newsvine

No Responses to “Making image contact sheets with ImageMagick’s montage & shell scripting”

Comments are closed.

Kuma's Lair is proudly powered by WordPress, and uses the kumaZen theme, a modification of NewZen
Entries (RSS) and Comments (RSS).40 queries. 0.466 seconds.