Bug 284269 - Tamron SP AF 17-50 show wrong lens ID
Summary: Tamron SP AF 17-50 show wrong lens ID
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (show other bugs)
Version: 2.2.0
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 13:45 UTC by Philip Johnsson
Modified: 2017-08-13 07:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.0


Attachments
Show wrong Lens ID in Digikam (296.51 KB, image/png)
2011-10-17 13:45 UTC, Philip Johnsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Johnsson 2011-10-17 13:45:40 UTC
Created attachment 64635 [details]
Show wrong Lens ID in Digikam

Version:           2.2.0 (using KDE 4.7.2) 
OS:                Linux

Exiv2 had a bug that displayed wrong LensID that is now fixed upstream in exiv2 but the LensID is still displayed wrong in the same way in Digikam photograph properties. Displays "251" instead of lens name (see attached image). This even after rebuilding libkexiv2 and digikam against the patched exiv2 0.22. I think this might happen to other Tamron lenses too but have no more to test with.

See Exiv2 bug report: http://dev.exiv2.org/issues/791 there is also a test picture.

Showing right Lens ID with patched exiv2:
$ exiv2 -pt SBP_3069.JPG | grep -i lens
Exif.Nikon3.LensType                         Byte        1  D G 
Exif.Nikon3.Lens                             Rational    4  17-50mm F2.8
Exif.Nikon3.LensFStops                       Undefined   4  7
Exif.NikonLd3.LensIDNumber                   Byte        1  Tamron SP AF 17-50mm F/2.8 XR Di II LD Aspherical (IF)
Exif.NikonLd3.LensFStops                     Byte        1  F7.0



Reproducible: Always

Steps to Reproduce:
Select Tamron SP AF 17-50mm F/2,8 XR Di II LD Aspherical [IF], Nikon mount image in Digikam and check "Lens" under Digikams photograph properties

Actual Results:  
Wrong Lens ID

Expected Results:  
Right Lens ID

OS: Linux (x86_64) release 3.0.0-12-generic
Compiler: gcc

digiKam version 2.2.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.22
LibJPEG: 62
LibJasper: 1.900.1
LibKDE: 4.7.2 (4.7.2)
LibKExiv2: 2.1.0
LibKGeoMap: 2.0.0
LibKdcraw: 2.0.0
LibLCMS: 119
LibPGF: 6.11.32 - internal library
LibPNG: 1.2.46
LibQt: 4.7.4
LibRaw: 0.13.5
LibTIFF: LIBTIFF, Version 3.9.5 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.12.2 (stable release)
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibGphoto2: 2.4.11
LibKface: 2.0.0
LibKipi: 1.3.0
LibOpenCV: 2.3.1
Libface: 0.2
Comment 1 caulier.gilles 2011-10-17 14:00:29 UTC
Are you sure to have re-compiled libkexiv2/digiKam with the fixed version of Exiv2 ?

Look into Help/Components Info for details.

This value come from Exiv2 without any manipulation from libkexiv2/digiKam...

Gilles Caulier
Comment 2 Philip Johnsson 2011-10-17 14:13:05 UTC
Yes, I'm 100% sure I have recompiled both libkexiv2 and digiKam against the patched exiv2 0.22. Not sure if this have something to do with that the some of the new Tamrons have 2 Lens IDs or something and if they are handled/displayed any differently from exiv2.
Comment 3 caulier.gilles 2011-10-17 14:16:38 UTC
using ldd, check if digiKam is linked with right exiv2 shared lib. Mine for ex:

[gilles@localhost core]$ ldd /usr/bin/digikam | grep exiv2
        libkexiv2.so.10 => /usr/lib64/libkexiv2.so.10 (0x00007fbb10d81000)
        libexiv2.so.10 => /usr/lib64/libexiv2.so.10 (0x00007fbb0671e000)

Gilles Caulier
Comment 4 caulier.gilles 2011-10-17 14:21:02 UTC
Philip,

Just take a care to turn right option in configure script to build Nikon Lens Database with Exiv2. See Below the Cmake configure result of Exiv2 on my computer :

-- ------------------------------------------------------------------
-- exiv2 0.22 configure results        <http://www.exiv2.org>
-- Building PNG support:               YES
-- Building shared library:            YES
-- XMP metadata support:               YES
-- Building static libxmp:             NO
-- Native language support:            YES
-- Conversion of Windows XP tags:      YES
-- Nikon lens database:                YES
-- Commercial build:                   NO
-- Build the unit tests:               NO
-- Building translations files:        NO
-- ------------------------------------------------------------------

I CC Andreas for info.

Gilles Caulier
Comment 5 Philip Johnsson 2011-10-17 14:44:32 UTC
I get this:

$ ldd /usr/bin/digikam | grep exiv2
        libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0x00007f8d42e90000)
        libexiv2.so.11 => /usr/lib/libexiv2.so.11 (0x00007f8d3adaa000)

And I build exiv2 with is feature set:

-- Exiv2 0.22 feature configuration summary
--
-- Build a shared library......... YES
-- Use symbol visibility support.. YES
-- PNG image support.............. YES
-- Native language support........ YES
-- Nikon lens database............ YES
-- XMP metadata support........... YES
------------------------------------------------------------------
Comment 6 Philip Johnsson 2011-10-18 16:18:44 UTC
Just noticed a strange fact. The Lens ID is shown correct in Showfoto under Photograph Properties but not in main Digikam. They are both from the same build and linked against the same libraries and versions.
Comment 7 Andreas Huggel 2011-10-19 00:43:09 UTC
Philip,

Where did you install the newly compiled libexiv2? By default it goes into /usr/local/lib. But digiKam uses /usr/lib/libexiv2.so.11 according to your ldd output above (what about libkexiv2?). The exiv2 configure script takes a flag to change the default install location ("--prefix=/usr" in this case). That's all that is required. The fix for the new lens is binary compatible with libexiv2 0.22, so it is not necessary to recompile anything else.

Andreas
Comment 8 Philip Johnsson 2011-10-19 05:35:43 UTC
I build packages so they replace the old package in the same place, /usr is --prefix for both exiv2, libkexiv2 and digikam. I don't use any local build directories for this like /usr/local to build stuff.

As commented above, the extra strange thing is that it works as it should in showfoto but not in digikam itself.
Comment 9 Philip Johnsson 2011-10-19 05:39:25 UTC
Just to show that the digikam and showfoto binaries are linked against the same exiv2 libraries.

$ ldd /usr/bin/showfoto | grep exiv
        libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0x00007fe82d1d8000)
        libexiv2.so.11 => /usr/lib/libexiv2.so.11 (0x00007fe827157000)

$ ldd /usr/bin/digikam | grep exiv
        libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0x00007fd75f0cd000)
        libexiv2.so.11 => /usr/lib/libexiv2.so.11 (0x00007fd756fe7000)
Comment 10 caulier.gilles 2011-10-19 06:57:22 UTC
Philip,

The differences between showfoto and digiKam image properties are due to database information filled using Exiv2 with old version of library.

The way of showfoto want mean that you use the right libexiv2 version to link digiKam and libkexiv2.

Now, as you have updated Exiv2, force the database to re-parse metadata to update contents. Select items from icon-view and got to Captions & tags. On the bottom use the right option to re-read metadata from image.

Gilles Caulier
Comment 11 Philip Johnsson 2011-10-19 17:48:01 UTC
Gilles, that's it! It displays as it should now when I re-read the meta-data. Thought that would happen automatically when I updated exiv2.