Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by darobin (1316) on 2003.02.01 10:10 (#16618) Homepage Journal

    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 get an iBook real soon now...

    --

    -- Robin Berjon [berjon.com]

    • 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 [berjon.com]

    • 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 [perl.org] 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 [berjon.com]

        • 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