[Digikam-devel] extragear/graphics/digikam/utilities/imageeditor/canvas

Gilles Caulier caulier.gilles at free.fr
Wed Jun 21 12:07:55 BST 2006


SVN commit 553521 by cgilles:

digikam from trunk : DImg Image Editor interface : when a new image is saved to disk, set/update the IPTC preview tag to a fresh JPEG preview image. This one will be used be digiKam image preview tool.

CCMAIL: digikam-devel at kde.org


 M  +11 -3     dimginterface.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #553520:553521
@@ -616,10 +616,17 @@
 
     d->savingFilename = fileName;
 
-    // update Exif thumbnail.
+    // Get image Exif/Iptc data.
     DMetadata meta;
     meta.setExif(d->image.getExif());
-    QImage thumb = d->image.smoothScale(160, 120, QSize::ScaleMin).copyQImage();
+    meta.setIptc(d->image.getIptc());
+
+    // Update Iptc preview.
+    QImage preview = d->image.smoothScale(800, 600, QSize::ScaleMin).copyQImage();
+    meta.setImagePreview(preview);
+
+    // Update Exif thumbnail.
+    QImage thumb = preview.smoothScale(160, 120, QImage::ScaleMin);
     meta.setExifThumbnail(thumb);
 
     // Update Exif Image dimensions.
@@ -632,8 +639,9 @@
     if( setExifOrientationTag )
         meta.setImageOrientation(DMetadata::ORIENTATION_NORMAL);
 
-    // Store new Exif data into image.
+    // Store new Exif/Iptc data into image.
     d->image.setExif(meta.getExif());
+    d->image.setIptc(meta.getIptc());
 
     d->thread->save(d->image, fileName, mimeType);
 }



More information about the Digikam-devel mailing list