Bug 287267 - IptcCore tags are written incorrectly
Summary: IptcCore tags are written incorrectly
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Iptc (show other bugs)
Version: 2.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 15:04 UTC by anttiah
Modified: 2017-08-13 07:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0
Sentry Crash Report:


Attachments
XMP sidecar file with incorrectly written IptcCore tags (1.98 KB, application/octet-stream)
2011-11-22 15:04 UTC, anttiah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anttiah 2011-11-22 15:04:20 UTC
Created attachment 65938 [details]
XMP sidecar file with incorrectly written IptcCore tags

Version:           2.2.0 (using KDE 4.7.2) 
OS:                MS Windows

According to email conversation with Phil Harvey - ExifTool Author - following IptcCore tags have been written incorrectly:
 
CiAdrCity
CiAdrCtry
CiAdrExtadr
CiAdrPcode
CiAdrRegion
CiEmailWork
CiTelWork
CiUrlWork
 
These are elements of the "ContactInfo" structure used by CreatorContactInfo, not stand-alone IptcCore tags.

Reproducible: Didn't try

Steps to Reproduce:
In DigiKam settings choose: Metadata Writing Mode: "Write to XMP sidecar only"

Then add metadata using right hand side Caption/Tags -button --> Information panel. (I think I had to create metadata template first (using pencil button on Information panel) writing just some test text in all possible fields. I then applied this template into a selected photo. I had marked my actual photo file as READ ONLY in Windows Explorer.)


Expected Results:  
Software should write metadata correctly and robustly!
Comment 1 caulier.gilles 2011-11-22 15:40:17 UTC
Andreas, sound like a problem with Exiv2 ?

Gilles Caulier
Comment 2 caulier.gilles 2011-11-22 15:41:17 UTC
*** Bug 287272 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Huggel 2011-11-24 06:15:38 UTC
Gilles, I think this is a usage problem. If these are fields in a structure, then they have to be set accordingly, Exiv2 doesn't do that by itself. You can get an idea from the example here: http://www.exiv2.org/example5.html - Look for "structure" and you'll find tags like "Xmp.xmpDM.videoFrameSize/stDim:w". 

I'll check the IptcCore specs and come back with more specific info.

Andreas
Comment 4 Andreas Huggel 2011-11-28 03:15:27 UTC
Gilles,
This is how to add the CreatorContactInfo structure as far as I can tell:

    // Add a creator contact info structure
    xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity"] = "Kuala Lumpur";
    xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry"] = "Malaysia";
    xmpData["Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork"] = "http://www.exiv2.org";

The XMP-SDK serializes this to:

   <Iptc4xmpCore:CreatorContactInfo
    Iptc4xmpCore:CiAdrCity="Kuala Lumpur"
    Iptc4xmpCore:CiAdrCtry="Malaysia"
    Iptc4xmpCore:CiUrlWork="http://www.exiv2.org"/>

Andreas
Comment 5 caulier.gilles 2011-12-17 09:19:54 UTC
Thanks Andreas,

I will take a look in libkexiv2

Gilles
Comment 6 Marcel Wiesweg 2012-04-14 16:17:52 UTC
Git commit 8111d3535d289d3f751957c016c1d0267f20b579 by Marcel Wiesweg.
Committed on 14/04/2012 at 17:16.
Pushed by mwiesweg into branch 'master'.

Fix accessing IptcCore contact info structure in XMP, as recommend by A. Huggel.

M  +2    -1    NEWS
M  +24   -24   libs/dmetadata/dmetadata.cpp

http://commits.kde.org/digikam/8111d3535d289d3f751957c016c1d0267f20b579
Comment 7 Marcel Wiesweg 2012-04-14 16:18:50 UTC
In a short test, the information from the test .xmp given above was read correctly with this patch applied