Summary: | WISH: Batch RAW Conversion should copy tags / captions / ratings to the converted file | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Sander <bugs> |
Component: | BatchQueueManager-RAWProcessing | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 1.5.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 1.5.0 |
Description
Sander
2010-05-25 21:29:47 UTC
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 |