Bug 327391 - HUB : add IrfanView tags support
Summary: HUB : add IrfanView tags support
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Hub (show other bugs)
Version: 4.0.0
Platform: Mint (Debian based) Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-10 04:08 UTC by Tracer Bullet
Modified: 2016-12-10 21:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments
Applied metadata using IrfanView, re-loaded metadata in Digikam, then applied metadata in Digikam (99.52 KB, image/jpeg)
2013-11-12 01:49 UTC, Tracer Bullet
Details
Applied metadata using Digikam, then applied metadata using IrfanView. (140.40 KB, image/jpeg)
2013-11-12 01:56 UTC, Tracer Bullet
Details
Irfanview Only Sample Image (3.89 KB, image/jpeg)
2015-03-06 21:46 UTC, Alan Pater
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tracer Bullet 2013-11-10 04:08:05 UTC
I can add a tag to a picture in Digikam and see it show up in the IPTC metadata using IrfanView (on WINE).  If I add another keyword to the IPTC metadata using IrfanView, Digikam will show that keyword in the IPTC metadata, but the keyword shows up neither in the list of defined tags nor as one of the tags displayed under the photo's thumbnail.  I have done this with Digikam closed, and I have told Digikam to re-load the metadata -- but the added info still does not show up as a tag.  This issue also occurs for files that have not been pre-tagged in Digikam.

Is this a bug? I'm assuming Digikam stores tags as simple keyword values in the IPTC metadata, and when I looked at the metadata in IrfanView, I saw no special flags (such as a "digikam:" prefix). If this is the case, why isn't it recognizing the tag created in IrfanView, even after telling Digikam to reload the metadata?

(A little background: I am moving from Picasa to Digikam; I plan to add a "PicasaStar" tag to each starred picture, so I can easily filter and re-tag the photos in Digikam. I have a list of all starred photos (from reading in all the .picasa.ini files. I haven't yet experimented with exiv for batch writing the tag, but I'd expect that an IPTC editor is an IPTC editor and IrfanView would be  reasonable test.)

Reproducible: Always

Steps to Reproduce:
1. Add a keyword to the IPTC metadata for a photo (I used IrfanView under WINE). Digikam can be opened or closed.
2. View that photo in Digikam and reload the metadata. The added keyword will be present under the listed IPTC metadata, but it will not show up as a tag. (It appears neither in the list of defined tags nor below the thumbnail where tags are displayed.)
3.
Actual Results:  
The added IPTC keyword shows up in Digikam when viewing metadata (in exactly the same fashion as Digikam-added tags do), but the added keyword doesn't show up as a tag.

Expected Results:  
Digikam should see the keyword, recognize it as a tag, and then display the tag in the list of tags, show it under the thumbnail, and allow filtering by that tag.

I'm running Linux Mint 15 (with Cinnamon)
Comment 1 caulier.gilles 2013-11-10 08:46:38 UTC
After to have patched tags with another application, just resync digiKam database with image metadata info using right option from main menu. You can also use option from the bottom of Captions/tags panel from the right sidebar, or use Maintenance tool.

Gilles Caulier
Comment 2 Tracer Bullet 2013-11-11 06:30:23 UTC
Upon further investigation, I've re-confirmed the behavior.  When there are no tags or captions or titles, adding those elements via IrfanView works fine -- Digikam sees them as such when it re-synchs the metadata. However, if Digikam first adds a tag to that photo, subsequent keyword additions by IrfanView will *not* show up as tags in Digikam. Likewise for captions and titles -- even after re-synching the metadata, the caption and title shown are the previous ones (written by Digikam), not the latest (written by IrfanView); it is this (older and now obsolete) information that is shown under the thumbnail and in the Caption/Tags pane (under the Description tab). Oddly, just as I found in the case of tags, if I look at the IPTC tab of the Metadata pane, the updated captions and titles are shown. 

So... I don't know what the problem is, but it's definitely there, and it's far-ranging enough to affect captions, titles, and tags. In summary: if Digikam makes a tag/caption/title first, then subsequent tags/captions/titles aren't read/displayed correctly, even after re-synching.

(In reply to comment #1)
> After to have patched tags with another application, just resync digiKam
> database with image metadata info using right option from main menu. You can
> also use option from the bottom of Captions/tags panel from the right
> sidebar, or use Maintenance tool.
> 
> Gilles Caulier

Thanks, Gilles. I had tried one of those (and have since tried the other two), but it's not finding the added keywords, even after re-synching the metadata (see above).
Comment 3 caulier.gilles 2013-11-11 15:42:35 UTC
Tracer,

Can you share some files which have been tagged with IrfanView ? If IrfanView generate XMP sidecars, please join also the relevant files.

Thanks in advance

Gilles Caulier
Comment 4 Tracer Bullet 2013-11-12 01:49:23 UTC
Created attachment 83508 [details]
Applied metadata using IrfanView, re-loaded metadata in Digikam, then applied metadata in Digikam

In IrfanView, I applied a tag (IrfanViewTag), a caption (IrfanViewCaption), and a title (IrfanViewTitle). I then re-loaded the metadata in Digikam and added a tag (DigikamTag) and changed the caption (DigikamCaption) and title (DigikamTitle).  Digikam displays everything correctly in this case. Both tags are present and the caption and title are the latest versions.
Comment 5 Tracer Bullet 2013-11-12 01:56:14 UTC
Created attachment 83509 [details]
Applied metadata using Digikam, then applied metadata using IrfanView.

In Digikam, I applied a tag (DigikamTag), a caption (DigikamCaption), and a title (DigikamTitle). I then opened the image in IrfanView, added a tag (IrfanViewTag) and changed the caption (IrfanViewCaption) and title (IrfanViewTitle).  In Digikam, I re-loaded the metadata. In this case, the IPTC data related to the tags, caption, and title shows up correctly in Digikam (looking at the IPTC tab of the Metadata pane), but the tag, caption, and title do not. In the Captions/Tags pane, the Description tab shows the old title (DigikamTitle) and the old caption (DigikamCaption). In the Tags tab, only the original DigikamTag is shown, not the IrfanViewTag. And under the thumbnail corresponding to the image, the same (old) data is shown: DigikamTitle, DigikamTag, and only the DigikamTag tag (rather than showing both DigikamTag and IrfanViewTag).
Comment 6 Tracer Bullet 2013-11-12 02:08:34 UTC
(In reply to comment #3)
> Tracer,
> 
> Can you share some files which have been tagged with IrfanView ? If
> IrfanView generate XMP sidecars, please join also the relevant files.
> 
> Thanks in advance
> 
> Gilles Caulier

I've attached a couple of files. There were no XMP sidecars created.

Hopefully these files are useful. I think they are. It *is* possible that the bug may be that Digikam simply does not re-read the metadata correctly once it has already been loaded. (In this case, my files wouldn't demonstrate the bug, but one can easily replicate it.) But to test this, I created a copy of the images in my file manager. Digikam saw the new files as they were added and it loaded them. The same issue is present with the copies as with the original... so the bug does appear to be in how the files are written or read from...
Comment 7 caulier.gilles 2013-11-12 06:42:24 UTC
What's the difference between before and after Tags assignment, with IRFanview ? I want mean which tags have been assigned with digiKam, and after which one have been added/removed with IRFanview ?

Gilles Caulier
Comment 8 Tracer Bullet 2013-11-12 15:00:13 UTC
(In reply to comment #7)
> What's the difference between before and after Tags assignment, with
> IRFanview ? I want mean which tags have been assigned with digiKam, and
> after which one have been added/removed with IRFanview ?
> 
> Gilles Caulier

I'm not sure if I understand the question correctly... in both cases the IPTC metadata has a DigikamTag and a IrfanviewTag keyword. No tags were removed by either program. (Only in the case of the caption / title info was the previous entry replaced with a new one.) So both images should have two tags, one called "DigikamTag" and one called "IrfanviewTag". And indeed, both images do have keywords "DigikamTag" and "IrfanviewTag" -- and Digikam sees this, which you can see by looking at the "IPTC" tab of the Metadata pane. However, only for one of the pictures does Digikam recognize both keywords as tags (so that they show up under the thumbnail and in the list of defined tags). If Digikam wrote a tag first (and IrfanView added another afterward), then Digikam only recognizes the original tag -- it doesn't treat irfanView's tag/keyword as an actual tag.

The same is true in the case of the captions and titles: the IPTC metadata is there, but Digikam does not recognize the metadata as a caption or a title if Digikam wrote some metadata first, and then IrfanView wrote some. (Again, this is *after* reloading the metadata in Digikam.) The difference between this situation and that of tagging is simply that there's only one "caption" or "title" field, so rather than adding another keyword,  I replaced the caption / title created with the first program with a caption / title created by the second program.
Comment 9 caulier.gilles 2013-12-02 15:50:56 UTC
I go back here : which digiKam and libkexiv2 version you use ? got to Help/components Info for details...

Gilles Caulier
Comment 10 caulier.gilles 2013-12-02 16:12:24 UTC
The problem explained here is relevant of inter-operability. 

typically, if digiKam tags image, it store tags path in a dedicated XMP namespace, not IPTC, due to severe limitation of IPTC. XMP is so far better/powerfull than IPTC.

If image is tagged originally by IrFanView, IPTC tags are parsed in import workflow, as no XMP data are found. As import is done an more tagging is done in digiKam, XMP data are added.

In next process, to tags again with IrFanView only more data as add to IPTC, not XMP, and as XMP data already exist, IPTC are ignored...

Gilles Caulier
Comment 11 caulier.gilles 2014-08-28 16:04:11 UTC
This entry still valid using last digiKam 4.2.0 ?

Gilles Caulier
Comment 12 caulier.gilles 2014-09-02 12:07:33 UTC
Tracer,

Please give me an image which have been ONLY tagged with IRFanview and not touched yet with digiKam more. I would to see where IRFanview store image information exactly.

Gilles Caulier
Comment 13 Alan Pater 2015-03-06 21:46:00 UTC
Created attachment 91460 [details]
Irfanview Only Sample Image

File created in Windows Paint, keywords added using Irfanview 4.28.

Note that the term "Tags" does not appear in Irfanview, keywords were added via IPTC Info dialog.
Comment 14 Maik Qualmann 2015-03-15 08:11:17 UTC
I can actually find no fault with the test image from comment 13. The keywords "IrfanView IPTC keywords I" and "IrfanView IPTC keywords II" are added and image tagged. Only the digiKam "Iptc.Application2.Urgency" still used for the rating should perhaps be changed.
Comment 15 caulier.gilles 2015-03-15 09:11:03 UTC
Maik,

"Iptc.Application2.Urgency" is only used in the way to import rating from image metadata to DB. digiKam do not store rating in this IPTC tag since a long time.

Gilles
Comment 16 Maik Qualmann 2015-03-15 09:55:15 UTC
Yes, but the test image from comment 13 generates a rating of one star in the digiKam DB. I think "Iptc.Application2.Urgency" this should be no longer used in the import for rating. But I do not know whether other (Windows) programs still used for the rating of images.

Maik
Comment 17 caulier.gilles 2015-03-15 10:07:55 UTC
I propose to include this change through this GSoC 2015 project :

https://community.kde.org/GSoC/2015/Ideas#Project:_Advanced_Metadata_HUB

The future metadata hub must let's the choice to end user to tune exactly which tags will be used to import/export info from image metadata to DB and vis versa. 

Actually rules about this IPTC tags is hard coded, as with all others Exif, IPTc, Makernotes, Xmp tags managed by digiKam

Gilles
Gilles
Comment 18 caulier.gilles 2015-05-10 07:56:44 UTC
Outside the fact that GSoC 2015 project will handle IrfanView import/export (which is another problem), what's the last status of this entry ?

Typically : 

- digiKam import well metadata registered by Irfanview to images ?
- Irfanview import well metadata registered by digiKam to images ?

The rules must be the same than ACDsee, LR, M$Photo, etc. : interroperability support.

Gilles
Comment 19 caulier.gilles 2016-03-07 06:54:16 UTC
This entry is illegible for GSoC 2016 project  :

https://community.kde.org/GSoC/2016/Ideas#Project:_digiKam_MetadataHub_improvements
Comment 20 Maik Qualmann 2016-12-10 21:04:45 UTC
This bug is no longer reproducible with the advanced metadata HUB. I close this bug now.

Maik