[KPhotoAlbum] Patch to search EXIF data by lens

Robert Krawitz rlk at alum.mit.edu
Sat Aug 8 02:18:09 CEST 2015


On Fri, 07 Aug 2015 17:54:04 +0200, Johannes Zarl-Zierl wrote:
> Hi Robert,
>
> Thanks for the patch! Just some questions to help me understand the code:
>
> As far as I've gathered, we have the following exif tags to work from:
>
> Exif.Photo.LensModel [Ascii]
> Exif.Canon.LensModel [Ascii]
> Exif.OlympusEq.LensModel [Ascii]
>
> Exif.Minolta.LensID [Long]
> Exif.Sony1.LensID [Long]
>
> Exif.Nikon3.Lens [Rational]
>
> Exif.Nikon3.LensType [Byte]
> Exif.OlympusEq.LensType [Byte]
> Exif.Panasonic.LensType [Ascii]
> Exif.Pentax.LensType [Byte]
> Exif.Samsung2.LensType [Short]
>
>
> In LensExifElement::bindValues, you first try to match against lensID instead of the (presumably) more standard tag LensModel. Is there a reason for this, or is it ok for me to reorder the regex-matching code?

On the cameras I have (Canon, mostly), it looks like LensModel is best
where available (it's a string) with Lens and then LensType as a
fallback.  LensType has caused me problems with some third party
lenses.  I think LensID is useless.

> Regarding Nikon lens info, I think it might be better to (only) use the LensType instead of the Lens tag. Judging from [1], this seems to be decoded into a usable string representation. Any objections to this?

Well, you don't have to use only the last component of the tag; you
could list Exif.Nikon3.LensType ahead of .Lens in the list.

> [1] http://dev.exiv2.org/projects/exiv2/repository/entry/trunk/src/nikonmn.cpp#L1724

-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton


More information about the KPhotoAlbum mailing list