Version: 0.92 (using KDE KDE 3.5.8) Installed from: Ubuntu Packages OS: Linux In Configuration > Metadata, I enabled "save image comments in metadata" (the translation may not be exact), to save comments in image metadata. Before putting a comment on image.jpg, I computed its md5sum (md5sum image.jpg). If I add a comment, the md5sum changes, so it seems ok. If I change the comment, the md5sum changes again. But if I remove (clear) the comment, the md5sum stay the same (so no modification in the file). So it is not possible to clear a comment in metadata... (even if the database of digikam seems to remember the clear, the file doesn't)
And if you "write metadata in digikam database" after a clear, you can see the clear has not been done.
There is a special menu entry for that. Try Image->Metadata->Remove Captions...
OK this is a way to evade the bug, but the bug is still here (when you "apply" with an empty comment, it seems to work in the gui, because it's correctly written to digikam database, but it doesn't write the metadata).
Sound like a cache problem from MetadataHub. Marcel, What do you think about ? Gilles
For the old JFIF comment, KExiv2::save(QString): if (!d->imageComments.empty()) { image->setComment(d->imageComments); } For the Exif comment, setExifComment(): if (comment.isEmpty()) return false; Perhaps we can use isNull() instead of isEmpty()?
Yes, Marcel, you have right. An empty string is a valid comment like Romain said... Arnd, it's a simple patch to do (:=))) Gilles
In one of the cases there is std::string, which does not have isNull/isEmpty distinction. Perhaps we use a QByteArray there instead?
Is it fixed?
Testing with current SVN (revisions: exiv2 1463, graphics 813168, libs 813167) - able to reproduce this bug. Tested checking metadata manually (using exiv2 at command line and checking Metadata using Digikam) and via md5sums. Removing a comment using the Digikam GUI does not remove it from EXIF or IPTC metadata. (Although it does change image md5sums)
To all, This entry still valid with digiKam 0.10.0 and Exiv2 0.18.1 ? Gilles Caulier
Hi Gilles, Yes - this bug is still present with v0.10.0 (libexiv2 0.18.1). Testing: - check md5sum of image (eg e54d48f8c3cd15bb7ae458706c07dbc2) - add text via "Caption" box on right-hand panel - confirm md5sum changed (now 46d6ffe11d469423ea35008822279e2b) - remove text from "Caption" box again. - md5sum is different to both above (now b909302feb53bbff783b697303962afa) - text is not visible in "Caption" box. But is still stored in image, viewable via "Image->Metadata->Edit Exif (or IPTC,XMP) Using "Image->Metadata->Remove Captions" seems to remove the stored text. (md5sum now 7a7a3a6e2ec87facd4e9586b8f470f70)
SVN commit 985160 by cgilles: polish comments metadata registration. If default comment string isNull (not isEmpty), tags which host only one comments are removed as well. CCBUGS: 152219 M +25 -24 kexiv2exif.cpp M +14 -11 kexiv2xmp.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=985160
SVN commit 985161 by cgilles: fix null comments registration to metadata BUGS: 152219 M +25 -13 dmetadata.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=985161