[Digikam-devel] extragear/graphics/digikam/utilities/cameragui

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] extragear/graphics/digikam/utilities/cameragui

Gilles Caulier
SVN commit 538317 by cgilles:

digiKam from trunk : Gphoto2 camera drivers always return all JFIF APP1 section from JPEG file when Exif metadata are require by camera interface.

Exiv2 do not support to parse Exif metadata from APP1 directily. This commit cut APP1 header (10 first bytes) to please Exiv2 with this data.

You can display now your Exif/Makenotes metadata in camera gui with all Gphoto2 camera, PTP camera are includes (tested with my Dynax5d).

CCMAIL: [hidden email], [hidden email]


 M  +8 -1      cameraui.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #538316:538317
@@ -821,9 +821,16 @@
 void CameraUI::slotExifFromData(const QByteArray& exifData)
 {
     kdDebug() << "Size of Exif metadata from camera = " << exifData.size() << endl;
+
+    // GPhoto2 driver always return complete APP1 JFIF section. Exiv2 cannot
+    // decode (yet) exif metadata from APP1. We cut 10 first bytes (APP1 header)
+    // to please with Exiv2...
+    QByteArray data(exifData.size() - 10);
+    memcpy(data.data(), exifData.data()+10, data.size());
+
     CameraIconViewItem* item = dynamic_cast<CameraIconViewItem*>(d->view->currentItem());
     KURL url(item->itemInfo()->folder + "/" + item->itemInfo()->name);
-    d->rightSidebar->itemChanged(item->itemInfo(), url, exifData, d->view, item);
+    d->rightSidebar->itemChanged(item->itemInfo(), url, data, d->view, item);
 }
 
 void CameraUI::slotItemsSelected(CameraIconViewItem* item, bool selected)
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel