A message about how I solved a not new problem.
I write this up because I could find info about how to solve this problem but searching for it and finding out what exactly to do took quite some time better spent otherwise. Hope it helps others to solve it faster for them through this post.
This is about a Pentax lens but that only matters for practical reasons. It happens to be a HD Pentax DA* 16-50mm F/2.8ED PLM AW to be precise. Thing is that Exiftool decifers it’s metadata correctly where EXIV2 shows an ‘unknown (0x08c3)’ value. darktable uses EXIV2. The’0x08c3’ value does identify this lens by the way.
Why it matters: just identification of the used lens prevents darktable from automatic lens correction which I greatly value.
First I fiddled for some time with lens correction presets. To no avail. Then after a lot of searching and reading used EXIV2 en ExifTool to extract the following:
*$ exiv2 -pv .DNG | grep LensType
_K316855.DNG 0x003f PentaxDng LensType Byte 4 8 195 0 0
_K316856.DNG 0x003f PentaxDng LensType Byte 4 8 195 0 0
$ exiv2 -pt .DNG | grep LensType
_K316855.DNG Exif.PentaxDng.LensType Byte 4 HD Pentax DA 16-50mm f/2.8 ED PLM AW
_K316856.DNG Exif.PentaxDng.LensType Byte 4 HD Pentax DA* 16-50mm f/2.8 ED PLM AW
$ exiftool -LensType .DNG
======== _K316855.DNG
Lens Type : HD PENTAX DA 16-50mm F2.8 ED PLM AW
======== _K316856.DNG
Lens Type : HD PENTAX DA* 16-50mm F2.8 ED PLM AW
In the EXIV2 documentation I found the following info: exiv2/src/pentaxmn_int.cpp at main · Exiv2/exiv2 · GitHub in which is on line 824 the frase: {0x08c3, “HD PENTAX DA* 16-50mm F2.8 ED PLM AW”},
What I learned: the right info is in my picture files but EXIV2 is not able to present the lens correctly in de image information section. Something is wrong, would love to help correcting it.
Needed multiple attempts to correct the situation. Under Linux the way to go is creating a file named .exiv2 in the /home/ folder. Note the leading ‘.’ in it’s name! Under Windows you need to create an ‘exiv2.ini’ file in the users home directory. It’s contents took some experimenting. I finally used this:
[Pentax]
8 195 0 0=HD Pentax DA* 16-50mm f/2.8 ED PLM AW
# 0x08c3=HD Pentax DA* 16-50mm f/2.8 ED PLM AW
# 0x08c3=(0)
# 0x08c3=000
The first line is unfortunately the last I came up with. The other lines are commented out with a ‘#’, those lines may be removed.
As the problem was not resolved during quite some attempts I thought I might need to remove pictures from darktable, remove/rename the connected .xmp files and import again to get the fresh data in the .xmp’s. These steps proved not nessecary but one doesn’t know what exactly to do until being succesfull.
Only the ‘.EXIV2’ file with proper contents for your specific situation is needed together with a refresh of the metadata under ‘actions on selection’/’metadata’-tab in the right hand panel of the lighttable. Of course you need to select all involved pictures first.
Hope to be of some help.
Kind regards, Jetze