Bug #8876

Lens metadata missing in Digikam converted DNG files

Added by Daniel Münch over 5 years ago. Updated almost 5 years ago.

Target version:
Start date:
Due date:
% Done:


Affected Version:
hardware architecture:


Not really sure whether this is an Darktable or Digikam bug but when I convert CR2 files with Digikam 2.8.0 to DNG darktable is not showing the lens metadata anymore. When comparing the exif data, the Lens Info is still in the DNG. See the attached textfiles for sample metadata.
I also reopened an old Digikam bug here: but as I said, the lens info is in the DNG metadata. Maybe it is in a different field so Darktable doesn't find it?

I am using Darktable 1.0.5 (8.14 KB) Daniel Münch, 08/21/2012 06:08 AM

lensnofun.txt Magnifier (2.09 KB) HaJo Schatz, 05/15/2013 02:13 PM


#1 Updated by Tobias Ellinghaus over 5 years ago

Something in the exif data of th DNG is strange. It reports a crop factor of 6.4 (the CR2 reports 1.6) and consequently reports a focal length of 222.8 mm instead of 55.0 mm. My guess would be that lensfun is somewhat confused by these numbers. I haven't checked if we read these fields though.

#2 Updated by Pascal de Bruijn over 5 years ago

  • % Done changed from 0 to 20
  • Target version set to Future
  • Priority changed from Medium to Low
  • Status changed from New to Triaged
  • Category set to Darkroom

The ExifTool dumps are limited, since they don't list the exact EXIF fields (so ExifTool might be doing all kinds of behind-the-curtain magic to get stuff right).

So we'd need full image samples to test this...

But at this point it really looks like a DNG converter bug, which is exactly why you shouldn't convert any RAW to any other RAW format (e.g. DNG) in the first place. I've talked about this a while ago:

#3 Updated by Pascal de Bruijn over 5 years ago

Small note, I seem to see in the Digikam bugreport that you're still using Exiv2 0.19, is that right? Because that's a historical artefact... Make sure you have at least 0.22, preferably 0.23...

#4 Updated by HaJo Schatz almost 5 years ago

The issue is still there -- for .CR2 lenses get detected correctly, for .DNG (converted with dngconverter 3.1.0) that detection fails. Both files contain the same lens & focal length values, however dngconverter alters the field-names "LensModel" -> "LensInfo", see attached output produced with exiv2 version 0.22

I can happily provide sample CR2 & DNG files if required -- easier than selecting the lens manually for every picture ;)

Pls let me know if I should report this to lensfun instead, I'm not sure whether Darktable or Lensfun interprets the EXIF data.

Also available in: Atom PDF