Summary: | Exiv rotation for Pentax Pef not working | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Michael <m.mickey> |
Component: | Metadata-Orientation | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahuggel, michal |
Priority: | NOR | ||
Version: | 1.0.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 1.0.0 | |
Sentry Crash Report: |
Description
Michael
2009-05-05 13:24:22 UTC
>LibExiv2: 0.18
Can you try to use last stable Exiv2 0.18.1 with digiKam. libkexiv2, digiKam, and kipi-plugins need to be recompiled.
Question, when you said rotated image based on exif informations, you want mean thumb or real image. Typically, both use the same informations, but i would to be sure.
Gilles Caulier
So I tried it with 0.18.1, but nothing changed... there is still just a errormessage and thats all... I want to set the exiv orientation flag differently, this will rotate the thumbnail in digikam, but also when opening the rawfile the image itself will be shown in it's correct orientation... greets mike Which error message exactly. To be able to set orientation flag in PEF file, you need to set on the right option in Metadata config panel to write metadata in RAW file (disable by default) Gilles Caulier I have enabled (still the same message): Metadaten in Rohdaten speichern (experimentell) This is the message: Fehler bei der Bereinigung der EXIF-Ausrichtung für die Datei K20D0099.PEF. greets mike Sorry, i don't speak German (:=))) Gilles I didn't want to translate with probably the wrong words, but after setting digikam to english, here are the two lines: Failed to revise Exif orientation for file K20D0099.PEF. Write Metadata to RAW files (experimental) greets mike Arfff... Andreas, digiKam try to set Exif orientation flag in PEF file. Do you have already tried that ? Gilles Caulier According to the official documentation, writing to PEF should work ;) http://dev.exiv2.org/wiki/exiv2/Supported_image_formats We need more details of what is going wrong. Andreas I confirm this behaviour at Ubuntu Jaunty, Digikam 0.10 width DNG files from Pentax *istD. The metadata writing to RAW was turned on and editing EXIF, IPTC and XMP through Image > Metadata dialogs works properly. Though Image > Exif Orientation tag setting (loose translation back to English) produce error "Couldn't read Exif orientation tag from image xxxx.dng". Actually Exif Orientation tag is there and it look like that: Orientation: top, left. Sample image: http://photos.thoma.cz/orientation Any news? greets mike well if you need this feature urgently just employ exiftool commandline tool. I made script for 90 CCW rotation just this simple: <code> #!/bin/sh exiftool -Orientation=8 -n -overwrite_original "$*" </code> I run it through the context menu and it works just fine. Should help until it's in Digikam natively. What happens if you do something similar to that exiftool command with the exiv2 command line tool? I.e., something like $ exiv2 -M 'set Exif.Image.Orientation 8' IMAGE.PEF Here this seems work fine on one of my PEF samples; the image opens rotated in ufraw after the change. Andreas This very same thing! I only use ExifTool because I'm more familiar with that (it's little bit older and more advanced project in regard of format and metadata support). When I change the orientation tag I see the change in digikam instantly. Yes, it should be the same. I'd like to hear the result that Michael gets, when running the command with one of his PEFs, which don't work with digiKam. It's a simple check if this is a bug for exiv2. It works on the commandline with exiv2. Also digikam is able to change other exiv metadata like Original Date in my PEF files, only rotation doesn't work... greets mike Gilles, This one needs more investigation by the digiKam team. Doesn't sound like an Exiv2 issue. Andreas Andreas, From libkexiv2, this error "Failed to revise Exif orientation for file K20D0099.PEF." is generated by this method : http://lxr.kde.org/source/KDE/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2image.cpp#306 Sound like Exiv2 generate an exception. I suspect a problem with XMP with PEF data (for ex.) Gilles Caulier I don't think this issue is limited to PEF. I have this problem with my DNGs (from Pentax) and just now I repeated the same wit NEF from Nikon D300. Gilles, I don't see where digiKam writes the error. Do you mean this, at the end of the function you pointed to? 357 catch( Exiv2::Error &e ) 358 { 359 d->printExiv2ExceptionError("Cannot set Exif Orientation tag using Exiv2 ", e); 360 } But that's a different message and it prints the Exiv2 exception, which I'd need to get an idea of what happened. But there is no Exiv2 exception anywhere in the original bug report. It says the error is just this: "Failed to revise Exif orientation for file K20D0099.PEF. Write Metadata to RAW files (experimental)" Andreas Andreas, Right, i thinking this message become from console. In fact it's a message box. Code is there : http://lxr.kde.org/source/extragear/graphics/digikam/digikam/albumiconview.cpp#1778 In this case the failure to record orientation flags from PEF image come from libkexiv2::applyChanges() to record all in image. Note Digikam::DMetadata class is a derived version of libkexiv2 with some methods dedicated to play with internal digiKam metadata which are not shared with the rest of KDE. Look applyChanges() code here : http://lxr.kde.org/source/KDE/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2.cpp#439 It call save() method : http://lxr.kde.org/source/KDE/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2.cpp#289 I will hack this part Gilles Ok, i can see the problem in the console : digikam(8427)/KEXIV2 KExiv2Iface::KExiv2::setImageOrientation: Exif.Image.Orientation tag set to: 6 digikam(8427)/KEXIV2 KExiv2Iface::KExiv2::save: ' imgp6384.pef ' is TIFF based RAW file supported but writing mode is disabled. Metadata not saved. Of course, "Write metadata to RAW files" option from digiKam settings panel is enabled... Michael, can you confirm this, running digiKam from a console ? Gilles Caulier SVN commit 972107 by cgilles: when DMetadata is used to play with image information, unforget to register flags from albumsettings to follow digiKam configuration. BUG: 191678 M +1 -0 albumiconview.cpp M +3 -1 metadatamanager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=972107 |