View Full Version : iPhoto database...programming to read it
May 29, 2013, 12:39 PM
Not a programmer here but I'm delving into an idea that needs to access the iphoto database. I want to be able to access the 'faces' feature presenting a new interface structure. Is this possible?
May 29, 2013, 12:44 PM
Is it acceptable to "use" a feature of another app for your app?
May 29, 2013, 12:53 PM
I'd actually like to do it even as a plugin for iphoto/aperture, but as it is presenting the data in a very different manner, I have no idea if that's even possible within iphoto/aperture.
May 29, 2013, 01:52 PM
I can't really tell what you're asking. If you're going to write an OSX or iOS app that reads in pictures from iPhoto, then identifies faces and does something with them, you can use CIDetector (Core Image Detector).
Check out http://maniacdev.com/2011/11/tutorial-easy-face-detection-with-core-image-in-ios-5.
May 29, 2013, 06:54 PM
Sorry about being cryptic.
I use iphoto a lot, finding the faces, combined with events, feature particularly useful for organisation of large libraries which of course Apple also think is pretty good hence they exist. But as the user has already done the hard work of organising and identifying such, my concept is to build onto that with a new visual representation of such with getting the user to repeat the work already done.
So my question is can a plugin be written that merely accesses existing fields of iphoto/aperture, doesn't modify them, and would perhaps write its own small db in response to user input to visually represent the photos in a whole new manner?
And by the way, I won't be writing this. I'd engage a programmer to do so.
May 29, 2013, 08:43 PM
Sorry about my grumpy old man impersonation. I'm quite convincing at that.
Anyway, I think the answer to your question is yes.
I searched on my hard drive around and found ~/Pictures/iPhoto Library/Database/apdb/Faces.db. Based on nothing other than the name and location of that file, it may (repeat may) contain information about the faces in the photos in your iPhoto library. The photos in your iPhoto library are located at ~/Pictures/iPhoto Library/Masters/yyyy/mm/dd/weirdcodethatIhaventdecoded.
So my guess is iPhoto fires up, finds the photos at the above location, then loads the Faces.db to determine how to show photos when you're in the Faces tab.
So if your programmer can decipher the Faces.db file format, he'd get the same information iPhoto does for faces. Then he can program your app to do whatever it is you want.
On a side note I still don't understand what you want. If you're frustrated with me, you're going to be more frustrated working with your programmer because he'll pester you with questions. Or if he doesn't he'll deliver you an app that doesn't do what you want. So you'll need to spend several 8 hour days writing down and drawing what you want and discussing it with your programmer. Project definition is a long, grueling process and programmers are weird.
May 29, 2013, 09:31 PM
Thanks for the response.
Lol...it's you who should be getting frustrated with me, as I know I'm being vague. With a programmer, I'd obviously have to fully explain my concept for them to have the chance of any implementation.
Again though, I'd love to try and make is a plugin that works within the confines of iPhoto/Aperture interface, adding perhaps an icon in the left bar under the faces/events/photos/locations. That would be the ideal solution for it.
Doing searches on web for plugins, most are concerned with exporting, adjusting or filtering the actual picture. My idea involves none of that, merely a way of pictorially viewing the structure of content already there. It would also need to have some drag and drop capabilities, essentially at the faces interface. I repeat though, this is not about individual photos, but about the visual representation of data already input by users that iPhoto's uses to create its groupings like the faces page.
Damn...I think I just muddied the waters more!:eek:
Once I can establish if its possible, I will then be on the hunt for a competent programmer.