Bug #854

Sigma 50mm f/1.4 on Canon not detected correctly

Added by Rick Gabriel about 9 years ago. Updated over 8 years ago.

Target version:
Start date:
06 Oct 2012
Due date:
27 Apr 2013
% Done:


Estimated time:


The Sigma 50mm f/1.4 EX DG HSM lens on Canon is detected as a Sigma 18-50mm f/2.8 Macro instead. I noticed this in Darktable and reported it to them. They thought it may be an issue in the lensfun library and the lensfun developers narrowed it down to a bug in exiv2. The EXIF data in the image is correct, but the exiv2 command line tool reports a different lens. I am using exiv2 0.23. A sample image is attached.


5D3M8497.JPG (1.02 MB) 5D3M8497.JPG Rick Gabriel, 06 Oct 2012 21:28
bug854.patch (6.28 KB) bug854.patch Patch for Bug #854 and #895 Aakash Goenka, 26 Apr 2013 14:02

Associated revisions

Revision 3023 (diff)
Added by Niels Kristian Bech Jensen over 8 years ago

Issues #854 and #895: Improve the heuristic for matching Canon lenses by including maximum aperture. Patch by Aakash Goenka. Make all lens names unique.



Updated by Aakash Goenka over 8 years ago


I have attached a patch to fix this bug. Presently, Exiv uses a heuristic in case of conflicting lens ID's. The heuristic involves matching the focal length of the lens. I have improved on the heuristic by including the matching of maximum aperture, along with focal length. This leads to more accurate conflict resolution, and consequently fixes this bug, and also Bug 895.


Updated by Aakash Goenka over 8 years ago

Working link - Bug #895


Updated by Niels Kristian Bech Jensen over 8 years ago

  • Due date set to 27 Apr 2013
  • Status changed from New to Resolved
  • Assignee set to Niels Kristian Bech Jensen
  • Target version set to 0.24
  • % Done changed from 0 to 100

Thanks for the patch. I have submitted it to the svn trunk.

Niels Kristian


Updated by Robin Mills over 8 years ago

  • Status changed from Resolved to Closed

Fixed in 0.24.

Also available in: Atom PDF