[KPhotoAlbum] Patch to search EXIF data by lens

Robert Krawitz rlk at alum.mit.edu
Mon Aug 3 13:35:48 BST 2015


On Sun, 02 Aug 2015 23:17:09 -0400, Just Lettuce wrote:
>
>>There's only one problem with the algorithm for determining the lens
>>model (and it has nothing to do with your patch vs. mine): until
>>relatively recently, the LensModel wasn't in Exif.Photo.  In my case,
>>it wasn't until firmware 2.0 came out in 2012 that LensModel was
>>stored in Exif.Photo.LensModel.  Prior to that, it was in
>>Exif.Canon.LensModel.
>>
>>I wonder if we need to do some kind of pattern match to look for
>>LensModel if we don't find it in Exif.Photo.
>
> Great to hear that lensmodel will be searchable!
> I am noting that in some of my cameras it's in Exif.Photo.LensModel - and as above, sometimes in other places.
> In my case, it's sometimes in Exif.Pentax.Lens.Type.  Given the lack of consistency, hmmm...
> Can maybe copy in with exiftool or something as needed for some?
> That said, I'll try the git soon.  I had written to the list sometime earlier - and was thinking of extracting LensModel / LensType with exiftool and merging it as a keyword/tag with the xml file, but of course this is much much better!!  Can't wait to give it a try!

exiftool would have the same problem (and probably be a lot slower).

There are a collection of regular expressions in LensExifElement in
Exif/DatabaseElement.{cpp,h} that control the behavior.
Unfortunately, since the representation is different in different
cases, it's special cased, but at least it's all encapsulated within
LensExifElement.  This is going to need testing and improvement on a
wide variety of cameras.
-- 
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