Bug 308078 - Caption in non-default language not saved to JPEG when x-default is empty
Summary: Caption in non-default language not saved to JPEG when x-default is empty
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Xmp (show other bugs)
Version: 2.9.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-08 14:55 UTC by Milan Knížek
Modified: 2017-08-13 07:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Knížek 2012-10-08 14:55:42 UTC
When adding caption (description) to images in other languages than x-default, then these captions are not saved to image (JPEG). However, once a caption for the x-default language is added, _all_ the existing language variants of the caption are saved to the file.

Reproducible: Always

Steps to Reproduce:
1. Use a new message w/o any metadata. Make user saving of metadata to images is allowed.
2. Choose af-ZA language for Caption. Type in some caption. Click apply.
3. Switch to CLI and run `exiv2 -pa image.jpg  | grep -E "Xmp.dc.description|Xmp.digiKam.CaptionsAuthorNames|Xmp.digiKam.CaptionsDateTimeStamps"`
4. Note that only (!) data in the latter two keys will exist.
5. In digiKam, add some caption to "x-default" language and Apply.
6. Switch to CLI and run the exiv2 command again.
7. This time, Xmp.dc.description has some values for both af-ZA and x-default languages.
Actual Results:  
Without some text in x-default language of Caption (Description), no description is saved to image.

Expected Results:  
Description should be saved to image no matter which languages are used.
Comment 1 Marcel Wiesweg 2012-10-26 10:40:16 UTC
Setting the Exif comment (which is using only the x-default comment, and is removed if only a specific language is added) failed although it should not
Comment 2 Marcel Wiesweg 2012-10-26 10:40:37 UTC
Git commit 540a04b40389a82802f824e65e1038dd7b2b7e1e by Marcel Wiesweg.
Committed on 26/10/2012 at 12:38.
Pushed by mwiesweg into branch 'master'.

Do not forget to return true, and thus fail, when removing the exif comment.

M  +2    -1    libkexiv2/kexiv2exif.cpp

http://commits.kde.org/libkexiv2/540a04b40389a82802f824e65e1038dd7b2b7e1e