ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Teacup on October 15, 2017, 04:20:28 PM

Title: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Teacup on October 15, 2017, 04:20:28 PM
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
Title: Re: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Phil Harvey on October 15, 2017, 06:49:05 PM
ExifTool already handles this lens with all of its various ID's.

- Phil
Title: Re: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Teacup on October 16, 2017, 03:18:56 AM
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
Title: Re: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Phil Harvey on October 16, 2017, 07:30:40 AM
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
Title: Re: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Teacup on October 16, 2017, 08:31:18 AM
Thank you. Could you possibly point me to the file and line of code which handles that? I have the ExifTool repo cloned.
Title: Re: 50 shades of Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM
Post by: Phil Harvey on October 16, 2017, 09:17:31 AM
It is done in the Image::ExifTool::Nikon::LensIDConv() function.  Currently line 7868 of Nikon.pm

- Phil