[Digikam-devel] [Bug 148182] Iptc.Application2.Keywords appends always the 0-byte

Andreas Huggel ahuggel at gmx.net
Sat Sep 1 11:16:44 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=148182         




------- Additional Comments From ahuggel gmx net  2007-09-01 12:16 -------
Gilles:

Use a string value instead of an asciiString. Exiv2::AsciiValue adds a 0-byte (which is required for Exif strings). Just change 'asciiString' to 'string' in the first of these 3 lines in KExiv2::setImageKeywords:

 Exiv2::Value::AutoPtr val = Exiv2::Value::create(Exiv2::asciiString);
 val->read(key.latin1());
 iptcData.add(iptcTag, val.get());

The same fix is needed in all other places where an IPTC string tag is set. I saw similar code in KExiv2::setImageSubjects and KExiv2::setImageSubCategories.

oongi:

Sorry, should have elaborated: digikam uses exiv2 (the library) to deal with Exif and IPTC metadata. When there is such a problem, it may be a bug for digikam or for exiv2. Since I'm an exiv2 developer, I need to know whether it is an exiv2 bug and a quick way to test for this is to reproduce the problem with the exiv2 utility.

-ahu.



More information about the Digikam-devel mailing list