This is a read-only archive!

Photo (and file) organization

I used iPhoto for a long while as my one and only method of fetching and storing all the photos from my digital camera. Eventually I started dumping wallpapers in iPhoto too, and any miscellaneous image file I needed to save for any reasons. There are some good and bad things about using a program like iPhoto for data storage / organization. I think the bad probably outweigh the good.

A motto of Perl is "Make the easy things easy, and make the hard things possible". iPhoto fails, like so many other programs, because it makes the easy things easy, but it makes many hard things IMPOSSIBLE.

iPhoto does make certain things easy. You plug in your camera, up pops a dialog box, you click OK and taa-daa, all your pictures are slurped off the camera. In terms of organization, iPhoto is good at what it does (more on that later though). You can type meta-data for all the picture files, and then search on the meta-data. You can search by the date you took the photo, and things of that sort.

iPhoto makes some sort-of-hard things possible. Say I want all the pictures I took of my cat. I search for "cat" in iPhoto and hopefully they appear. If I've been good about typing meta-data for all my photos, then it works. If not, well then, I may be screwed. If I can remember the date I took the photo, I may be able to track it down. If I can narrow it down to a month or two, I'm probably OK.

But then we have the hard things that are impossible via iPhoto. Here's a whole class of things: Let me browse my pictures without using iPhoto. Better: Let me browse my photos without using OS X. Let me browse my photos via SSH. Or let me browse it in Linux via Samba over my LAN.

Well, iPhoto lets you have "Albums" which are little more than stored searches. But those aren't viewable (that I know of) if you aren't using iPhoto. iPhoto can search photos and their meta-data, but you can't really search unless you're using OS X or iPhoto directly. There's all kinds of meta-data, but I don't know how to get at it outside of iPhoto.

What exists underneath of iPhoto is a series of directories with photos organized by date. Each year gets a folder. Each month gets a folder in a year folder. Each day gets a folder in a month folder. In these you have photos, thumbnails, movies, and multiple "original" vs "edited in iPhoto" versions of some of these files. And all your files are named things like IMG_0189.JPG. Have fun finding anything there! I know I did.

In what other situation might you need to browse photos without using iPhoto? Well, there is a 100% guarantee that one day, you will find that your program has become old or outdated. In the world of computers, that day will come sooner rather than later. When they release a new version of your program, do you buy it? Will the new version even support your old legacy files? If they release a BETTER program than what you have, how hard will it be to transfer your files over to it?

iPhoto supports photo editing, things like cropping or adjusting color / brightness. But suppose I want to do some editing of a file that's more advanced. I want to run it through a better filter, or add a frame, or crop it into a hexagon, or make it into a greeting card. Now what? iPhoto can't help you. To do what I need to do, I can fetch the photo out of iPhoto, edit it, and then stick it back into iPhoto when I'm done (perhaps having to manually remove the old version first). Not fun. Or I have to see if I can find (and potentially BUY) a program that interfaces not with plain old normal files, but with iPhoto's meta-files. Also not fun.

As an added bonus, the search in iPhoto is not powerful enough. Few programs offer regular expressions in their built-in search. Anything less than regex and the search is crippled, in my eyes. But in most programs I find I'm lucky if I even have Boolean logic support. Simple AND/OR/NOT.

So what the heck is the point? What is there that makes easy things easy and hard things possible? Answer: The filesystem! Simple is quite often better, and in this case I think it is. The filesystem has many benefits.

  • It's transparent. What you see is what you get.
  • It's scriptable. You can use any of the hundreds of command-line tools that make Linux great. Or use Ruby or Perl or your scripting language of choice to do anything you can imagine.
  • It's cusomizable. You aren't restricted. Organize your photos by subject if you want. Or subject and then date. Or by color. Or by something which to you makes total sense, but to everyone else makes no sense at all. For my brain, the sane way to store photos is to group them not by date, but by SUBJECT. My cat photos should be a in a folder called "cat". My vacation photos should be in a folder called "vacation". If I take two vacations, each should get its own subfolder in "vacation". If I'm looking for a photo, I'm probably not going to remember what date I took it. But I am going to remember what the photo IS.

The easy things are slightly less easy than when using iPhoto. But they are still easy. Using gphoto2 in Linux, it took me 15 miutes to write a script that fetches all files from my camera, checks to make sure the files were fetched properly, deletes them from the camera if so, and then organizes them into a command-line specified folder. It also renames all the files to lowercase automatically; let's see a GUI app do that!

And now the hard things are possible. I could change the filenames further if I wanted. I could batch rename or renumber the files using regex pattern replacements. I could edit the EXIF data using command-line tools. I can use imagemagick to crop, rotate, resize, add a frame to, flip over, or greyscale-ify all my photos all at once. I can convert them all to PNGs. I can auto-upload them to a remote server so I can have them on my website. I can log what I'm doing so I have a record of when I imported which photos. Who knows what else? The possible options are now unlimited.

Now I can view and edit the files using any program. In iPhoto I'm not working on a file, I'm working on an iPhoto wrapper around a file. But every graphics program works directly on files. If I want to browse my photos and I'm in a hurry, I'll use feh. If I want to see a thumbnail view I'll use gqview or thunar. If I want to edit a file, I can use the Gimp, or I can use Photoshop, or I can use any other program that can open and save a file.

It took me a couple hours to re-organize my whole iPhoto library into a sane structure again, but now I have a simple ~/pics folder and everything is where I can easily find it. I should've known better than to use iPhoto, but live and learn.

May 29, 2006 @ 3:54 PM PDT
Cateogory: Rants

2 Comments

benito
Quoth benito on September 03, 2007 @ 9:52 PM PDT

A helpful feature for this approach is storing meta-data into the pictures themselves as IPTC-data. E.g. jbrout does this, which is my favorite as it can also change EXIF-dates etc. This way you can re-use your categorizations/tags in other programs that a able to read EXIF/IPTC-data (digikam, picasa, ...).

I find this very helpful to create collections across my filesystem-based folders, that are ordered primarily by date and secondarily by subject (e.g. all pictures that show my girlfriend).

Brian
Quoth Brian on September 05, 2007 @ 12:57 PM PDT

Interesting idea. Kind of like ID3 tags in MP3s I guess.