Bug 439785 - Edit Metadata resets Exif info upon selecting 'Apply'
Summary: Edit Metadata resets Exif info upon selecting 'Apply'
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (show other bugs)
Version: 7.3.0
Platform: Other Other
: NOR grave
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-12 15:44 UTC by rickscheibner
Modified: 2021-11-03 21:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.4.0


Attachments
Edit Metadata screen grab (246.55 KB, image/jpeg)
2021-07-12 15:48 UTC, rickscheibner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rickscheibner 2021-07-12 15:44:45 UTC
SUMMARY
DigiKam doesn't allow specific Exif info to be applied to image.

STEPS TO REPRODUCE
1. Select Photo
2. Go to Item -> Edit Metadata
3. Select item to be edited and make changes
4. Push 'Apply'

OBSERVED RESULT
Data that was changed is reset to prior information

EXPECTED RESULT
Data that was changed should remain in place

SOFTWARE/OS VERSIONS
Windows: 10


ADDITIONAL INFORMATION
I've uploaded a .gif screen grab that should illustrate the problem in full. The example shows an attempt to add aperture info to the lens setting.
Comment 1 rickscheibner 2021-07-12 15:48:46 UTC
Created attachment 140011 [details]
Edit Metadata screen grab
Comment 2 Maik Qualmann 2021-07-12 16:44:11 UTC
I cannot reproduce the problem here. Image is not write-protected? Please upload the image you are having the problem with. If not public, then to my private email address.

A DebugView log is also interesting, as described here for Windows:

https://www.digikam.org/contribute/

Maik
Comment 3 Maik Qualmann 2021-07-12 16:52:10 UTC
Ok, with other images I get a:

Cannot save metadata with Exiv2 backend: (Error # 21: "Failed to write image"

I have a look at it.

Maik
Comment 4 Maik Qualmann 2021-07-12 21:06:29 UTC
The problem did not exist in digiKam-7.2.0 AppImage and Exiv2-0.27.3. I can reproduce the problem with Exiv2-0.27.4, it seems that our QByteArray metadata container is no longer accepted in all cases. If a value does not yet exist, there are no problems, if a value is changed in the metadata editor there is an error.

Maik
Comment 5 Maik Qualmann 2021-07-13 06:15:58 UTC
Git commit 088e83513d512b91560bb496377097752cf84d93 by Maik Qualmann.
Committed on 13/07/2021 at 06:15.
Pushed by mqualmann into branch 'master'.

first step fix Exif page in Metadata Editor Tool
Editing the metadata via a QBytArray does not work
more in current Exiv2 versions.

M  +22   -30   core/dplugins/generic/metadata/metadataedit/exif/exifadjust.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exifadjust.h
M  +23   -39   core/dplugins/generic/metadata/metadataedit/exif/exifcaption.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exifcaption.h
M  +29   -43   core/dplugins/generic/metadata/metadataedit/exif/exifdatetime.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exifdatetime.h
M  +48   -56   core/dplugins/generic/metadata/metadataedit/exif/exifdevice.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exifdevice.h
M  +13   -28   core/dplugins/generic/metadata/metadataedit/exif/exifeditwidget.cpp
M  +26   -34   core/dplugins/generic/metadata/metadataedit/exif/exiflens.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exiflens.h
M  +16   -24   core/dplugins/generic/metadata/metadataedit/exif/exiflight.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/exif/exiflight.h

https://invent.kde.org/graphics/digikam/commit/088e83513d512b91560bb496377097752cf84d93
Comment 6 Maik Qualmann 2021-07-13 10:42:26 UTC
Git commit 27e37167bf2a23c6d5d894b82859a8aaa89f7c0f by Maik Qualmann.
Committed on 13/07/2021 at 10:41.
Pushed by mqualmann into branch 'master'.

next step fix Iptc page in Metadata Editor Tool

M  +9    -20   core/dplugins/generic/metadata/metadataedit/iptc/iptccategories.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptccategories.h
M  +14   -26   core/dplugins/generic/metadata/metadataedit/iptc/iptccontent.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptccontent.h
M  +21   -29   core/dplugins/generic/metadata/metadataedit/iptc/iptccredits.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptccredits.h
M  +20   -30   core/dplugins/generic/metadata/metadataedit/iptc/iptceditwidget.cpp
M  +32   -42   core/dplugins/generic/metadata/metadataedit/iptc/iptcenvelope.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptcenvelope.h
M  +6    -17   core/dplugins/generic/metadata/metadataedit/iptc/iptckeywords.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptckeywords.h
M  +34   -46   core/dplugins/generic/metadata/metadataedit/iptc/iptcorigin.cpp
M  +9    -4    core/dplugins/generic/metadata/metadataedit/iptc/iptcorigin.h
M  +34   -44   core/dplugins/generic/metadata/metadataedit/iptc/iptcproperties.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptcproperties.h
M  +14   -24   core/dplugins/generic/metadata/metadataedit/iptc/iptcstatus.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/iptc/iptcstatus.h
M  +5    -11   core/dplugins/generic/metadata/metadataedit/iptc/iptcsubjects.cpp
M  +2    -2    core/dplugins/generic/metadata/metadataedit/iptc/iptcsubjects.h

https://invent.kde.org/graphics/digikam/commit/27e37167bf2a23c6d5d894b82859a8aaa89f7c0f
Comment 7 Maik Qualmann 2021-07-13 18:50:31 UTC
Git commit a83a5b58975c7dbded127c4ddc50c783409243b9 by Maik Qualmann.
Committed on 13/07/2021 at 18:49.
Pushed by mqualmann into branch 'master'.

last step fix Xmp page in Metadata Editor Tool
FIXED-IN: 7.4.0

M  +2    -1    NEWS
M  +9    -20   core/dplugins/generic/metadata/metadataedit/xmp/xmpcategories.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpcategories.h
M  +18   -30   core/dplugins/generic/metadata/metadataedit/xmp/xmpcontent.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpcontent.h
M  +62   -72   core/dplugins/generic/metadata/metadataedit/xmp/xmpcredits.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpcredits.h
M  +18   -29   core/dplugins/generic/metadata/metadataedit/xmp/xmpeditwidget.cpp
M  +6    -17   core/dplugins/generic/metadata/metadataedit/xmp/xmpkeywords.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpkeywords.h
M  +51   -63   core/dplugins/generic/metadata/metadataedit/xmp/xmporigin.cpp
M  +9    -4    core/dplugins/generic/metadata/metadataedit/xmp/xmporigin.h
M  +20   -29   core/dplugins/generic/metadata/metadataedit/xmp/xmpproperties.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpproperties.h
M  +14   -23   core/dplugins/generic/metadata/metadataedit/xmp/xmpstatus.cpp
M  +8    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpstatus.h
M  +5    -11   core/dplugins/generic/metadata/metadataedit/xmp/xmpsubjects.cpp
M  +2    -3    core/dplugins/generic/metadata/metadataedit/xmp/xmpsubjects.h

https://invent.kde.org/graphics/digikam/commit/a83a5b58975c7dbded127c4ddc50c783409243b9
Comment 8 Maik Qualmann 2021-08-04 15:49:35 UTC
*** Bug 440588 has been marked as a duplicate of this bug. ***
Comment 9 Maik Qualmann 2021-11-03 21:21:48 UTC
*** Bug 444903 has been marked as a duplicate of this bug. ***