Storage of digiKam Tags path (again)...

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

Storage of digiKam Tags path (again)...

Gilles Caulier-4
Hi all,

I would to talk again about digiKam tags path to store in Metadata...

You will certainly remember than you have already talk about this subject here in the past, especially with Daniel...

I will resume the problem : actually a digiKam path (for ex. "Travel/City/Paris/Monuments/Notre-Dame") is stored in an IPTC keywords as well.

This  way can be a problem because :

- IPTC string are size limited (64 ASCII char for Keywords)
- IPTC char encoding is the hell. USing UTF-8 is not possible easily.
-IPTC keywords are used only to store a unique word/phrase, not a path like digiKam use. With my example,
the digiKAm tags must be decomposed as multiple keywords like this :

* "Travel"
* "City"
* "Paris"
* "Monuments"
* "Notre-Dame"

Each Keywords will be stored in an IPTC Keywords tags (IPTC keywords can be multiple in metadata).

But digikam need to store somewhere in metadata the complete path to dupplicate/backup the database content in pictures. Also the
place must support at leasr UTF-8 encoding and do not have a limited size.

Like you know, my old laptop have crashed recently, and i have buy a new laptop where M$ Vista have been installed...

.. and i have played a little with M$ photo manager program installed by default with Vista. When i said played, i want mean hacked of course,
and especially to find how this program manage picture metadata.

This program is very similar than digiKam. We can see a Tags mechanism, Rating, Comments, Date, etc... but it very limited... I can only manage JPEG file. Others pictures formats are not supported. There is no editor, and the import interface is very very simplified...

After a lots of of investiguations, I have seen than all metadata are stored like XMP and never in IPTC/IIM. But it's not all, all informations are stored in private Exif/Image Tags.

XMP is the ultimate way to store metatada, but i digiKam this way cannot be used now. Later, when Exiv2 will support XMP, it will be more easy to do (:=)))... Andreas, please note than XMP is very high priority for me (:=)))...

Well howx to solve the digiKam Tags storing in metadata actually. Well it's simple. we can do exactly the same thing than M$ with private Exif.Image tags.

I will resume what M$ store and where :

Exif Tag 0x4746 ==> Rating : a short value : 1 star == 1, 2 star == 2, etc...
Exif Tag 0x4749 ==> Rating in percent : 5 star == 100%, 0 star == 0%, etc...
Exif Tag 0x9c9b ==> Picture Title : string encoded in UCS2.
Exif Tag 0x9c9c ==> Picture Comments : string encoded in UCS2.
Exif Tag 0x9c9d ==> Picture Author : string encoded in UCS2.
Exif Tag 0x9c9e ==> Picture Keywords : string encoded in UCS2.
Exif Tag 0x9c9f ==> Picture Subject : string encoded in UCS2.

I propose to drive this Exif tags to be compatible with M$ photo manager and ... to add a new private Exif.Image tag to store all digiKam Tags path of an image using UTF8 (or UCS2 i cannot see the real advantage). Why not to use the tag 0x9cff witch is not yet used. Look the ExifTool tag database :

http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html

What do you thing about ?

Andreas, there is no risk to do it ?

Thanks in advance for your comments.

Gilles Caulier




_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Storage of digiKam Tags path (again)...

Bugzilla from ahuggel@gmx.net
On Sunday 11 March 2007 01:56, Gilles Caulier wrote:
> Hi all,
>
> I would to talk again about digiKam tags path to store in Metadata...
>
[snip]

>
> I propose to drive this Exif tags to be compatible with M$ photo
> manager and ... to add a new private Exif.Image tag to store all
> digiKam Tags path of an image using UTF8 (or UCS2 i cannot see the
> real advantage). Why not to use the tag 0x9cff witch is not yet used.
> Look the ExifTool tag database :
>
> http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
>
> What do you thing about ?
>
> Andreas, there is no risk to do it ?

The only risk I can see is that sooner or later someone else may use the
same tags for something else. I suggest you use tags in the Exif, GPS
or IOP directory, not in IFD0 or IFD1 to limit conflicts to the Exif
standard only.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Storage of digiKam Tags path (again)...

Gilles Caulier-4
Ok. when you said IOP, you want mean Exif.Interoperability. Right ?

Gilles

2007/3/11, Andreas Huggel <[hidden email]>:
On Sunday 11 March 2007 01:56, Gilles Caulier wrote:
> Hi all,
>
> I would to talk again about digiKam tags path to store in Metadata...
>
[snip]

>
> I propose to drive this Exif tags to be compatible with M$ photo
> manager and ... to add a new private Exif.Image tag to store all
> digiKam Tags path of an image using UTF8 (or UCS2 i cannot see the
> real advantage). Why not to use the tag 0x9cff witch is not yet used.
> Look the ExifTool tag database :
>
> http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
>
> What do you thing about ?
>
> Andreas, there is no risk to do it ?

The only risk I can see is that sooner or later someone else may use the
same tags for something else. I suggest you use tags in the Exif, GPS
or IOP directory, not in IFD0 or IFD1 to limit conflicts to the Exif
standard only.

-ahu.
_______________________________________________
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: Storage of digiKam Tags path (again)...

Gilles Caulier-4
Andreas,

if you talking about Interroperability directory, witch tag number you recommend to use ?

In Exiftool database, i can see 5 tags :

0x0001, 0x0002, 0x1000, 0x1001, and 0x1002.

Gilles

2007/3/11, Gilles Caulier <[hidden email]>:
Ok. when you said IOP, you want mean Exif.Interoperability. Right ?

Gilles

2007/3/11, Andreas Huggel <[hidden email]>:
On Sunday 11 March 2007 01:56, Gilles Caulier wrote:
> Hi all,
>
> I would to talk again about digiKam tags path to store in Metadata...
>
[snip]

>
> I propose to drive this Exif tags to be compatible with M$ photo
> manager and ... to add a new private Exif.Image tag to store all
> digiKam Tags path of an image using UTF8 (or UCS2 i cannot see the
> real advantage). Why not to use the tag 0x9cff witch is not yet used.
> Look the ExifTool tag database :
>
> <a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/TagNames/EXIF.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
>
> What do you thing about ?
>
> Andreas, there is no risk to do it ?

The only risk I can see is that sooner or later someone else may use the
same tags for something else. I suggest you use tags in the Exif, GPS
or IOP directory, not in IFD0 or IFD1 to limit conflicts to the Exif
standard only.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
<a href="https://mail.kde.org/mailman/listinfo/digikam-devel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 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: Storage of digiKam Tags path (again)...

Bugzilla from ahuggel@gmx.net
In reply to this post by Gilles Caulier-4
On Monday 12 March 2007 00:18, Gilles Caulier wrote:
> Ok. when you said IOP, you want mean Exif.Interoperability. Right ?
>
yes, that's what I meant.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Storage of digiKam Tags path (again)...

Bugzilla from ahuggel@gmx.net
In reply to this post by Gilles Caulier-4
On Monday 12 March 2007 00:29, Gilles Caulier wrote:
> Andreas,
>
> if you talking about Interroperability directory, witch tag number
> you recommend to use ?
>
> In Exiftool database, i can see 5 tags :
>
> 0x0001, 0x0002, 0x1000, 0x1001, and 0x1002.
>

The Exiv2 taglist has the same 5 IOP tags. The Exif standard actually
only has tag 0x0001. Thus, the good thing about this directory is that
it's not widely used, so there is less potential for a conflict; choose
a random number and chances are good that nobody else will use the same
tag. On the other hand, maybe because the IOP directory is not widely
used, there is a possibility that it is not well supported by other
software. So you may want to test if applications that attempt to write
Exif tags manage to write the IOP directory as well.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Storage of digiKam Tags path (again)...

Gilles Caulier-4
Right. Thanks for this tips. I will do some investigations.

Gilles

2007/3/12, Andreas Huggel <[hidden email]>:
On Monday 12 March 2007 00:29, Gilles Caulier wrote:
> Andreas,
>
> if you talking about Interroperability directory, witch tag number
> you recommend to use ?
>
> In Exiftool database, i can see 5 tags :
>
> 0x0001, 0x0002, 0x1000, 0x1001, and 0x1002.
>

The Exiv2 taglist has the same 5 IOP tags. The Exif standard actually
only has tag 0x0001. Thus, the good thing about this directory is that
it's not widely used, so there is less potential for a conflict; choose
a random number and chances are good that nobody else will use the same
tag. On the other hand, maybe because the IOP directory is not widely
used, there is a possibility that it is not well supported by other
software. So you may want to test if applications that attempt to write
Exif tags manage to write the IOP directory as well.

-ahu.
_______________________________________________
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: Storage of digiKam Tags path (again)...

Gilles Caulier-4
After investaguations, i can said than Exif is not the good place to do it.

IPTC/IIM sound fine to store this data, especially because storing Exif to TIFF/DNG file is the hell with libtiff (Andreas, i'm waiting to have Exiv2 TIFF writting (:=))))... but libtiff can store IPTC very well.

Other stuff is to convert pictures using ImageMagick. Like ImageMagick use libtiff internally, we can only use IPTC to not lost these data...

I will store a zlib compressed byte array of XML data (not real XMP, just an simple XML schema to store digiKam properties).

I have take a look witch IPTC/IIM tags are free for use, reading ExifTool database and others web page.

The "Iptc.Application2.0x00ff" sound good. Like IPTC will not be used anymore with new photo management application, the chance to have this tag used by another software is very limited.

This is an example of the content of the uncompressed tag :

<!DOCTYPE XMLImageProperties>
<imageproperties version="1" client="digikam" encoding="UTF-8" />
<properties comments="Ceci est un test en utilisant des caractères accentués..." rating="4" date="2006-11-23T13:36:26" >
 <tagslist>
  <tag path="Communications" />
  <tag path="aaa/bbb/ccc" />
  <tag path="bbb/ccc/ddd" />
  <tag path="bbb/ccc/ddd/Paris" />
  <tag path="bbb/ccc/ddd/Paris/bjwdfkjhjbdqjfihbdqfdwbf" />
  <tag path="City" />
  <tag path="City/London" />
  <tag path="City/New York" />
  <tag path="City/Paris" />
 </tagslist>
</properties>

For this example the compressed data use only 374 bytes in the tag. It's small (better than XMP can use for the same content)

What do you think about ?

Gilles


2007/3/12, Gilles Caulier <[hidden email]>:
Right. Thanks for this tips. I will do some investigations.

Gilles

2007/3/12, Andreas Huggel <[hidden email]>:
On Monday 12 March 2007 00:29, Gilles Caulier wrote:
> Andreas,
>
> if you talking about Interroperability directory, witch tag number
> you recommend to use ?
>
> In Exiftool database, i can see 5 tags :
>
> 0x0001, 0x0002, 0x1000, 0x1001, and 0x1002.
>

The Exiv2 taglist has the same 5 IOP tags. The Exif standard actually
only has tag 0x0001. Thus, the good thing about this directory is that
it's not widely used, so there is less potential for a conflict; choose
a random number and chances are good that nobody else will use the same
tag. On the other hand, maybe because the IOP directory is not widely
used, there is a possibility that it is not well supported by other
software. So you may want to test if applications that attempt to write
Exif tags manage to write the IOP directory as well.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
<a href="https://mail.kde.org/mailman/listinfo/digikam-devel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 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: Storage of digiKam Tags path (again)...

Gilles Caulier-4
I just finalized the code to set and get the IPTC XML data set into digiKam core.

The XML data format is given below :

<?xml version="1.0" encoding="UTF-8"?>
<digikamproperties>
 <comments value="A cool photo from Adrien..." />
 <date value="2006-11-23T13:36:26" />
 <rating value="4" />
 <tagslist>
  <tag path="gilles/adrien/testphoto" />
  <tag path="monuments/Trocadero/Tour Eiffel" />
  <tag path="City/Paris" />
 </tagslist>
</digikamproperties>

Gilles

2007/3/14, Gilles Caulier < [hidden email]>:
After investaguations, i can said than Exif is not the good place to do it.

IPTC/IIM sound fine to store this data, especially because storing Exif to TIFF/DNG file is the hell with libtiff (Andreas, i'm waiting to have Exiv2 TIFF writting (:=))))... but libtiff can store IPTC very well.

Other stuff is to convert pictures using ImageMagick. Like ImageMagick use libtiff internally, we can only use IPTC to not lost these data...

I will store a zlib compressed byte array of XML data (not real XMP, just an simple XML schema to store digiKam properties).

I have take a look witch IPTC/IIM tags are free for use, reading ExifTool database and others web page.

The "Iptc.Application2.0x00ff" sound good. Like IPTC will not be used anymore with new photo management application, the chance to have this tag used by another software is very limited.

This is an example of the content of the uncompressed tag :

<!DOCTYPE XMLImageProperties>
<imageproperties version="1" client="digikam" encoding="UTF-8" />
<properties comments="Ceci est un test en utilisant des caractères accentués..." rating="4" date="2006-11-23T13:36:26" >
 <tagslist>
  <tag path="Communications" />
  <tag path="aaa/bbb/ccc" />
  <tag path="bbb/ccc/ddd" />
  <tag path="bbb/ccc/ddd/Paris" />
  <tag path="bbb/ccc/ddd/Paris/bjwdfkjhjbdqjfihbdqfdwbf" />
  <tag path="City" />
  <tag path="City/London" />
  <tag path="City/New York" />
  <tag path="City/Paris" />
 </tagslist>
</properties>

For this example the compressed data use only 374 bytes in the tag. It's small (better than XMP can use for the same content)

What do you think about ?

Gilles


2007/3/12, Gilles Caulier <[hidden email]>:
Right. Thanks for this tips. I will do some investigations.

Gilles

2007/3/12, Andreas Huggel <[hidden email]>:
On Monday 12 March 2007 00:29, Gilles Caulier wrote:
> Andreas,
>
> if you talking about Interroperability directory, witch tag number
> you recommend to use ?
>
> In Exiftool database, i can see 5 tags :
>
> 0x0001, 0x0002, 0x1000, 0x1001, and 0x1002.
>

The Exiv2 taglist has the same 5 IOP tags. The Exif standard actually
only has tag 0x0001. Thus, the good thing about this directory is that
it's not widely used, so there is less potential for a conflict; choose
a random number and chances are good that nobody else will use the same
tag. On the other hand, maybe because the IOP directory is not widely
used, there is a possibility that it is not well supported by other
software. So you may want to test if applications that attempt to write
Exif tags manage to write the IOP directory as well.

-ahu.
_______________________________________________
Digikam-devel mailing list
[hidden email]
<a href="https://mail.kde.org/mailman/listinfo/digikam-devel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://mail.kde.org/mailman/listinfo/digikam-devel




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