[sane-devel] [PATCH] testsuit: add hwdb support to sane-desc test

2013-08-01 Thread Tom Gundersen
Cc: St?phane Voltz 
---
 testsuite/tools/Makefile.am|2 +-
 testsuite/tools/Makefile.in|2 +-
 testsuite/tools/data/hwdb.ref  | 2736 
 testsuite/tools/data/udev+hwdb.ref |   76 +
 4 files changed, 2814 insertions(+), 2 deletions(-)
 create mode 100644 testsuite/tools/data/hwdb.ref
 create mode 100644 testsuite/tools/data/udev+hwdb.ref

diff --git a/testsuite/tools/Makefile.am b/testsuite/tools/Makefile.am
index 192a51d..a075315 100644
--- a/testsuite/tools/Makefile.am
+++ b/testsuite/tools/Makefile.am
@@ -24,7 +24,7 @@ check: check.local
 
 check.local: 
@echo " Testing $(SANEDESC) with $(TESTFILE)"
-   @for mode in ascii html-backends-split html-mfgs xml statistics usermap 
db udev udev+acl plist hal hal-new; \
+   @for mode in ascii html-backends-split html-mfgs xml statistics usermap 
db udev udev+acl udev+hwdb hwdb plist hal hal-new; \
do \
echo "PASS: sane-desc -m $$mode"; \
  $(SANEDESC) -m $$mode -s data >$$mode.res ;\
diff --git a/testsuite/tools/Makefile.in b/testsuite/tools/Makefile.in
index 5428004..139e35c 100644
--- a/testsuite/tools/Makefile.in
+++ b/testsuite/tools/Makefile.in
@@ -422,7 +422,7 @@ check: check.local
 
 check.local: 
@echo " Testing $(SANEDESC) with $(TESTFILE)"
-   @for mode in ascii html-backends-split html-mfgs xml statistics usermap 
db udev udev+acl plist hal hal-new; \
+   @for mode in ascii html-backends-split html-mfgs xml statistics usermap 
db udev udev+acl udev+hwdb hwdb plist hal hal-new; \
do \
echo "PASS: $(SANEDESC) -m $$mode"; \
  $(SANEDESC) -m $$mode -s data >$$mode.res ;\
diff --git a/testsuite/tools/data/hwdb.ref b/testsuite/tools/data/hwdb.ref
new file mode 100644
index 000..357aaa8
--- /dev/null
+++ b/testsuite/tools/data/hwdb.ref
@@ -0,0 +1,2736 @@
+# This file was automatically created based on description files (*.desc)
+# by sane-desc 3.5 from sane-backends 1.0.24git on Thu Aug  1 18:50:19 2013
+#
+# hwdb file for supported USB devices
+#
+# If your scanner isn't listed below, you can add it to a new hwdb file
+# under /etc/udev/hwdb.d/.
+#
+# If your scanner is supported by some external backend (brother, epkowa,
+# hpaio, etc) please ask the author of the backend to provide proper
+# device detection support for your OS
+#
+# If the scanner is supported by sane-backends, please mail the entry to
+# the sane-devel mailing list (sane-devel at lists.alioth.debian.org).
+#
+# Hewlett-Packard ScanJet 4100C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 4200C | Hewlett-Packard ScanJet 4200Cxi | 
Hewlett-Packard ScanJet 4200Cse
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 6200C | Hewlett-Packard ScanJet 6250C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 3300c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 4300c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 5200C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 3400c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 2100C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 6300C | Hewlett-Packard ScanJet 6350C | 
Hewlett-Packard ScanJet 6390C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 2200C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 5300C | Hewlett-Packard ScanJet 5370C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard scanjet 4400c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 7400c | Hewlett-Packard ScanJet 7450c | 
Hewlett-Packard ScanJet 7490c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard scanjet 4470c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 2300C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 2400C | Hewlett-Packard ScanJet G2410
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 8200 | Hewlett-Packard ScanJet 8250 | 
Hewlett-Packard ScanJet 8290
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 5400c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 5470c
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 4500C | Hewlett-Packard ScanJet 5550C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 4570C | Hewlett-Packard ScanJet 5500C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 3670C | Hewlett-Packard ScanJet 3690C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 5590
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 7650
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 4850C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 3530C | Hewlett-Packard ScanJet 3570C
+usb:v03F0p03F0*
+ libsane_matched=yes
+
+# Hewlett-Packard ScanJet 3500C
+usb:v03F0p03F0*
+ libsane_matched=ye

[sane-devel] [PATCHv2] sane-desc: add support for udev's hwdb

2013-08-01 Thread Stef
On 01/08/2013 17:56, Tom Gundersen wrote:
> On Thu, Aug 1, 2013 at 2:33 PM, Stef  wrote:
>> On 31/07/2013 15:39, Tom Gundersen wrote:
>>> On Wed, Jul 31, 2013 at 3:27 PM, Stef  wrote:
 On 31/07/2013 14:49, Tom Gundersen wrote:
> Hi Stef,
>
> On Wed, Jul 31, 2013 at 2:39 PM, Stef  wrote:
>>before applying this patch I'm considering adding a testsuite for
>> sane-desc first. Since it is too big to be in-lined, I have posted the
>> corresponding patch athttp://dl.free.fr/vzjrF6ete . It adds a tools
>> subdirectory to the testsuite directory. In this directory, a test
>> .desc
>> file is parsed with sane-desc for all known modes and the resulting
>> files
>> are compared to the expected files.
>>
>> I am waiting for your comments and suggestions.
> Sounds like a good idea. However, I was unable to download the file. I
> get "code incorrect"... Any chance you could upload it elsewhere?
>
> -t

   Hello,

   the http://dl.free.fr/vzjrF6ete URL is working for me in seamonkey
 and
 firefox. Maybe some typo ? I can send the patch directly to you if it
 helps.
>>> Thanks, now it worked. Should the patch have included an
>>> testsuite/tools/Makefile.in ? As it is, ./configure fails.
>>>
>>> Cheers,
>>>
>>> Tom
>> Hello,
>>
>>  here is the missing file.
> Thanks. As far as I can tell this works well (I tried breaking
> sane-desc and it was reported as expected). It also works with my hwdb
> patch applied.
>
> Will you commit this and the hwdb patch so I can just submit a
> separate patch adding the two new hwdb modes to the testsuite?
>
> Cheers,
>
> Tom
 Hello,

 yes, send a patch, I'll commit all this this week-end.

Regards,
 Stef



[sane-devel] [PATCHv2] sane-desc: add support for udev's hwdb

2013-08-01 Thread Tom Gundersen
On Thu, Aug 1, 2013 at 2:33 PM, Stef  wrote:
> On 31/07/2013 15:39, Tom Gundersen wrote:
>>
>> On Wed, Jul 31, 2013 at 3:27 PM, Stef  wrote:
>>>
>>> On 31/07/2013 14:49, Tom Gundersen wrote:

 Hi Stef,

 On Wed, Jul 31, 2013 at 2:39 PM, Stef  wrote:
>
>   before applying this patch I'm considering adding a testsuite for
> sane-desc first. Since it is too big to be in-lined, I have posted the
> corresponding patch athttp://dl.free.fr/vzjrF6ete . It adds a tools
> subdirectory to the testsuite directory. In this directory, a test
> .desc
> file is parsed with sane-desc for all known modes and the resulting
> files
> are compared to the expected files.
>
> I am waiting for your comments and suggestions.

 Sounds like a good idea. However, I was unable to download the file. I
 get "code incorrect"... Any chance you could upload it elsewhere?

 -t
>>>
>>>
>>>  Hello,
>>>
>>>  the http://dl.free.fr/vzjrF6ete URL is working for me in seamonkey
>>> and
>>> firefox. Maybe some typo ? I can send the patch directly to you if it
>>> helps.
>>
>> Thanks, now it worked. Should the patch have included an
>> testsuite/tools/Makefile.in ? As it is, ./configure fails.
>>
>> Cheers,
>>
>> Tom
>
> Hello,
>
> here is the missing file.

Thanks. As far as I can tell this works well (I tried breaking
sane-desc and it was reported as expected). It also works with my hwdb
patch applied.

Will you commit this and the hwdb patch so I can just submit a
separate patch adding the two new hwdb modes to the testsuite?

Cheers,

Tom



[sane-devel] [PATCHv2] sane-desc: add support for udev's hwdb

2013-08-01 Thread Stef
On 31/07/2013 15:39, Tom Gundersen wrote:
> On Wed, Jul 31, 2013 at 3:27 PM, Stef  wrote:
>> On 31/07/2013 14:49, Tom Gundersen wrote:
>>> Hi Stef,
>>>
>>> On Wed, Jul 31, 2013 at 2:39 PM, Stef  wrote:
   before applying this patch I'm considering adding a testsuite for
 sane-desc first. Since it is too big to be in-lined, I have posted the
 corresponding patch athttp://dl.free.fr/vzjrF6ete . It adds a tools
 subdirectory to the testsuite directory. In this directory, a test .desc
 file is parsed with sane-desc for all known modes and the resulting files
 are compared to the expected files.

 I am waiting for your comments and suggestions.
>>> Sounds like a good idea. However, I was unable to download the file. I
>>> get "code incorrect"... Any chance you could upload it elsewhere?
>>>
>>> -t
>>
>>  Hello,
>>
>>  the http://dl.free.fr/vzjrF6ete URL is working for me in seamonkey and
>> firefox. Maybe some typo ? I can send the patch directly to you if it helps.
> Thanks, now it worked. Should the patch have included an
> testsuite/tools/Makefile.in ? As it is, ./configure fails.
>
> Cheers,
>
> Tom
Hello,

 here is the missing file.

Regards,
 Stef
-- next part --
From 5a253e2084fcdda271375e2563356027da090a2d Mon Sep 17 00:00:00 2001
From: =?ISO-8859-1?q?St=E9phane=20Voltz?= 
Date: Thu, 1 Aug 2013 07:02:08 +0200
Subject: [PATCH 2/2] add missing Makefile.in

---
 testsuite/tools/Makefile.in | 441 
 1 file changed, 441 insertions(+)
 create mode 100644 testsuite/tools/Makefile.in

diff --git a/testsuite/tools/Makefile.in b/testsuite/tools/Makefile.in
new file mode 100644
index 000..5428004
--- /dev/null
+++ b/testsuite/tools/Makefile.in
@@ -0,0 +1,441 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite/tools
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+   $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/byteorder.m4 \
+   $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+   $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/include/sane/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_CFLAGS = @AVAHI_CFLAGS@
+AVAHI_LIBS = @AVAHI_LIBS@
+AWK = @AWK@
+BACKENDS = @BACKENDS@
+BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
+BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
+BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTCLEAN_FILES = @DISTCLEAN_FILES@
+DLLTOOL = @DLLTOOL@
+DL_LIBS = @DL_LIBS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DVIPS = @DVIPS@
+DYNAMIC_FLAG = @DYNAMIC_FLAG@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GPHOTO2_CPPFLAGS = @GPHOTO2_CPPFLAGS@
+GPHOTO2_LDFLAGS = @GPHOTO2_LDFLAGS@
+GPHOTO2_LIBS = @GPHOTO2_LIBS@
+GREP = @GREP@
+HAVE_GPHOTO2 = @HAVE_GPHOTO2@
+IEEE1284_LIBS = @IEEE1284_LIBS@
+INCLUDES = @INCLUDES@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_LOCKPATH = @INSTALL_LOCKPATH@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEG_LIBS = @JPEG_LIBS@
+LA

[sane-devel] (no subject)

2013-08-01 Thread Warren Hacker
Customer Service

The document is only a corner of the page and not the whole page

How do I adjust the SCAN to do the complete page

Please let me know  hackerwarren at yahoo.com or the above e-mail

Thank You

Warren Hacker



[sane-devel] HP7650 (HP5590 back.) scanner works, quality bad - website states "complete"

2013-08-01 Thread Daniel Schäfer
Olaf Meeuwissen:
> Daniel Sch?fer writes:
>> [...] Duplex [...]
> It'd be a lot nicer if the backend could take this information into
> account and start a new page when that column changes from black to grey
> (and vice versa).  Also, I guess that that last column should be removed
> from the image data.
This is the octave script I'm using:
#!/usr/bin/octave -q
# Author: Schaefer
# Date: 31.07.2013
# This file reads out the pixel column to
# seperate a single duplex file in two files
# containing the corresponding page
arg_list = argv ();
if(length(arg_list) != 1)
 display("A single argument is needed: filename without _raw.tiff")
 exit
endif

filename=arg_list{1}
im = imread(strcat(filename, "_raw.tiff"));
decline = length(im(1,:, 1));
[y,x]=find(im(:,decline) != 0, 2);

if(length(y) == 1)
 y(2) = length(im)
endif

imwrite(im(1:y(1),1:decline-1,:), strcat(filename, "-p1.tiff"))
imwrite(im(y(1):y(2),1:decline-1,:), strcat(filename, "-p2.tiff"))
# octave end

> Basically, you are assuming that the 0 offsets you pass the backend 
> correspond to the physical borders. That may not be the case. Hope 
> this helps, 
Yes, thanks!

But to be honest, these two are only minor issues, as I can work-around 
them :-)
My main problem is still the image brightness/contrast which makes the 
scanner useless :-/

Daniel




[sane-devel] HP7650 (HP5590 back.) scanner works, quality bad - website states "complete"

2013-08-01 Thread Olaf Meeuwissen
Daniel Sch?fer writes:

> Hi,
> I have an HP7650 scanner which should work out of the box
> (see http://www.sane-project.org/sane-mfgs.html#Z-HEWLETT-PACKARD)
> Status: complete
>
> I'm really afraid that I have to say, that this information seems to be 
> wrong.
>
> 1. Duplex:
> Duplex doesn't work really well as the front and back side of the 
> document are stored inside a single file/image. I already read that this 
> is because the scanner doesn't expose a "page turned" information.
> But I discovered that the information is buried in the image data! The 
> right last pixel column is normally black, gray when page is turned and 
> white when there is no more document. I have a very simple octave script 
> which generates two image files from a single Duplex-ADF image. (I can 
> contribute if wanted).

It'd be a lot nicer if the backend could take this information into
account and start a new page when that column changes from black to grey
(and vice versa).  Also, I guess that that last column should be removed
from the image data.

> [...]
> 3. Scan area
> The usefull scan area is limited at the left and top side. If i put the 
> document right to the borders, the scanned image is missing like 0.3mm 
> even with x and y offset settings to 0.

I have seen similar with EPSON flatbeds and that was a mechanical issue.
When I actually aligned the document with the markings on those borders
(which were ever so slightly towards the right and bottom) everything
was fine.  Could be the same here.

Basically, you are assuming that the 0 offsets you pass the backend
correspond to the physical borders.  That may not be the case.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962