[gnome-scan/gnome-scan-0-6: 12/23] Fix black and white SANE frame support.
- From: Philipp Sadleder <phsadleder src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-scan/gnome-scan-0-6: 12/23] Fix black and white SANE frame support.
- Date: Wed, 22 Apr 2009 04:46:09 -0400 (EDT)
commit 31599a3f3fbf46ee7560d85c06c62cd008de6140
Author: Ã?tienne Bersac <bersace src gnome org>
Date: Wed Jan 14 23:29:23 2009 +0000
Fix black and white SANE frame support.
svn path=/branches/GNOME_SCAN_0_6/; revision=779
---
ChangeLog | 7 +++++++
modules/gsane-scanner.c | 4 +++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 16385f6..6bc75cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-15 Ã?tienne BERSAC <bersace st-raphael>
+
+ * modules/gsane-scanner.c (gss_data_gray1):
+
+ Fix grey 1bit support : 0 and 1 value are inverted in SANE 1.X
+ standard.
+
2009-01-14 Philipp Sadleder <philipp sadleder de>
* lib/gnome-scan-processor-common.c (gnome_scan_processor_common_init):
diff --git a/modules/gsane-scanner.c b/modules/gsane-scanner.c
index edc5fcd..dfe5b68 100644
--- a/modules/gsane-scanner.c
+++ b/modules/gsane-scanner.c
@@ -550,7 +550,9 @@ gss_data_gray1 (GSaneScanner *gss, GeglRectangle *rect, Babl* format, guchar* bu
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]