Version: 1.2.0 (using KDE 4.4.2) OS: Linux When converting from raw (MRW in my case) using either the Batch Queue Manager or the Batch RAW Converter, the tags, captions or ratings that were given to a RAW file are not transfered over to the converted file (PNG or JPG in my case). When using the build-in Image Editor, this metadata was transferred to the newly saved image. I have not tested this with other conversions. Wish: always copy metadata to the converted file. Reproducible: Always Steps to Reproduce: I did the following: 1. Load a number of RAW files (MRW in my case) 2. Add some tags, ratings and captions to a few files. 3. Convert a few of these files by using right mouse click and choosing edit. I guess this is the build in editor for RAW files. 4. Save the files 5. Lo and behold. The metadata is copied over to the newly saved file. Doing the same, using either the BQM or the Batch RAW converter does not yield the same result. Namely, the metadata is not copied over to the newly saved file. I noticed that the metadata was not written to the MRW file. That might be the cause for my problems. Please confirm. I am available to help with this issues. Please let me know whether you think this issue deserves to be solved!
The problem do not exist with current code from svn. Converting RAW to PNG/JPG using BQM preserve digiKam metadata. Gilles Caulier
BQM after converting ARW file to PNG and JPEG. metadata are there is target files. http://www.flickr.com/photos/digikam/5053647483/ Gilles Caulier
Marcel, But, i can reproduce the problem with Batch Raw Converter kipi Plugin ! I don't know why, cause all code is there. digiKam DB do not register info from source to target file ! The proof : http://www.flickr.com/photos/digikam/5053660839/ Look code there : http://lxr.kde.org/source/extragear/graphics/kipi-plugins/rawconverter/batchdialog.cpp#673 KIPI::ImageInfo::cloneData() from digiKam kipi interface is called. This method is implemented here : http://lxr.kde.org/source/extragear/graphics/digikam/utilities/kipiiface/kipiimageinfo.cpp#115 and this method get attributes and reassign it by this method : http://lxr.kde.org/source/extragear/graphics/digikam/utilities/kipiiface/kipiimageinfo.cpp#165 Gilles Caulier
Marcel, In BQM, i use this call : http://lxr.kde.org/source/extragear/graphics/digikam/utilities/queuemanager/queuemgrwindow.cpp#1125 ... which work very well to clone digiKam metadata between items. I need to call this method into KipiImageInfo::cloneData() as well instead current code ? Gilles Caulier
Marcel, i implemented this : Index: kipiiface/kipiimageinfo.cpp =================================================================== --- kipiiface/kipiimageinfo.cpp (revision 1182609) +++ kipiiface/kipiimageinfo.cpp (working copy) @@ -26,6 +26,10 @@ #include "kipiimageinfo.h" +// Qt includes + +#include <QDir> + // KDE includes #include <kconfig.h> @@ -43,6 +47,7 @@ #include "imageattributeswatch.h" #include "globals.h" #include "tagscache.h" +#include "scancontroller.h" namespace Digikam { @@ -117,9 +122,19 @@ void KipiImageInfo::cloneData( ImageInfoShared* other ) #endif { - setDescription( other->description() ); - setTime( other->time(KIPI::FromInfo), KIPI::FromInfo ); - addAttributes( other->attributes() ); + kDebug(); + + KUrl srcDirURL(QDir::cleanPath(path().directory())); + PAlbum* srcAlbum = AlbumManager::instance()->findPAlbum(srcDirURL); + + KUrl dstDirURL(QDir::cleanPath(other->path().directory())); + PAlbum* dstAlbum = AlbumManager::instance()->findPAlbum(dstDirURL); + + if (dstAlbum && srcAlbum) + { + ImageInfo oldInfo(path().toLocalFile()); + ScanController::instance()->scanFileDirectlyCopyAttributes(other->path().toLocalFile(), oldInfo.id()); + } } QMap<QString, QVariant> KipiImageInfo::attributes() ... and it doesn't work. Sound like KipiImageInfo::cloneData() is never called ! Gilles Caulier
Marcel, to set debug statement, i can said that KipiImageInfo::cloneData() is called, but i suspect and inversion of calling cloneData from Raw converter plugin (between original file and destination file) Gilles Caulier
SVN commit 1182729 by cgilles: Use right order to clone data from one item to another one. BUGS: 238823 BUGS: 152208 BUGS: 211558 BUGS: 199318 M +1 -1 batchprocessimages/batchprocessimagesdialog.cpp M +1 -1 dngconverter/plugin/batchdialog.cpp M +1 -1 rawconverter/batchdialog.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1182729