[Kde-imaging] [Bug 200558] Crash when saving scanned image to .tiff
Michael G. Hansen
mhansen at mghansen.de
Thu Jul 23 09:55:23 CEST 2009
https://bugs.kde.org/show_bug.cgi?id=200558
--- Comment #16 from Michael G. Hansen <mhansen mghansen de> 2009-07-23 09:55:14 ---
I googled a bit on the offending line in kwriteimage.cpp that caused the
original crash and found this bugreport on libimlib2 including a patch:
http://www.mail-archive.com/debian-bugs-closed@lists.debian.org/msg98527.html
Applying this patch to kwriteimage.cpp and reverting the changes to
scandialog.cpp to pre-998596 fixes the crashes for me (for 8-bit tiff, that is,
as I do not have a way to test 16-bit).
Index: common/libkipiplugins/kpwriteimage.cpp
===================================================================
--- common/libkipiplugins/kpwriteimage.cpp (revision 998734)
+++ common/libkipiplugins/kpwriteimage.cpp (working copy)
@@ -533,8 +533,9 @@
if (d->hasAlpha)
{
- TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 4);
- TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, EXTRASAMPLE_ASSOCALPHA);
+ uint16 extras[] = { EXTRASAMPLE_ASSOCALPHA };
+ TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 4);
+ TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, 1, extras);
}
else
{
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kde-imaging
mailing list