Lens Recognition in Exiv2 v026 (and later)

I've given up on lens recognition. Manufacturers use the same lensID for more than one lens. This is discussed here: http://dev.exiv2.org/issues/1212

On the trunk and v0.26, you can add your lens to the file ~/.exiv2. You need to know your lensID

636 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pv --grep lens/i ~/Stonehenge.jpg 
0x0083 Nikon3       LensType                    Byte        1  14    
0x0084 Nikon3       Lens                        Rational    4  180/10 2500/10 35/10 63/10
0x008b Nikon3       LensFStops                  Undefined   4  55 1 12 0
0x000c NikonLd3     LensIDNumber                Byte        1  146 <--- This number
0x000d NikonLd3     LensFStops                  Byte        1  55
637 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
Put it into ~/.exiv2 (or c:\Users\username\exiv2.ini on MSVC/MinGW builds).
637 rmills@rmillsmbp:~/gnu/exiv2/trunk $ cat ~/.exiv2 
[nikon]
146=Robin's Sigma Lens

638 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
Now your lens will be recognised.
638 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 -pa --grep lens/i ~/Stonehenge.jpg 
Exif.Nikon3.LensType                         Byte        1  D G VR
Exif.Nikon3.Lens                             Rational    4  18-250mm F3.5-6.3
Exif.Nikon3.LensFStops                       Undefined   4  4.58333
Exif.NikonLd3.LensIDNumber                   Byte        1  Robin's Sigma Lens
Exif.NikonLd3.LensFStops                     Byte        1  F4.6
638 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 

Redmine Appliance - Powered by TurnKey Linux