[Digikam-devel] [Bug 130525] Saving large (>5M) jpg's result in corrupt file
Gilles Caulier
caulier.gilles at free.fr
Sun Jul 16 10:12:57 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=130525
------- Additional Comments From caulier.gilles free fr 2006-07-16 11:12 -------
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 kde org, ahuggel 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