Bug 434423 - Digikam displaying incorrect lens info in 'Properties - Photograph Properties'
Summary: Digikam displaying incorrect lens info in 'Properties - Photograph Properties'
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (show other bugs)
Version: 7.2.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-15 05:30 UTC by John O
Modified: 2021-04-02 06:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0
Sentry Crash Report:


Attachments
Digikam 7 vs ShowFoto 6.4 photo properties (154.78 KB, image/png)
2021-03-15 05:30 UTC, John O
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John O 2021-03-15 05:30:58 UTC
Created attachment 136686 [details]
Digikam 7 vs ShowFoto 6.4 photo properties

SUMMARY

I've used Digikam for many years with the same camera and lenses but noticed with version 7.0, the lens information is incorrectly displayed in Properties - Photograph Properties. Sometimes it will list a similar but incorrect lens, sometimes it will list 'Manual lens' Interestingly, the correct lens info is always displayed in Metadata - Photograph Information - Lens Model.

I noticed this behavior start in version 7.0 on both Ubuntu (AppImage) and Windows, and is still present in 7.1 on both platforms. The behavior is the same for both newly imported raw files (Sony ARW) and the processed JPG files (processed in RawTherapee) Since I dual boot I can also process pictures using Lightroom, and when looking at those Lightroom processed JPGs, Digikam will show the correct lens info in Properties - Photograph Properties for only those files.

I've also tested looking at the images using Gwenview in Ubuntu and both the RAW and JPG files show the lens info correctly

Finally, while writing this bug report, I installed the latest Showfoto from the standard Ubuntu repos which is still version 6.4 and that displays the correct lens info under the Properties - Photograph I've attached screenshots of the two photo properties tabs. 

STEPS TO REPRODUCE
1. Open Digikam and look at either RAW or JPG files
2. Check lens info in right hand column - Properties - Photograph Properties

OBSERVED RESULT
Incorrect lens listed or 'Manual Lens'

EXPECTED RESULT
Correct lens information


SOFTWARE/OS VERSIONS
Ubuntu 20.10
Windows 10 

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2021-03-15 06:46:56 UTC
Please test it with the release candidate of digiKam-7.2.0 for Windows or Linux AppImage from here:

https://files.kde.org/digikam/

If you want to revert to an older digiKam version, make a backup of your database.

Maik
Comment 2 Maik Qualmann 2021-03-15 06:50:44 UTC
Since the properties of the sidebar tab come from the database, it is necessary to re-read the metadata from the image with digiKam-7.2.0.

Maik
Comment 3 Maik Qualmann 2021-03-15 07:14:09 UTC
I can confirm the problem with my test images from Sony cameras. We probably have to change the order in which the Exif metadata fields are queried.

Maik
Comment 4 Maik Qualmann 2021-03-15 11:43:17 UTC
Git commit 5be9924780316fdf267ab43a4648ee2226eef89e by Maik Qualmann.
Committed on 15/03/2021 at 11:42.
Pushed by mqualmann into branch 'master'.

ignore Sony Makernote lens info with entry "Manual lens"
FIXED-IN: 7.2.0

M  +2    -1    NEWS
M  +7    -4    core/libs/metadataengine/dmetadata/dmetadata_photo.cpp

https://invent.kde.org/graphics/digikam/commit/5be9924780316fdf267ab43a4648ee2226eef89e
Comment 5 John O 2021-04-01 02:29:22 UTC
Hello, as a follow up I tested a few of the weekly snapshots, and have since installed the 7.2 final release, and the same issue remains. I can't find any rhyme or reason, certain images display the correct lens info, and others display the incorrect lens info. In some albums, its only a few pics that are incorrect, in other albums, the entire album is incorrect. Many show lenses I don't even own and have never shot with. I've tested on two systems and the result is the same. I've deleted my Collections, and let Digikam re-scan my entire collection to see if that resolves the issue, it does not. Both RAW and JPG are still inconsistent. Other software such as Gwenview still displays the correct lens information.
Comment 6 Maik Qualmann 2021-04-01 06:03:37 UTC
The entries in the properties sidebar come from the database. After we correcting the Sony lens problem, you now have to reload the metadata data of the images in question, either Menu-> Album or Menu-> Item-> Read metadata from the image again.

Maik
Comment 7 Maik Qualmann 2021-04-01 06:06:19 UTC
Otherwise we need a image sample (RAW + JPG) for testing. If not public, to my private email address.

Maik
Comment 8 John O 2021-04-01 19:58:18 UTC
I tried reloading the metadata for some files and albums as you described, but it had no impact on the lens info, unfortunately. I'll attach an example ARW and JPG that both display the incorrect info. The lens listed - E PZ 16-50mm is incorrect and should be displaying E 70-350mm. Again, the correct lens info can be seen in the Metadata EXIF tab, but not in the main Properties tab under Photograph Properties.
Comment 9 John O 2021-04-01 20:03:57 UTC
File size too large to attach, so I emailed them.
Comment 10 Maik Qualmann 2021-04-01 20:53:35 UTC
We give priority to Makernotes to preserve the lens model. But Exiv2 decodes a different lens model in the Makernotes than in the Exif metadata for Sony. The problem can also be reproduced with the Exiv2 CLI tool. This problem should also be reported as a bug to Exiv2 with the samples. As a workaround, we will initially give priority to the Exif metadata.

Maik
Comment 11 Maik Qualmann 2021-04-02 06:09:12 UTC
Git commit 27d128ad1c2cc40215e32731c36cfe1a74719e59 by Maik Qualmann.
Committed on 02/04/2021 at 06:07.
Pushed by mqualmann into branch 'master'.

use Exif.Photo.LensModel at Sony first
FIXED-IN: 7.3.0

M  +13   -2    core/libs/metadataengine/dmetadata/dmetadata_photo.cpp

https://invent.kde.org/graphics/digikam/commit/27d128ad1c2cc40215e32731c36cfe1a74719e59