Bug 173632 - Transparent update of picture content and metadata after file update and on software start
Summary: Transparent update of picture content and metadata after file update and on s...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 0.10.0
Platform: Ubuntu Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-26 20:25 UTC by Stibbons
Modified: 2020-08-30 15:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stibbons 2008-10-26 20:25:29 UTC
Version:           3.5.10 (using KDE 3.5.10)
Installed from:    Ubuntu Packages

Some tagging application, like picasa, stores the "legends" in Iptc.Application2.Caption but stores nothing in jpeg exif comment.
Digikam doesn't see updates in theses files and show an empty "legend" field.

On the other hand, when writing, Digikam writes the "legend" in both exif jpeg comment and iptc.Application2.Caption.

Expected behaviour:
After an image has been updated, on click or refresh on this image, Digikam should compare exif comment and iptc caption. If should take the non empty one. If they are different, an order should be defined (I think it should use iptc caption).
Comment 1 caulier.gilles 2008-10-26 20:30:05 UTC
I think that an empty string is valid. this subject have been already discuted in the past...

Gilles Caulier
Comment 2 Stibbons 2008-10-26 22:16:09 UTC
Please give me more info about this. 

I've found in the code that digikam does this process only when scaning the library (scanlib.cpp) : it first try to get comment (from database?), then from exif and at last from iptc.

The problem here is when updating the picture with an external tool, changes in iptc comment are not reflected in digikam database. I have to manually delete the database to force a full refresh, but this is not confortable since it take several dozen minutes to rebuild the database.
Comment 3 Mikolaj Machowski 2008-10-26 22:59:09 UTC
According to newly released Metadata Working Group guidelines policy is:

3.3.3.3
[...]
If there's a conflict between Exif and IPTC-IIM, a Consumer SHOULD prefer Exif in the case the IPTC-IIM checksum matches or does not exist and SHOULD prefer IPTC-IIM in the case the checksum does not match. A string property that is comprised  of only spaces or only nul characters MUST be treated as non-existent.
[...]

http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf (page 27)

According to this when reading digiKam doesn't behave properly, writing is OK.
Comment 4 Stibbons 2008-10-27 10:03:26 UTC
Ok for string containing only space :)

But is it normal that digikam doesn't refresh the database when the image iptc has been updated by an external app?
Comment 5 Geoff King 2008-10-27 15:55:49 UTC
I would like Digikam to be as "compatible" with Picassa and other programs as possible.  IMO, the behavior should be changed so that 1) it can read comments stored by Picasa, and 2) changes from other programs are detected, although I'm not sure I want it to update automatically.  
Comment 6 Stibbons 2008-10-28 02:04:51 UTC
It's definitely a database sync issue, not related to the image  itself. When editing the iptc or the exif data with the digikam edit menu, everything is right (iptc shows the picasa comment and exif displays nothing). But it's distrurbing not to see the legend in the "legend" field. After a rebuild of the database, the legend field is populated correctly, so digikam does handle the metadata comments correctly, it's just a matter to refresh the database smartly after updating a file.

May I suggest to perform a iptc/exif and other data sync between the files and the database on file click or folder "refresh". The first solution, file click, may cause performance problem, but when using the "file/refresh", one could expect metadata changes will be added to the database.
Comment 7 Marcel Wiesweg 2008-11-17 22:50:21 UTC
Speaking for 0.10, the current policy is as follows:
When detecting a change of modification date, only "hard" information is rescanned, that is file size, fingerprint, dimension, format, bit depth and color model.
The rationale is that digikam gives priority to what is stored in its database. 
If you edit photos with an external tool, you need to take the extra step and run the sync-with-db tool.

The report is a bit unclear to me if we do something wrong when we rescan (and the code has changed since 0.9). We do currently not implement the IPTC checksum idea from the MWG paper.
Comment 8 Stibbons 2008-11-18 01:36:59 UTC
Ok, let me rephrase:
- I've added some photo in Digikam
- With an external tool (that is picasa), I edit the caption
- This tool only update IPTC, and if there is EXIF caption, EXIF caption is also updated
- Anyway, these changes are not seen in Digikam because the file caption (EXIF/IPTC) are not re-read after file update.
- Even file rescan (File/Refresh) doesn't work (so the file still appears without caption in the main ui while there is IPTC caption within the file)
- Note: when using the Image/Metadata/Change IPTC, the modified caption is well present, so there is no problem from.

I would suggest to add the Caption extraction procedure in the File/Refresh processus (so the new caption will be updated). There is no algorithm to change, I only suggest that : make the File/Refresh update the image captions.
Comment 9 caulier.gilles 2008-12-06 08:12:32 UTC
Stibbons,

What's new about this report ? it still valid using digiKam 0.10.0 ?

Gilles Caulier
Comment 10 Marcel Wiesweg 2008-12-06 14:44:53 UTC
This bug touches a number of issues that are still valid for 0.10.

- A wish to reread (parts of the) metadata when file is modified. Currently, by deliberate decision, this requires to manually reread the metadata using the right side bar. A possible WONTFIX.

- A wish to implement the IPTC checksum as described by the MWG paper cited by Mikolaj. A WISH.

- think about removing the File/Refresh item because it should not be needed anymore. It currently rereads information from database and rebuilds thumbnails. The only possible use is when you externally edit a file and the thumbnail is not updated. Then the thumbnails should be reloaded rather than rebuilt.

Comment 11 Stibbons 2008-12-06 16:47:01 UTC
To my understanding:
1) reread metadata : since metadata can change, it could be very useful to have the ability to force digikam to refresh the database with the updated information (IPTC caption and keyword). If the "right side bar" allows such a thing (by a button "Reread" for instance), it's alright (but this should be working for several files).
2) IPTC checksum should be very heavy, if, when you browse a directory, you have to check all iptc of all files to find updated information.
3) File/refresh doesn't seem to be linked to metadata, so should be renamed to "Thumbnail refresh". 

I, personnally, would like to advocate for a "Thumbnail + metadata Refresh" file menu, since this could be done for all the file currently in the database.
Comment 12 Stibbons 2009-01-07 13:58:24 UTC
Hello,

I'm unable to compile digikam 0.10 on my ubuntu, so I can't test it.

As Marcel suggest, this bug can impact different point in the software. I just would like to point out the fact that the software should be as easy to use as possible, so if something is not done automatically, it should be possible to be forced by a menu/button.

I would strongly support the ability to the software to be updated automatically when a file metadata have been modified, if not, manually. If the "Right sidebar" allow to do it manually, it's ok as lot as it is on all files in the database. Doing it for each file is not a good solution, since one cannot know which file he has updated or not. 

And imagine I find a find a marveillous software that will tag automatically all face in my pictures or all bridges or is able to recognise which file is done by night or in Paris, etc, and add metadata tag and/or caption. Or, simply, it I use another software to enter the caption because I do think it's easier with this software than with digikam?
How in this case can I rebuild the entire digikam collection?

Picasa use a good mecanism to be warned by the system as soon as one of the file in its collection have been modified (could be done by gvfs or something). And, when it starts, it scans quickly and transparently to check whether one of these files have been modified, and if there is any change in the picture itseft or in the metadata, it updates its own database.
This have a strong impact like "This is a clever software that accept and integrate smoothly the changes I've made manually".

I would strongly recommend doing this as well, I can understand this could be tricky to develop, and I'm not saying picasa is a better software that should be copied on all points, but when there a better solution, and to my opinion this transparent file update is better, this should be copied/adapted without problem.
Comment 13 Stibbons 2009-01-07 15:24:38 UTC
I'd like to rename the bug "transparent update of picture content and metadata after file update and on software start", how could this be done, or should I open another bug dedicated to this behaviour I would like to promote?

Thanks
Comment 14 Vlado Plaga 2010-02-13 10:09:43 UTC
I also think an option "Re-read metadata when files are modified", possibly with an additional "Picture metadata overrides database information" would be very useful. After all a picture with a modified file date should in my opinion just be handled like a new file - but of course changing digiKam's default behaviour now would be counter-productive. That's why new options would be nice.

DigiKam is explicitly advertised as "open source" and as such should also be more open to inter-operate with other software than commercial software like iPhoto needs (or wants) to be.

My specific problem is that I use two instances of digiKam on different operating systems, operating on the same pictures. Parts of this comment originate from my e-mail to "digikam users":
http://mail.kde.org/pipermail/digikam-users/2010-January/009379.html
Comment 15 Sebastian Schubert 2010-02-21 18:14:12 UTC
Whether you agree or disagree with automatic refresh, the command to update the tags is too well hidden. Why don't put it in the menu to Rebuild Fingerprints etc.?
Comment 16 Milan Knížek 2010-02-22 16:07:25 UTC
*** This bug has been confirmed by popular vote. ***
Comment 17 caulier.gilles 2010-06-07 09:31:46 UTC
*** Bug 218730 has been marked as a duplicate of this bug. ***
Comment 18 caulier.gilles 2011-12-17 09:29:44 UTC
Marcel,

What's the status of this file with 2.x serie ?

Gilles Caulier
Comment 19 Marcel Wiesweg 2011-12-25 14:33:41 UTC
I'm a bit lost with this bug atm, lots of different aspects are discussed.
Comment 20 caulier.gilles 2014-09-04 08:51:35 UTC

*** This bug has been marked as a duplicate of bug 227814 ***
Comment 21 caulier.gilles 2020-08-30 15:58:02 UTC
Fixed with #227814