Created attachment 59510 [details] screenshot of digikam settings->meta data Version: 2.0.0 (using KDE 4.6.2) OS: Linux I'm using digikam 2.0 beta4 from philip5 PPA for Kubuntu 10.10. Digikam is set to use sidecar XMP files (read and "write to XMP sidecar only"), "Embedded preview loads full-sized images" is option unset. When I add raw image (NEF) in portrait orientation to an album it's displayed correctly as long as metadata isn't edited (XMP sidecar doesn't exist). When I do any action which creates XMP sidecar I get: - album view and image editor display file in correct orientation (portrait) - embedded viewer displays portrait orientation in thumb bar, but (incorrect) landscape orientation in the main window - light table displays file incorrectly If I subsequently quit digikam, remove sidecar and start digikam it displays image correctly everywhere again. Reproducible: Didn't try
Can you give me the image + the sidecar file to test in local ? Thanks in advance Gilles Caulier
Ok, here is a link to tarball which contains raw (NEF) and XMP sidecar: https://rapidshare.com/files/460492304/orientation_test.tar.gz Another news, after removing a database and restoring all the metadata from images & XMP sidecars, album view displays now incorrect orientation too, so image editor is the only one displaying image correctly.
I'm having the same problem. This code from extra/libkexiv2/libkexiv2/kexiv2.cpp is related: // If XMP sidecar exist and if we want manage it, parse it instead the image. if (d->useXMPSidecar4Reading) { QString xmpSidecarPath = sidecarFilePathForFile(filePath); QFileInfo xmpSidecarFileInfo(xmpSidecarPath); if (xmpSidecarFileInfo.exists() && xmpSidecarFileInfo.isReadable()) { // TODO: We should rather read both image and sidecar metadata // and merge the two, with sidecar taking precedence image = Exiv2::ImageFactory::open((const char*) (QFile::encodeName(xmpSidecarPath))); } } We're not storing the orientation in XMP at all, so unless we merge the data, we will have no orientation data.
Created attachment 61736 [details] If sidecar exists, still read size, mimetype, comments, exif, and iptc from original image This patch causes DigiKam to read most of the metadata from the original file even if there is a sidecar. It ignores the XMP data from the image itself when there is a sidecar. This fixes the rotation problem. This patch is meant to be applied on top of kde-bug-275311-rev2.diff from the other bug. This patch rearranges lines that were edited from that patch, so if I generated a diff against 2.0.0-rc, then you could not cleanly apply both.
Leif, Thanks again to review XMP handling code. I will review it Monday morning. I don't have my computer to test here, i'm not at home/office. Gilles Caulier
Git commit 895fa43e61034daae00e70525d72482beeff1ca2 by Gilles Caulier. Committed on 11/07/2011 at 10:58. Pushed by cgilles into branch 'master'. apply patch #61734 and #61736 from Leif Huhn to manage XMP sidecar and symbolic links properlly - If sidecar exists, still read size, mimetype, comments, exif, and iptc from original image. - Only follow the symlink when writing to the image file. CCBUGS: 275311 CCBUGS: 272175 M +83 -49 libkexiv2/kexiv2.cpp http://commits.kde.org/libkexiv2/895fa43e61034daae00e70525d72482beeff1ca2
Is there any support in exiv2 to "merge" metadata from sidecar and from original image?
(In reply to comment #7) > Is there any support in exiv2 to "merge" metadata from sidecar and from > original image? Exiv2 has conversions to copy or move metadata of one kind to another: http://www.exiv2.org/doc/convert_8hpp.html There is no support to merge two metadata containers of the same kind. Andreas