https://bugs.kde.org/show_bug.cgi?id=453060

Paul Krause <paul_krause_1...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Paul Krause <paul_krause_1...@t-online.de> ---
Dear Maik,

thanks you and sorry if that should go into a new bug report, or not at all.

Unfortunately that fix removes all non-face regions if the metadata is
rewritten.
I tested that with the latest appimage
(digiKam-7.7.0-20220427T043335-x86-64.appimage).

Many Thanks! Paul



For what I understand from the source code and might suggest:

The problem is in DMetadata::setItemFacesMap at

// Remove face metadata before writing new ones to prevent problems (bug
436286).
removeItemFacesMap();

This unconditionally removes the whole Xmp.mwg-rs.Regions/mwg-rs:RegionList
tag, but there is no copy of the non-face regions in the database, memory or
somewhere else.

So either one of the following should be a fix:
A) Read all non-face regions from the image metadata before removeItemFacesMap
and write them to the image metadata afterwards.
B) Save the non-face regions too in the database (just not as faces) and write
them to the image metadata after removeItemFacesMap.
C) Instead of unconditionally removing the whole
Xmp.mwg-rs.Regions/mwg-rs:RegionList tag with removeItemFacesMap, remove just
the regions with Type == "Face". (I do not know if this conflicts Bug 436286.
But, for example, the writing of AppliedToDimensions has to be changed,
probably.)

For either of that, probably the code which checks if the RegionList tag is
empty, and should be deleted, or should not be written at all, needs an update
too.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to