It seems the entries (or at least some) of my personal lens are being ignored by ExifTool.
This is how (part of) my config file looks like:
@Image::ExifTool::UserDefined::Lenses = (
'Minolta AF 50mm F1.7',
'Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro',
'Tamron AF 18-250mm F3.5-6.3 XR Di II LD',
'Tamron SP AF 10-24mm F3.5-4.5 Di II LD Aspherical IF',
'Minolta/Sony AF DT 18-70mm F3.5-5.6 (D)'
);
Although all my lenses are listed in there, when running -LensModel<LensID ExifTool still writes a long "or" list of other possible lens values to my image files. An example image results in a LensModel value of Sigma 18-50mm F2.8 or Sigma 20-40mm F2.8 EX DG Aspherical IF or Sigma 20-40mm F2.8 EX DG Aspherical IF or Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro.
Shouldn't only the Tamron lens from my personal list be in there? Is there something I am missing?
I noticed that all lines in your example config file start with for example %Image::ExifTool::UserDefined::geosetter = ( while the lens list starts with @Image::ExifTool::UserDefined::Lenses = ( (notice the @ instead of the % at the beginning of the line). Playing around with %s and @s didn't get my any further though.
Thank you for your help.
Actually, when running exiftool -k on the processed image file, I get an output of
Lens Type : Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma or Tamron Lens
Lens : Sigma 18-50mm F2.8 or Sigma 20-40mm F2.8 EX DG Aspherical IF or Sigma 20-40mm F2.8 EX DG Aspherical IF or Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro
Lens Info : 24-105mm f/3.5-4.5
Lens Model : Sigma 18-50mm F2.8 or Sigma 20-40mm F2.8 EX DG Aspherical IF or Sigma 20-40mm F2.8 EX DG Aspherical IF or Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro
Lens Spec : Unknown (00 0 0 0 0 00)
Lens ID : Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro
where the last entry Lens ID is chosen correctly by ExiFtool according to my list - it just doesn't correspond with what got written to the Lens and Lens Model fields.
I don't understand how this could happen. Could you email me a sample that shows this problem so I can try it out? My mail is philharvey66 at gmail.com
- Phil
Thanks for your answer, Phil.
Your surprise made me look further into the work flow I was using and I figured the problem out. I was unknowingly using two versions of ExifTool on my machine - one used by Python and not using the correct config file, the other one from the command line which gave me the correct values later on. That also explains the different values.
It was such an unexpected case that it took me some hours to figure out. Now everything is working just fine and I can successfully update the lens data in my DNG files even after I have imported them into Lightroom.
As a side note, I might have figured this out earlier if there was a way or command to check whether and which configuration file is currently in use.
I'm glad you figured this out.
Unfortunately there can be no option to display which config file is in use (the -v option would have been perfect for this) because the config file is loaded before any other options are parsed (this is why the -config option must come first).
The only way to do this would be to put a "print" statement in your config file.
- Phil