SUMMARY It seems that DigiKam uses the metadata in MakerNotes first, which can be wrong or generic when using a "dumb" or third-party lens. I can correct the metadata using `exiftool`, but DigiKam seems to not recognize the updated data. STEPS TO REPRODUCE 1. Take a raw photo and convert it to DNG format using Adobe DNG converter. 2. Update metadata using `exiftool`. 3. Import the DNG files, and check the metadata in the "Table" view. OBSERVED RESULT The photos show the metadata in MakerNotes. EXPECTED RESULT The photos show the updated metadata set in EXIF and/or XMP. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian Sid KDE Plasma Version: N/A KDE Frameworks Version: 6.12.0 Qt Version: 6.8.3 ADDITIONAL INFORMATION 2 examples are provided (too large for attachments): https://filebin.net/pq44k7s1ketgz8l1 `1.dng` is from a Sigma 8-16 lens on a Pentax K-70. There is a known issue with Pentax cameras that caused the camera to read any focal length less than 10mm as 0mm. The focal length is still saved in the `LensFocalLength` field, so I run `exiftool -tagsfromfile @ '-FocalLength<LensFocalLength' 1.dng` to change the focal length. After that, if using `exiftool` backend, the 35mm eqv. focal length is not shown and the lens name is missing (seems to be random among similar photos). If not using the `exiftool` backend, the 35mm eqv. focal length is still missing, but the lens name show properly. `2.dng` is from a Tokina 80-400 lens, which `LensType` ID corresponds to "Sigma or Samsung lens". I used `exiftool -m -Lens="Tokina AT-X 80-400mm F4.5-5.6" -LensModel="Tokina AT-X 80-400mm F4.5-5.6" 2.dng` to manually update the lens name, but the MakerNote name (based on the `LensType` ID) is always used. This also affects "dumb" lens (which `LensType` ID would be "M-42 or No Lens" for the original K mount or "A Series Lens" for KA mount). My suggestion is to use the EXIF and XMP data first, then the "composite" data (which should show the 35mm eqv. focal length), and use the MakerNote data last.
I don't see any errors in the 1.dng image; digiKam shows the focal length as 8.1mm. This matches all possible metadata fields, both Exif and the maker notes. In the 2.dng image, we can prioritize Exif.Photo.LensModel first, just like with Sony and Canon, for Pentax. Maik
Git commit 258d32593707e4d684e30fc1991ca991b0e8c80f by Maik Qualmann. Committed on 31/07/2025 at 06:46. Pushed by mqualmann into branch 'master'. prioritize Exif.Photo.LensModel also for Ricoh/Pentax M +5 -1 core/libs/metadataengine/dmetadata/dmetadata_photo.cpp https://invent.kde.org/graphics/digikam/-/commit/258d32593707e4d684e30fc1991ca991b0e8c80f
I don't see any problems with the focal length in the digiKam code. I suspect they have to reread the metadata from the image to the database if they subsequently changed the values with ExifTool. Maik
(In reply to Maik Qualmann from comment #3) > I don't see any problems with the focal length in the digiKam code. I > suspect they have to reread the metadata from the image to the database if > they subsequently changed the values with ExifTool. > > Maik I have updated to 8.7.0, and the issue persists. Refer to the 2 screenshots I have added to the filebin link. I went to Settings->Configure digikam->Metadata, and unchecked "Use `exiftool` backend to read metadata from files". After that, I selected all the files in the folder, and selected Item->Reread metadata from file. The 35mm eqv focal length is missing, despite it being shown correctly in the right. Then, I re-enabled the `exiftool` backend and reread the metadata again (which makes the lens name disappear at random). Regarding the commit, as I have mentioned before, the behavior (read from XMP `Lens` and EXIF `LensModel`) should be the default and not limited to certain brands of cameras; the data from makernotes should be considered last (instead of first) and should only be used if not found anywhere else, as it is not uncommon to take photos using an adapted/"dumb" lens and fill in the missing metadata afterwards.
No, you need to try with 8.8.0 appImage daily build available here: https://files.kde.org/digikam/ Best regards Gilles Caulier
(In reply to caulier.gilles from comment #5) > No, you need to try with 8.8.0 appImage daily build available here: > > https://files.kde.org/digikam/ > > Best regards > > Gilles Caulier It seems that the edited lens names now show correctly. However the first issue shown in the screenshots still exists in the latest daily build.
The 35mm specification isn't a bug; you need to ensure that this information is also written to the corresponding Exif field so that Exiv2 can evaluate it. The display in the ExifTool viewer is likely a dynamic calculation, which we cannot currently evaluate. You need to set the metadata field "Exif.Photo.FocalLengthIn35mmFilm" and/or "Xmp.exif.FocalLengthIn35mmFilm". Maik
I checked again; there's no information about the 35mm focal length in image 1.dng. We already have a bug report regarding the calculation of the 35mm focal length, see Bug 367935 I'm therefore closing this bug now. Maik