Re: extragear/graphics/digikam/libs/dmetadata

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/libs/dmetadata

Johannes Wienke-3
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.
> @@ -992,7 +993,7 @@
>      {
>          lens = getExifTagString((*it).toAscii());
>          if ( !lens.isEmpty() &&
> -             !lens.startsWith('(') && !lens.endsWith(')') )   // To prevent undecoded tag values from Exiv2 as "(65535)".
> +             !(lens.startsWith('(') && lens.endsWith(')')) )   // To prevent undecoded tag values from Exiv2 as "(65535)".
>              return lens;
>      }
>  


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/libs/dmetadata

Gilles Caulier-4
yes and no. because extracting is not enough. sometimes, we need to
adapt rules to select right tags from metadata, accordingly of camera
device make and model (as ex. the order)

This is not simple problem to deal.

Gilles

2010/9/30 Johannes Wienke <[hidden email]>:

> 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.
>> @@ -992,7 +993,7 @@
>>      {
>>          lens = getExifTagString((*it).toAscii());
>>          if ( !lens.isEmpty() &&
>> -             !lens.startsWith('(') && !lens.endsWith(')') )   // To prevent undecoded tag values from Exiv2 as "(65535)".
>> +             !(lens.startsWith('(') && lens.endsWith(')')) )   // To prevent undecoded tag values from Exiv2 as "(65535)".
>>              return lens;
>>      }
>>
>
>
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/libs/dmetadata

Johannes Wienke-3
Am 30.09.2010 22:54 schrieb Gilles Caulier:
> yes and no. because extracting is not enough. sometimes, we need to
> adapt rules to select right tags from metadata, accordingly of camera
> device make and model (as ex. the order)
>
> This is not simple problem to deal.

I think the udev rules solve a very similar problem. We could try to
adapt them.

Regards,
Johannes


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/libs/dmetadata

Bugzilla from ahuggel@gmx.net
In reply to this post by Johannes Wienke-3
On Fri, Oct 1, 2010 at 04:45, Johannes Wienke <[hidden email]> 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:

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.

-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
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/libs/dmetadata

Gilles Caulier-4
2010/10/1 Andreas Huggel <[hidden email]>:

> On Fri, Oct 1, 2010 at 04:45, Johannes Wienke <[hidden email]> 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
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel