50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM

Started by Teacup, October 15, 2017, 04:20:28 PM

Previous topic - Next topic

Teacup

Hello

It seems that the LensID of the Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM varies as the focal length changes.
See https://github.com/Beep6581/RawTherapee/issues/4135#issuecomment-335901335

How will ExifTool/how are we to handle this?

Kind regards

Phil Harvey

ExifTool already handles this lens with all of its various ID's.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Teacup

How do I get ExifTool to print all the known LensIDs for that lens? It only prints the LensID for the 250mm focal length.

xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensID']/values/key[val='Sigma 18-250mm F3.5-6.3 DC Macro OS HSM']" -v "concat(@id,'     ',val)" -n < <(exiftool -listx -composite:all)
92 2C 2D 88 2C 40 4B 0E Sigma 18-250mm F3.5-6.3 DC Macro OS HSM

Phil Harvey

Sorry, the other LensID's aren't listed with the -listx option.  They are handled programatically.  I did this way because it seemed unrealistic to try to determine all possible LensID's for each of these variable-aperture lenses, and I didn't like the idea of having so many duplicate lenses in the list.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Teacup

Thank you. Could you possibly point me to the file and line of code which handles that? I have the ExifTool repo cloned.

Phil Harvey

It is done in the Image::ExifTool::Nikon::LensIDConv() function.  Currently line 7868 of Nikon.pm

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).