Version: 2.1.1 (using KDE 4.6.2) OS: Linux I have a RAW (PEF) file with accompanied XMP, created by digikam 2.0 before - I stopped writing metadata to XMP and reverted to writing metadata to image directly. I still want to Read Metadata from XMP so I also have ticked this. Now when I change metadata like rating in any Image which has accompanied XMP, file get corrupted after that. When the option Read Metadata from XMP is not selected, corruption will not happen. Reproducible: Always Steps to Reproduce: 1. In Preferences Metadata tab choose Write Metadata to XMP sicar only. 2. Change Rating or other metadata of the image. 3. In Prefernces Metadata tab choose Write Metadata to image files only. Also tick Read Metadata from XMP option. 4. Change some image metadata then. Actual Results: Image is corrupted and can't be viewed in digikam or other app. Expected Results: Image metadata will be changed and data which were in XMP will be appended or used without corrupting the image. Sample files (original image with xmp and corrupted image) are for download here: http://download.thoma.cz/digikam-xmp-corruption.zip
What is your exiv2 and libkexiv2 version? Go to Help/Components for this info.
It seems the corrupted image contains only the metadata from the sidecar, the original image's metadata seems to be lost. I believe there are quite a few related bugs. Nonetheless, I dont know why the image cannot be opened anymore. Any ideas where the problem in the file structure can be found?
My LibExiv2 is 0.21.1 and LibKExiv 2.0.0
With the sidecar fixes applied for next digikam 2.6, current exiv2 and libkexiv2, I could successfully edit the image's metadata without creating corruption.