Hi Chris,
My original concern was that xml file and permissions, but neither
seem to be an issue.
I had a look at the iPhoto AlbumData.xml file in my users directory.
The one you suggested is not the correct one for the current logged
on user. Anyway it had me baffeled as it seems to assign a number to
each photo and farther down are the links to the various paths for
each image. iPhoto stores an image three places. The Data folder
contains the thumbnails of each image. These are very low res cropped/
rotated/ color adjusted or whatever transformation you have applied
to that image. The Originals folder contains... Yes, the original
images brought into iPhoto in an unaltered state. And last the
Modified folder, and of course it contains the high res (really
medium res) altered image. This is the higher res version of the ones
in the Data folders. All folders inside are duplicated across all
three folders. The folders inside these are the rolls or albums you
create.
Since I just wanted to grab random images I wrote a small routine to
get a random image. The path is:
f=SpecialFolder.Pictures.Child("iPhoto Library").Child
("Originals").Child("random folder").Child("random folder").Child
("random image.jpg')
You can substitute Originals with Data or Modified. There is a
downside to only using one of any of these folders. The Data images
are low res, they wouldn't do well unless you need a thumbnail and in
that case this a perfect solution. The Originals provide a great
image that can be scaled up or down (within reason) with minimal loss
but it's orientation may be incorrect. Modified images that have been
cropped/ rotated or whatever are there but unaltered images are
missing. This is not a problem if you're one to tweak each picture in
iPhoto. So probably the best way is to decipher the xml file as it
will give you the correct path of all images. I did mine by hand, I
just follow the same path as the Originals folder but into the
Modified folder if that file exists use that else use the Original.
As long as your fishing around in the users images there doesn't seem
to be any permissions problem. There are other picture libraries and
getting access to them would be a cool trick. Seems I remember a
Shell script that brings up an Authenticating dialog and will give
you temporary permission to act on a file you wouldn't have normally
have access to. You'd also have to know the correct paths for the
other accounts. I have only verified this on two computers and both
are running 10.4.7 and the most current iPhoto. These paths may not
be valid in older OS's or versions of iPhoto. If anybody that has
access to older OS/iPhoto version can send me the paths to their
users pictures so I can verify that this will not break in older
versions. The xml file was in the same directory as the Originals/
Modified/Data folders so I'm guessing this is a correct path.
Well that's the iPhoto class for today. Good luck.
Craig
On Sep 28, 2006, at 7:48 AM, realbasic-nug-
[EMAIL PROTECTED] wrote:
Message: 13
Subject: Re: Getting access to iPhoto images
From: Christopher Jett <[EMAIL PROTECTED]>
Date: Wed, 27 Sep 2006 23:34:21 -0500
What was your solution?
--
Chris Jett
[EMAIL PROTECTED]
On Sep 27, 2006, at 11:17 PM, Craig Hoyt wrote:
Please disregard my last email, one of my beta testers just pointed
out how stupid I am. Thank you!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>