Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

  (email not shown publicly)
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Friday January 31, 2003
08:45 PM


[ #10330 ]

One of the things I didn't like about the first iPhoto was that I could use it to organize my photos, but couldn't use that information for anything useful, such as in cooperation with my online gallery. Well, that may be changing. With iPhoto 2, I can use Apple events to find out which photos are in which albums, and find out the relevant information of each photo, so I can regularly run a script that will suck out the information from iPhoto, and then update the information in the MySQL database. It will be pretty simple, actually, with Mac::Glue. I'll whip something up when I get around to it (when I get my computer back ... grrr ...).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Is iPhoto's storage format known? I read somewhere that starting with Keynote (and following up on the preferences and stuff), Apple was to use XML as the storage format for an increasing number of its apps. Not to over-pitch XML (especially as Keynote's format could be much improved upon, notably by using SVG instead of copying it) but it would make export trivial, could be used directly in AxKit's image gallery, would allow one to search for pics using Find::File::Rule::XPath, etc.

    robin, who's to


    -- Robin Berjon []

    • I've not looked for iPhoto 2, but that's a good question. When I get a chance, I'll find out. I know iPhoto v1, it was not XML.
    • Not to over-pitch XML (especially as Keynote's format could be much improved upon, notably by using SVG instead of copying it)

      I don't condone what Apple did, but I don't condemn them either. Even Tim Bray has said on occasion that it is more important to start using XML than to wait for a nice-sounding whiz-bang specification to gel.

      I was in a position when I needed an Schema language for XML in 1999. Shortly thereafter, we needed an XML Query language for the same project, just before the first XM

      • Oh I know that ad hoc is good, I'm a great advocate of using ad hoc vocabularies and do so whenever there is no existing solution that satisfies me (which is why I never use DocBook, only convert to it).

        However SVG 1.0 has been around for a while, and Apple was on the WG. I know they wanted to use it for some OS X stuff but had to ship earlier than the spec was released. However I am having some trouble understanding why they're using things like <g transformation='1 0 2 2 3 6'> instead of


        -- Robin Berjon []

    • It looks like most, but not all, of the info I need is in AlbumData.xml, including a list of all the images, with title, date, filename, comment, and unique iPhoto ID.

      It does not include heigh/width, though, which is important for my use; however, I could get all the info from the XML and from there query iPhoto via Apple events for the dimensions. Actually, what I really need is not dimensions, but degrees of clockwise rotation. It looks like iPhoto does not store that information at all, or at least no
      • Is there any chance that the rotation would be in the EXIF data? There's a field for orientation [] so there could well be more info.

        For my needs I don't mind throwing in a small SAX filter to add the dimensions, it's cool to know that it's XML so that I can think about building drop in apps for AxKit and that kind of stuff I use. Thanks for the info, hopefully I'll have my iBook soon enough to play with that kind of stuff :)


        -- Robin Berjon []

        • A good idea, but apparently not.

          $ exifdump ./iPhoto\ Library/2001/07/23/Originals/DSCN0357.JPG | grep Orientation
          Orientation -> top_left
          $ exifdump ./iPhoto\ Library/2001/07/23/DSCN0357.JPG | grep Orientation
          Orientation -> [top_left,top_left]
          $ exifdump ./iPhoto\ Library/2001/07/23/Thumbs/10.jpg | grep Orientation

          So even in iPhoto's copy of this image, which was flipped upside down in iPhoto, the orientation remains unchanged in the EXIF data (for some value of "unchanged" ... it rewrites the EXIF dat