[Digikam-devel] [kipiplugins] [Bug 342687] Panorama file time-stamps should be the same than the stitched pictures [patch]

Gilles Caulier via KDE Bugzilla bugzilla_noreply at kde.org
Fri Oct 23 11:29:53 BST 2015


https://bugs.kde.org/show_bug.cgi?id=342687

Gilles Caulier <caulier.gilles at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Version Fixed In|4.11.0                      |5.0.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #19 from Gilles Caulier <caulier.gilles at gmail.com> ---
To comment #6 :

I found the problem with the date. It's a stupid line hadcoded in source with
assign pano date to target file and later creation date. See my commit :

http://commits.kde.org/kipi-plugins/3438a50e290bd234c0373217f011e1dddd6d344a

.. into panorama/tasks/copyfilestask.cpp

  // Restore usual and common metadata from first shot.

-    KPMetadata metaSrc(urlList->constBegin().key().toLocalFile());
-    KPMetadata metaDst(panoUrl.toLocalFile());
-    metaDst.setIptc(metaSrc.getIptc());
-    metaDst.setXmp(metaSrc.getXmp());
-    metaDst.setXmpTagString("Xmp.tiff.Make", 
metaSrc.getExifTagString("Exif.Image.Make"));
-    metaDst.setXmpTagString("Xmp.tiff.Model",
metaSrc.getExifTagString("Exif.Image.Model"));
-    metaDst.setImageDateTime(metaSrc.getImageDateTime(), true);        <<==
Right one
+    if (m_meta)
+    {
+        m_meta->load(urlList->constBegin().key());
+        QByteArray iptc = m_meta->getIptc();
+        QByteArray xmp  = m_meta->getXmp();
+        QString make    =
m_meta->getExifTagString(QLatin1String("Exif.Image.Make"));
+        QString model   =
m_meta->getExifTagString(QLatin1String("Exif.Image.Model"));
+        QDateTime dt    = m_meta->getImageDateTime();        <<== Moved here
!!!!
+
+        m_meta->load(panoUrl);
+        m_meta->setIptc(iptc);
+        m_meta->setXmp(xmp);
+        m_meta->setXmpTagString(QLatin1String("Xmp.tiff.Make"),  make);
+        m_meta->setXmpTagString(QLatin1String("Xmp.tiff.Model"), model);
+        m_meta->setImageDateTime(dt);      <<== and here !!!!
+
+        QString filesList;
...
-    metaDst.setXmpTagString("Xmp.kipi.PanoramaInputFiles", filesList, false);
-    metaDst.setImageDateTime(QDateTime::currentDateTime());  <<== The wrong
one

As 4.x serie is closed now, code is fixed into next 5.0.0 only...

Gilles Caulier

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list