[Digikam-users] Import from iPhoto 9.5, XMP sidecar format
Jens Benecke
jens-digikam at spamfreemail.de
Fri Aug 28 21:50:26 BST 2015
Thanks! Unfortunately, it's not so easy: iPhoto does not export anything
by itself.
The iPhoto database consists of an "AlbumData.xml" file which contains a
lot, but not all, info about all images and which is being created
explicitly for apps that want to access the images read-only (eg.
viewers). This is documented.
The rest (keywords, location names, flagged and hidden attributes, and
lots of internal info like whether an image has been modified and what
has been done with it) is scattered over half a dozen ".apdb" files
which are SQLite3 databases with an undocumented and sometimes cryptic
schema. I have done my best to decrypt and document this schema. Now I
need to find out where to write the image metadata so that Digikam and
as many other apps as possible can benefit.
The Ruby script which I'm extending uses AlbumData.xml and two of the
SQLite3 databases to create XMP sidecar files which are then copied to a
directory structure in which the iPhoto images are hardlinked (to
minimize additional disk space). This new directory scheme can then be
imported by Digikam. If this works I can delete the iPhoto database and
the sidecar files again (or archive them, or just ignore them - don't
know yet). The actual image files (JPG, MP4, ...) should never be
modified themselves.
My current implementation creates a JSON structure like this
[{"XMP:GPSLatitude":48.123,"XMP:GPSLongitude":8.789,"XMP:Headline":"Movie Example","XMP:Rating":2,"XMP:description":"Whatever","SourceFile":"/......./IMG_5451.xmp"}]
and a command like this
exiftool -j=JSONFILE XMPFILE
to generate XMP from the JSON input.
Now, this JSON already contains GPS data, Title, description, rating,
and SourceFile. But it's missing the info below because I don't know in
which tags I should write it. I tried several combinations, but so far
I'm not successful. Any help - for example, an XMP file which contains
all metainformation that Digikam can import, would be great.
Regards
Jens
Am 23.08.2015 um 16:25 schrieb Alan Pater:
> I haven't seen a full sample XMP file, but if you are comfortable
> reading code, the tags and properties that digikam imports are in
>
> https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dmetadata/dmetadata.cpp
>
> I suspect you are covered for "caption, description/comment, ratings,
> faces (rectangles, IDs and names), GPS location data + names. Not so
> sure for image versions and "hidden" "flagged" attributes.
>
>
> If you could share an exported XMP file from iPhoto?
>
> On Sun, Aug 23, 2015 at 8:32 AM, Jens Benecke
> <jens-digikam at spamfreemail.de> wrote:
>> Hello,
>>
>> thank you! I browsed through the documentation but the number of specific
>> examples is very low (i.e. zero).
>> Is there an example XMP sidecar file that
>>
>> - Digikam can fully import,
>> - contains image versions, caption, description/comment, ratings, "hidden"
>> and "flagged" attributes, faces (rectangles, IDs and names), GPS location
>> data + names and so on?
>>
>> Is there any property that Digikam supports which can NOT be imported using
>> sidecar files?
>>
>> Thanks!
>>
>> Jens Benecke
>>
>>
>>
>> Am 19.08.2015 um 16:53 schrieb Alan Pater:
>>> I can't claim a lot of expertise, but perhaps xmpMM DerivedFrom might
>>> be what you are looking for. However, I am not sure what digikam uses
>>> for image history.
>>>
>>>
>>> http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2014-12/XMPSpecificationPart2.pdf#G4.1133171
>>>
>>>
>>> http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/XMP.html#xmpMM
>>>
>>> For your Face rectangles, the MWG Region properties are used by digikam.
>>>
>>> http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf#page=51
>>>
>>>
>>> http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/MWG.html#Regions
>>>
>>> Hopefully this is a bit of help on getting the conversion further along.
>>>
>>> Cheers!
>>>
>>> On Mon, Aug 17, 2015 at 4:24 PM, Jens Benecke
>>> <jens-digikam at spamfreemail.de> wrote:
>>>
>>>> - Import modified photos as a second version of the original
>>>> ... how do I specify within the XMP sidecar that an image is a second
>>>> version of another image?
>>>> - Face rectangles within images
>>> _______________________________________________
>>> Digikam-users mailing list
>>> Digikam-users at kde.org
>>> https://mail.kde.org/mailman/listinfo/digikam-users
>> _______________________________________________
>> Digikam-users mailing list
>> Digikam-users at kde.org
>> https://mail.kde.org/mailman/listinfo/digikam-users
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users
More information about the Digikam-users
mailing list