A Snapshot Scrapbook Of Your Photos

I’m just putting the finishing touches to the new version of John’s Background Switcher (due out in a week or so) and I thought I’d write about one of the cool features I’ve come up with for this version. I’d seen the idea of a photo pile in screen-savers before and thought it would be pretty slick to add it as an option to the mosaic and montage modes the current version supports. A picture paints a thousand words so this is what I came up with:

A Snapshot Scrapbook

I’ll admit right now that I didn’t come up with the name ’snapshot scrapbook’ - that honour goes to John Topley. I’m rubbish at coming up with catchy names (example: John’s Background Switcher) but luckily John isn’t! Anyway, what it does it use the photos you’ve chosen, creates a bunch of snapshots and throws them onto your desktop background in a sort of pseudo-random fashion. The cool thing is that you can choose these photos from your own computer or from a variety of web photo sharing sites including Flickr, Phanfare, smugmug and picasa web albums.

It’s one of these things that as soon as I got the code working and ran it for real the first thought in my head was “Wow!”. My friend Ian pointed it at a collection of photos of his newborn son and to see the pride on his face as an assortment of photos of his smiling son filled his screen warmed my heart. A snapshot scrapbook is cool, but when it’s of your own photos, photos of your loved ones or photos of your favourite animals (cats for example), it becomes something much more. You can judge for yourself in a week or so when it goes live.

From a coding perspective it was quite an interesting challenge actually creating the snapshot scrapbook. If you want it to look random then it’s no use actually laying them out truly randomly - more often than not you end up with half the photos directly on top of each other which looks rubbish. Then there’s the spacing. You want them to be pretty close to each other, sometimes overlapping, but not by too much - and you want them close to the edge of the screen, but not too close. Next you want them at different angles, but not too much of an angle (you don’t want half of them upside down) or all at the same angle. Then there’s how many photos to put on the screen - different people have different resolutions so it has to look right on every possible computer. It’s all a bit hand wavey really but I managed to create an algorithm that seems to do the job nicely. As is usually the case with algorithms, once it’s written it’s only a few lines of code and looks pretty simple - although it was rather tricky to write (you’ll have to trust me on that one)!

8 Comments on “A Snapshot Scrapbook Of Your Photos”

Paul Andrews said on
November 8th, 2007 at 22:47

Mac version ?

Can you make the spam sums a bit easier next time please, I’ve only got ten fingers.

Paul

That’s my New Year project and I’m halfway through a Mac programming book at the moment!

And sorry about that Paul, and I’ll make sure not to put any long division in either! ;-)

Cracking feature there John. It’s almost worth me going back to using Windows. But then again…

Cheers Ben! And I know what you mean, I’ll never go back from my Mac either! (Except for work of course…). Expect a Mac version in the New Year…

Yay - mac version…. fantastic, until then will have to make do with running it on parallels
;-)

it’s really a great software! I installed it on all my computer as well as my friends’ computers (as long as they allowed me!). Good Job!

I am quite excited about this scrapbook function, it looks fantastic! However, on my SONY UX notebook (with 1024×600 native resolution), only 2 ~3 pictures comes about. Is there a setting for me to set a range of number of picture I would like to show? (of course keep the original automatic algorithms, it works great on my 1280×1024 notebook!)

I’m glad you like it! :)

Unfortunately in the current version you can’t change how many pictures are shown - it just works it out automatically. I’ll add it to the list to let that be customisable - I guess I should have put that in in the first place!

Leave a Comment