[Kde-imaging] [Bug 200558] Crash when saving scanned image to .tiff
Nicolas Lécureuil
neoclust at mandriva.org
Fri Jul 17 23:29:32 CEST 2009
https://bugs.kde.org/show_bug.cgi?id=200558
--- Comment #5 from Nicolas Lécureuil <neoclust mandriva org> 2009-07-17 23:29:30 ---
after looking deeper i have clue:
in acquireimages/scandialog.cpp line 292 we have
if ( frmt != KSaneIface::KSaneWidget::FormatRGB_16_C )
{
QByteArray data((const char*)img.bits(), img.numBytes());
wImageIface.setImageData(data, img.width(), img.height(), false, true,
prof, meta);
}
this is used when there is no alpha Channel, but
KSaneIface::KSaneWidget::FormatRGB_8_C doesn't have any alpha channel too so i
want to add :
Index: acquireimages/scandialog.cpp
===================================================================
--- acquireimages/scandialog.cpp (révision 998526)
+++ acquireimages/scandialog.cpp (copie de travail)
@@ -288,14 +288,15 @@
meta.setImageColorWorkSpace(KExiv2Iface::KExiv2::WORKSPACE_SRGB);
KIPIPlugins::KPWriteImage wImageIface;
- if (frmt != KSaneIface::KSaneWidget::FormatRGB_16_C)
+
+ if ( frmt != KSaneIface::KSaneWidget::FormatRGB_16_C || frmt !=
KSaneIface::KSaneWidget::FormatRGB_8_C )
{
QByteArray data((const char*)img.bits(), img.numBytes());
wImageIface.setImageData(data, img.width(), img.height(), false, true,
prof, meta);
}
else
{
- // 16 bits color depth image.
+ // 8 and 16 bits color depth image.
wImageIface.setImageData(ksane_data, width, height, true, false, prof,
meta);
}
this doesn't fix the issue for me but this seems cleaner and maybe fix some
other crashes
--
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