Sunday, June 24, 2012

Batch image resize

I came back from Vancouver with more than 1000 photos on my digital camera, each of which is 4-6 MB when saved at the camera's maximum 4928 × 3264 resolution (with "normal" jpeg compression).

This is a bit much, and even after pruning out the bad photos (blurry, etc) there were still quite a few that I wanted to keep but had absolutely no intention of printing at poster sizes or substantially cropping. My largest monitor is 1680 × 1050, an HD TV is 1920 × 1080, and even the absurd new MacBook Pro is "only" 2880 × 1800. So I decided that 3056 × 2024 was large enough for these photos.

Next came the task of actually resizing several hundred photos. I am running OS X 10.6 (Snow Leopard). Initially I tried Gimp, but the batch-processing GUI turned out to be extremely difficult to install, and writing my own command-line scripts was more work than I was really looking for right now.

Finally I got ImageMagick, which I installing using MacPorts (a Linux-like package manager for OS X), and its mogrify program turned out to be exactly what I was looking for. The command is simply:

mogrify -resize 3056x3056 *.jpg

And the results look pretty good. This resize dropped the pixel count from 16.1 MP to 6.2 MP and average file size from 5.3 MB to 2.5 MB.

Wednesday, June 13, 2012

Switzer falls

Went hiking Sunday near Switzer falls in the Angeles National Forest. Lots of stream crossings, and this one in particular was guarded by this lizard:

As we got closer, he did some push-ups to warn us off. I crossed first, eventually scaring him off, but he came right back. Here he is standing up to SC:

Not sure what he is. Maybe a Western fence lizard? Apparently the way to tell is to look at their underside.