It allows you to apply fun effects to your portrait, along with a caption, and have that show up in your profile. There’s currently twenty effects, with some preset captions that you can customize.
I’m also planning on adding the ability to play with your friend’s pictures, and send them on. I’m keeping it out of the public directory until it’s had a bit of testing, but if you’re on Facebook, give it a whirl!
Here’s roughly how it works:
- The current user portrait URL is retrieved from the facebook API
- wget is used to pull that image down to my server
- I then run the presets, stored as command-line ImageMagick scripts, with the portrait as the input image
- Both the retrieved portrait and the processed images are cached on-disk, so subsequent calls won’t involve any processing
- The user picks one of the effects, and the choice is stored in a mysql database
- If they then customize the caption, that’s also stored
- When both choices have been made, the FBML of the profile frame is set to point to the processed image’s URL
One of the things I’m most interested to see is how the performance holds up with multiple users. I can make a rough estimate of its CPU usage, but there’s also a lot of other key factors in overall performance. In particular, pulling down the original image using wget seems like an unusual use of a hosting server, and I assume they’re set up for serving data, rather than pulling it, so I’ll be curious to see how that works out. The image processing itself is obviously CPU intensive, but I’m hoping with such small images (100×75), it won’t be too bad.