[Digikam-devel] Re: extragear/graphics/digikam/libs/dmetadata

Gilles Caulier caulier.gilles at gmail.com
Sun Oct 3 20:53:53 BST 2010


2010/10/1 Andreas Huggel <ahuggel at gmx.net>:
> On Fri, Oct 1, 2010 at 04:45, Johannes Wienke <languitar at semipol.de> wrote:
>>
>> Hey,
>>
>> just a remark from a developer with no time left for digiKam. ;) We
>> should really think about extracting these exif tag rules in an external
>> file that is parsed at runtime. This is configuration knowledge that
>> should be easily changeable without recompiling digikam.
>>
>> Regards,
>> Johannes
>>
>> Am 30.09.2010 16:03 schrieb Gilles Caulier:
>> > SVN commit 1181246 by cgilles:
>> >
>> > improve lens detection. add Sony id tag.
>> >
>> >
>> >  M  +2 -1      dmetadata.cpp
>> >
>> >
>> > --- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp
>> > #1181245:1181246
>> > @@ -971,6 +971,7 @@
>> >      lensExifTags.append("Exif.NikonLd2.LensIDNumber"); // Nikon Cameras
>> > Makernote.
>> >      lensExifTags.append("Exif.NikonLd3.LensIDNumber"); // Nikon Cameras
>> > Makernote.
>> >      lensExifTags.append("Exif.Minolta.LensID");        // Minolta
>> > Cameras Makernote.
>> > +    lensExifTags.append("Exif.Sony1.LensID");          // Sony Cameras
>> > Makernote.
>> >      lensExifTags.append("Exif.Sony2.LensID");          // Sony Cameras
>> > Makernote.
>> >      lensExifTags.append("Exif.Pentax.LensType");       // Pentax
>> > Cameras Makernote.
>> >      lensExifTags.append("Exif.Panasonic.0x0051");      // Panasonic
>> > Cameras Makernote.
>
>
> Exiv2 has easy-access functions to deal with such selections. There is one
> to select the lens without the application having to keep track of all
> supported makernotes:
>

Thanks to point me in this area.

> http://dev.exiv2.org/projects/exiv2/repository/entry/trunk/src/easyaccess.cpp#L252
>
> If there is a need to fix/improve/add more of these functions, let me know.
>

My version include more tags to check. Take a look :

http://lxr.kde.org/source/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp#965

It include also XMP tags

Currently, my version from digiKam core is enough (and fast to test)
until all main tags including lens info will be found everywhere.
Later, of course, it will be fine to factoring this code with Exiv2
easy access functions

Gilles

> -ahu.
>
> PS: One has to be careful to make sure that code like the above doesn't
> throw Exiv2 exceptions if an Exiv2 version is used that doesn't know all of
> the keys listed. Which is another indicator that this is something the
> library needs to deal with, not the application.
>
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>



More information about the Digikam-devel mailing list