gnome-scan r779 - in branches/GNOME_SCAN_0_6: . modules
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r779 - in branches/GNOME_SCAN_0_6: . modules
- Date: Wed, 14 Jan 2009 23:29:23 +0000 (UTC)
Author: bersace
Date: Wed Jan 14 23:29:23 2009
New Revision: 779
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=779&view=rev
Log:
Fix black and white SANE frame support.
Modified:
branches/GNOME_SCAN_0_6/ChangeLog
branches/GNOME_SCAN_0_6/modules/gsane-scanner.c
Modified: branches/GNOME_SCAN_0_6/modules/gsane-scanner.c
==============================================================================
--- branches/GNOME_SCAN_0_6/modules/gsane-scanner.c (original)
+++ branches/GNOME_SCAN_0_6/modules/gsane-scanner.c Wed Jan 14 23:29:23 2009
@@ -550,7 +550,9 @@
tbuf = g_new0 (guchar, tlen);
for (i = 0; i < tlen; i++) {
mask = 0x80 >> (i%8);
- tbuf[i] = (buf[i/8] & mask) ? 0xFF : 0x00;
+ /* 0 means white and 1 means black, that's SANE
+ standard */
+ tbuf[i] = (buf[i/8] & mask) ? 0x00 : 0xFF;
}
gegl_buffer_set (GET_PRIVATE (gss)->buffer, rect, format, tbuf,
GEGL_AUTO_ROWSTRIDE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]