Make a multi-polaroid image out of jpeg’s with ImageMagick’s Montage

You can take several regular pictures or other image files and put them together into one image that looks like they’re all polaroids laid out on a desk using ImageMagick’s montage tool.  If you have a dual monitor setup you can easily fit 8 across your screens at once without even overlapping much.  Or you could lay them out half-covering each other to get a whole album on the screen at once.  Don’t worry about the size of each image either because you’ll take thumbnails of each of them to make the final larger image.

[user@hostname ~]$ /usr/bin/montage -size 3200×1200 ~/Pictures/*.jpg -thumbnail 722×594 -bordercolor Lavender -background black +polaroid -background DarkGray -geometry -30-47 -tile x2 ~/Pictures/montage.gif

You could rotate the pictures in a script and run it in a crontab every hour to rotate your pictures for the next time you make the montage pic.  If you’re not constantly downloading a new image (such as a satelite weather map or something), you could bump each file’s name along, saving the last one in a temporary position before rotating it back to the beginning of your stack.  The simplest way to do this would be just moving the file names one by one.  Think of it as files “new”, “old”, “older”, and “oldest”.   Use “temp” as a placeholder while you bump the names along in the chain.

[user@host ~]$ mv -f oldest.jpg temp.jpg; mv -f older.jpg oldest.jpg; mv -f old.jpg older.jpg; mv -f new.jpg old.jpg; mv -f temp.jpg new.jpg

And if you’re using Gnome you can run gconftool-2 to swap out your background image on the fly everytime the cron runs.

[user@host ~]$ /usr/bin/gconftool-2 –type string –set /desktop/gnome/background/picture_filename “$HOME/Pictures/montage.gif”

Posted by admica   @   23 September 2008

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« mrxvt - the best terminal out there
Next Post
Setup your own YUM repository, the easy way! »
Powered by Wordpress   |   Lunated designed by ZenVerse