[Hacking Mac]: iPhoto Structure

[Update]: See updated iPhoto SQL structure page for more recent information from digging around, or here.

Spent some more time working out how iPhoto works. Here is some of what appears to be going on. By the way, I’m using iPhoto ’09, just for reference.

The default iPhoto library is stored in the “~/Pictures/iPhoto Library”. I’m going to refer to this from now on just as “iPhoto Library”. This is a package, so you will need to tell Finder to open the package contents so that you can see inside. From the command line, you can just change (cd) right into the directory. There are some files such as AlbumData.xml that contain an XML description of the iPhoto database. The one thing to note is that this file is basically just written out for reference. It doesn’t actually get read in. There is a good write-up of the different files that iPhoto uses here. (Fat Cat software makes an application called iPhoto Library Manager that sounds nice, but not quite what I’m looking for.) The iPhoto Library sits in “iPhoto Library/iPhotoMain.db”. It’s an SQLite3 database.

I’m not importing my images into the library and I’m mainly concerned with the original files to update the locations, so I’m less interested in the data directories “Data”,”Originals”, and “Modified”

For reference, there are also a couple of options for starting iPhoto.
First, you can select a different library when iPhoto starts up.
Second, you can run maintenance on the iPhoto Library.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s