Lomography, Automator Style

Well, it looks like I finally found a use for Automator. After my previous attempts at simulating the Lomo effect on the command-line and as a Quartz Composer pipeline, I searched the built-in Mac OS X libraries to see if I could find something that allowed me to:

  • Tweak image contrast and saturation
  • Create (or simulate) a radial gradient
  • Combine the gradient with the tweaked image

...solely from a scripting perspective.

Sadly, there were no base (i.e., bundled with Mac OS X) AppleScript dictionaries that exposed what I needed, and the freeware applications I had on hand that were likely to be of use for this (like ImageTricks) weren't easily scriptable (or just lacked some effects).

Fiddling with Python and the existing bindings wasn't that useful either (unless I used PyObjC, which was overkill for the job at hand) so I went back to ImageMagick and wrapped a shell script in an Automator workflow:

The workflow is available for download here (under a CC license), and it requires the Fink version of ImageMagick - I left the /sw/bin pathnames in to drive that point.

As coded, it is not the most efficient of approaches, but bear in mind that it is batch-oriented - i.e., it pre-generates two gradients for portrait and landscape images and then applies them to the images as it goes along, replacing the original image and opening the result in Preview. So use it against copies of your photos, please.

It should be trivial to turn this into a Finder plugin, folder action, standalone app, etc., as well as adapt the shell script to use other versions of ImageMagick.

Folk with the 6.2.4 version (yes, Fink is still distributing 5.x) are likely to want to read my previous post and experiment with the vastly improved radial gradient primitives it has (I fiddled with that on one of my Fedora boxes, and the end result is a little smoother than what this script can do).

I've found the effect to be somewhat useful for processing mobile phone photos, which tend to look off-color and blurry anyway - but, as with all things, it is best not overdone.

See Also: