Bug 309254 - TEMPLATE : contact information aren't written to XMP tags of JPG
Summary: TEMPLATE : contact information aren't written to XMP tags of JPG
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Metadata-Template (show other bugs)
Version: 3.0.0
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 13:27 UTC by Knut Hildebrandt
Modified: 2022-01-10 21:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Hildebrandt 2012-10-30 13:27:14 UTC
I usally write all metadata including the contact information coming with the copyright information from a template into the jpg's. This worked fine until version 2.5.0 (running under KDE 4.9.2 on Kubuntu 1204). With the upgrade to Kubuntu 1210 digikam was updaded to version 2.8 and all of a sudden not all copyright information is being written into the images files anymore. Namely the contact infomation is missing.  I'm neither able to locate it going through the menu "Image/Metadata/Edit all Metadata " nor using gwenview. The respective fields are greyed out.

I think, but am not sure, the problem started with digikam version 2.6 which I had installed under Kubuntu 1204 from unsupported repositories. Since I assumed this was due to inconsictancies in the repositories I downgraded again to wait for a supported version. But the problem still exists after the upgrade to Kubuntu 1210 and digikam 2.8 (all installed from supported repos).

That is why I downgraded on Kubuntu 1210 digikam to version 2.5.0 too and everything works as it used to work.

Reproducible: Always

Steps to Reproduce:
1. create a template mit contact information like emai-address, phone number, etc.
2. append these to the medatada of an image
3. write all metadat into the image files
4. view them using gwenview, gimp or going through the digikam menus.
Actual Results:  
Contact information is missing in xmp-tags after writing copyright information from the template into the image files (at least in versions 2.6 to 2.8).

Expected Results:  
Contact information should be wirtten into xmp-tags as it was in versions 2.5.
Comment 1 Knut Hildebrandt 2012-12-24 05:44:07 UTC
Just compiled digikam-3.0.0-beta3 and still have the same issue. 

Examining files processed with digikam 2.5.0 in gimp 2.8 I found out, that the missing XMP-Tags (at least digikam and gwenview call them like this) were written to the IPTC-Core section and are called CiAdrCity, CiAdrCtry; etc. Do I save metadata with later versions of digikam these tags do not appear anymore.
Comment 2 Knut Hildebrandt 2012-12-24 05:56:22 UTC
Just compiled digikam-3.0.0-beta3 and still have the same issue. 

Examining files processed with digikam 2.5.0 in gimp 2.8 I found out, that the missing XMP-Tags (at least digikam and gwenview call them like this) were written to the IPTC-Core section and are called CiAdrCity, CiAdrCtry; etc. Do I save metadata with later versions of digikam these tags do not appear anymore.
Comment 3 Marcel Wiesweg 2013-01-12 19:20:52 UTC
Writing the contact info (which is an XMP structure) has been fixed during the time you indicate. A short test shows that it is properly written to XMP and is visible from digikam's metadata view as well.

Exiv2 output (three values filled):

Xmp.iptc.CreatorContactInfo                  XmpText     0  type="Struct"
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity XmpText     5  Essen
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry XmpText     0  
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr XmpText     8  SStr. 44
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrPcode XmpText     5  45xxx
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrRegion XmpText     0  
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiEmailWork XmpText     0  
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiTelWork XmpText     0  
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText     0
Comment 4 Knut Hildebrandt 2013-01-13 05:16:03 UTC
(In reply to comment #3)

Just downloaded the latest source code via git and compiled it. From my point of view the bug still exists. Neither Gimp 2.8 nor gwenview 2.8.4 nor digikams built-in metadata editor show the Tags.

Checked them with exiv2 and they are there, as you already have stated. But the ones written with digikam3.0.0 look different than the ones written with digikam2.5.0. 

Exiv2 output digikam3.0.0 (five values filled):
Xmp.iptc.Location                            XmpText     0  
Xmp.iptc.CreatorContactInfo                  XmpText     0  type="Struct"
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity XmpText     6  Berlin
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry XmpText    11  Deutschland
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr XmpText     1   
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrPcode XmpText     1   
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrRegion XmpText     0  
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiEmailWork XmpText    24  mail@
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiTelWork XmpText    15  +49-
Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText    30  http://www.


Exiv2 output digikam2.5.0 (five values filled):
Xmp.iptc.CountryCode                         XmpText     0  
Xmp.iptc.Location                            XmpText     0  
Xmp.iptc.CiAdrCity                           XmpText     6  Berlin
Xmp.iptc.CiAdrCtry                           XmpText    11  Deutschland
Xmp.iptc.CiAdrExtadr                         XmpText     1   
Xmp.iptc.CiAdrPcode                          XmpText     1   
Xmp.iptc.CiAdrRegion                         XmpText     0  
Xmp.iptc.CiEmailWork                         XmpText    24  mail@
Xmp.iptc.CiTelWork                           XmpText    15  +49-
Xmp.iptc.CiUrlWork                           XmpText    30  http://www.

For me the question is, are the three programs I use to visualize the tag buggy or lies the bug in the new way they are written into the files?
Comment 5 Knut Hildebrandt 2013-01-13 18:12:51 UTC
Did some more investigations into the matter using Gimp 2.8 which I started from command line.

Opening a file coming fresh from the camera Gimp reports following error, which seems to be understandable, since no XMP-data have been written to the file yet.

While parsing XMP metadata:
Error: No XMP packet found

Opening a file I processed with digicam3.0.0 before Gimp reports the following error:

While parsing XMP metadata:
Error on line 135 char 1: End of element <exif:Flash> not expected in this context
Metadata parasite seems to be corrupt

Viewing the metadata of the processed file in Gimp throws following error:

While parsing XMP metadata:
Error on line 179 char 1: End of element <Iptc4xmpCore:CreatorContactInfo> not expected in this context
Metadata parasite seems to be corrupt

Hope this information may give you a clue what goes wrong.
Comment 6 Marcel Wiesweg 2013-01-13 18:38:23 UTC
As I already said, the writing of the contact info was _fixed_ which means it was incorrect in 2.5, and is correct now.
It may be that the metadata edit kipi plugin has not been properly fixed.

The most valid reference should be an image edited with an Adobe product, which I dont have available. One sample XMP packet I found on the web shows this XML:

<Iptc4xmpCore:CreatorContactInfo Iptc4xmpCore:CiAdrExtadr="xxx East xxth St xx" Iptc4xmpCore:CiAdrCity="New York" Iptc4xmpCore:CiAdrRegion="NY" Iptc4xmpCore:CiAdrPcode="10000" Iptc4xmpCore:CiAdrCtry="USA" Iptc4xmpCore:CiTelWork="xxx.xxx.xxx" Iptc4xmpCore:CiEmailWork="nobody@nowhere.com" Iptc4xmpCore:CiUrlWork="www.nowhere.com"/>

Digikam/exiv2 writes:

<Iptc4xmpCore:CreatorContactInfo
    Iptc4xmpCore:CiAdrCity="Essen"
    Iptc4xmpCore:CiAdrCtry=""
    Iptc4xmpCore:CiAdrExtadr="SStr. 44"
    Iptc4xmpCore:CiAdrPcode="45xxx"
    Iptc4xmpCore:CiAdrRegion=""
    Iptc4xmpCore:CiEmailWork=""
    Iptc4xmpCore:CiTelWork=""
    Iptc4xmpCore:CiUrlWork=""/>

which seems correct.
Comment 7 Knut Hildebrandt 2013-01-13 19:16:51 UTC
(In reply to comment #6)
> As I already said, the writing of the contact info was _fixed_ which means
> it was incorrect in 2.5, and is correct now.
> It may be that the metadata edit kipi plugin has not been properly fixed.

Well you are right, the contact info is visible in digikams metadata viewer both in 2.5 and 3.0, even though it looks slightly different depending on if it was written with digikam 2.5 or digikam 3.0. To be honest, I don't know wich way is correct and thus accept what you say. Nevertheless I'll file a bug against the kipi plugin, that this may be fixed there too.

Thanks for your effort.
Comment 8 caulier.gilles 2020-08-03 05:07:40 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 9 Knut Hildebrandt 2021-01-31 22:36:37 UTC
(In reply to caulier.gilles from acomment #8)
> digiKam 7.0.0 stable release is now published:

Sorry for the late reply, but I didn't archive many pictures recently and thus only today found time to look into the matter. Honestly I hardly know anymore what the issue is about. Since reporting it I've changed my workflow and don't write any metadata directly into JPG files from digicam but only to sidecard files. And I only import them into the JPG's after precessing them for release. This works great, for both IPTC and XMP.

Hope this info helps.