YearBookYourself.com and ImageMagick
on August 26, 2008
I’ve this funny Flash application YearBookYourself.com that allows you to bring your face back to the good ages (from the 50s to nowdays): it’s really funny to see how your look gets perfectly morphed getting the real aspect of an old portrait. You can then share the pictures and/or download ‘em.
With a bit of bash scripting and ImageMagick I got a really aged-looking Polaroid composition, that is just ready to be printed and frameworked! Here is my result.
I took screenshots of each image: if you use a Mac or a smart screen capturing application then you should be able to give each screenshot a custom, progressive name such as:
$ ls Picture 1.png Picture 2.png Picture 3.png ... Picture 26.png
Renaming and resizing
So you just have to do the math to automagically rename ‘em to obtain
$ ls 1950.png 1952.png 1954.png ... 2000.png $ mkdir orig $ cp *.png orig/ $ mogrify -resize 220x -antialias *.png
Adding a caption and a Polaroid look
And now ImageMagick comes into play; I gues this can be performed in one step (please let me know how) but a two phases processing is fine as well:
$ mkdir polaroids $ find *.png | while read img; do montage \ -caption "$(basename $img .png)" -font Arial \ -geometry 220x -polaroid 0 $img \ polaroids/$(basename $img); done
Of course these are my settings, you may want to add variations but this is a good starting.
Let’s compose ‘em!
And now, ImageMagick is used to compose the 26 pictures:
$ montage $(ls poloaroids/*.png) yearbook.png
Done!
—Federico
Comments
One Response to “YearBookYourself.com and ImageMagick”
[...] recorded first by fernsehturm on 2008-09-16→ YearBookYourself.com and ImageMagick [...]