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

Gilles Caulier caulier.gilles at free.fr
Sun Jul 16 10:12:46 BST 2006


SVN commit 562917 by cgilles:

digikam from trunk : disabled temporally the IPTC preview tag recoring in JPEG target file duing an uncompatibility between the IPTC preview tag size (256K max) and the JPEG segment size used to store IPTC byte array (64K).

A solution need to be found in Exiv2 to prevent this problem!

CCMAIL: digikam-devel at kde.org, ahuggel at gmx.net
CCBUGS: 130525

 M  +13 -2     dimginterface.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #562916:562917
@@ -514,9 +514,20 @@
     meta.setIptc(d->image.getIptc());
 
     // Update Iptc preview.
-    QImage preview = d->image.smoothScale(800, 600, QSize::ScaleMin).copyQImage();
-    meta.setImagePreview(preview);
 
+    // TODO: see B.K.O #130525. The a JPEG segment is limited to 64K. If IPTC byte array 
+    // bigger than 64K duing of image preview tag size, the target JPEG image will be
+    // broken. Note that IPTC image preview tag is limited to 256K!!!
+    // Temp. solution to disable IPTC preview record in JPEG file until a right solution 
+    // will be found into Exiv2.
+    // Note : There is no limitation with TIFF and PNG about IPTC byte array size.
+
+    if ( !mimeType.upper() == QString("JPG") || !mimeType.upper() == QString("JPEG") ) 
+    {
+        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);



More information about the Digikam-devel mailing list