Created attachment 59062 [details] $ exiv2 -ea image.cr2 Version: 2.0.0 (using KDE 4.6.0) OS: Linux Please add the support for recognition of Tokina AT-X 107 AF DX Fish-eye 10-17mm f/3.5-4.5 from Exif. Extracted exv is attached. Should the raw file be needed, let me know (25 MB). Reproducible: Always Steps to Reproduce: Open digikam editor and try Enhance/Lens/autocorrect Actual Results: It gets recognised as Canon EF 20-35mm f/3.5-4.5 USM. exiv2 0.21.1-1 shows $ exiv2 -pt 2_04.cr2 | grep -i lens Exif.CanonCs.LensType Short 1 Canon EF 20-35mm f/3.5-4.5 USM Exif.CanonCs.Lens Short 3 10.0 - 17.0 mm Exif.Canon.LensModel Ascii 70 10-17mm exiftool 8.21-1 shows $ exiftool 2_04.cr2 | grep -i lens Lens Type : Canon EF 20-35mm f/3.5-4.5 USM or Tamron Lens Lens Model : 10-17mm Lens Drive No AF : Focus search on Lens AF Stop Button : AF stop Lens : 10.0 - 17.0 mm Lens ID : Unknown (160) 10-17mm Lens : 10.0 - 17.0 mm (35 mm equivalent: 9.8 - 16.6 mm)
Andreas, There is something to do in Exiv2, or i need to wrap this Lens description string in digiKam for LensFun library ? Gilles Caulier
The lens needs to be added to the list in canonmn.cpp. (The mapping is not always unique, several different lenses use the same codes, see the exiftool output: ... OR ...)
Created attachment 59104 [details] 001 patch for exiv2 0.21.1 - adding Tokina lens to existing Canon and Tamron
Created attachment 59105 [details] 002 patch for exiv2 0.21.1 - adding Tokina lens and deleting existing Canon and Tamron
The Tokina lens seems to use id 160. Adding an extraline to canonmn.cpp (see the attached file 001....patch) does not help - exiv2 still reports it as Canon. Deleting all existing lines with id 160 and adding a new line just for Tokina (see the attached file 002...patch) works as expected - exiv2 recognises the lens as Tokina. Is there any other logic in exiv2, which makes some fuzzy checks e.g. of focal length and apperture values within the name of the lens?
Andreas, See patches and comment #5 from Milan... Gilles Caulier
Milan, yes, another line is necessary to enable the magic that checks the focal length. With the patch below it works on the exv file you attached. I've checked in the change. Andreas --- canonmn.cpp (revision 2473) +++ canonmn.cpp (working copy) @@ -551,6 +551,7 @@ { 156, "Canon EF 28-105mm f/3.5-4.5 USM" }, { 160, "Canon EF 20-35mm f/3.5-4.5 USM" }, // 0 { 160, "Tamron AF 19-35mm f/3.5-4.5" }, // 1 + { 160, "Tokina AT-X 107 AF DX Fish-eye 10-17mm f/3.5-4.5" }, // 2 { 161, "Canon EF 28-70mm f/2.8L" }, // 0 { 161, "Sigma 24-70mm EX f/2.8" }, // 1 { 161, "Sigma 28-70mm f/2.8 EX" }, // 2 @@ -671,6 +672,7 @@ { 150, printCsLensByFocalLength }, { 152, printCsLensByFocalLength }, { 153, printCsLensByFocalLength }, + { 160, printCsLensByFocalLength }, { 161, printCsLensByFocalLength }, { 169, printCsLensByFocalLength }, { 173, printCsLensByFocalLength }, // works partly
Thanks, Andreas. exiv2 works not as expected. (And the information displayed in dk's image properties tab as well.)
Eh, I wanted to type "exiv2 works _now_ as expected".
Andreas, Do you have patched Exiv2 source code ? Gilles Caulier
It seems the patch was checked in: http://dev.exiv2.org/projects/exiv2/repository/revisions/2474 Milan
Thanks i close this file now... Gilles Caulier