[sane-devel] Error while setting the mode option of HP ScanJet 6200C

2005-06-21 Thread Mohit Kumar
Hi All,

I have the following code to display my SANE options:

void sane_display_options(SANE_Handle handle)
{
=09const SANE_Option_Descriptor* option;
=09int num_options;
=09int index =3D 0;
=09option =3D sane_get_option_descriptor(handle,index);
=09do =20
=09{
=09=09/* The option 0 value field would contain how many options are
available for the scanner chosen */
=09=09if(index !=3D 0)
=09=09{
=09=09=09printf(Option %d Name: %s,index, option-name);
=09=09=09switch(option-constraint_type)
=09=09=09{
=09=09=09=09case SANE_CONSTRAINT_NONE:
=09=09=09=09=09break;
=09=09=09=09case SANE_CONSTRAINT_RANGE:
=09=09=09=09=09printf(min:%d max:%d
quant:%d,option-constraint.range-min,option-constraint.range-max,optio=
n-constraint.range-quant);
=09=09=09=09=09break;
=09=09=09=09case SANE_CONSTRAINT_WORD_LIST:
=09=09=09=09=09{const int n =3D option-constraint.word_list[0];
=09=09=09=09=09for(int i =3D1; in+1; i ++)
=09=09=09=09=09=09printf( %f,option-constraint.word_list[i]);
=09=09=09=09=09}
=09=09=09=09=09break;
=09=09=09=09case SANE_CONSTRAINT_STRING_LIST:
=09=09=09=09=09{
=09=09=09=09=09int i=3D0;
=09=09=09=09=09while(option-constraint.string_list[i])
=09=09=09=09=09{
=09=09=09=09=09=09printf( %s,option-constraint.string_list[i++]);
=09=09=09=09=09}
=09=09=09=09=09}
=09=09=09=09=09break;
=09=09=09}
=09=09=09if(strcmp(option-name,mode)=3D=3D0)
=09=09=09{
=09=09=09=09SANE_String mode =3D Color;
=09=09=09=09SANE_Status status_loc =3D sane_control_option(handle, index,
SANE_ACTION_SET_VALUE,(SANE_String_Const*)mode,NULL);
=09=09=09=09if(status_loc =3D=3D SANE_STATUS_GOOD)
=09=09=09=09=09printf(Mode set correctly.);
=09=09=09}
=09=09=09if(strcmp(option-name,mode)=3D=3D0)
=09=09=09{
=09=09=09=09SANE_String mode =3D Grayscale;
=09=09=09=09SANE_Status status_loc =3D sane_control_option(handle, index,
SANE_ACTION_SET_VALUE,(SANE_String_Const*)mode,NULL);
=09=09=09=09if(status_loc =3D=3D SANE_STATUS_GOOD)
=09=09=09=09=09printf(Mode set correctly.);
=09=09=09}
=09=09=09if(strcmp(option-name,depth)=3D=3D0)
=09=09=09{
=09=09=09=09SANE_String depth =3D 8;=20
=09=09=09=09SANE_Int info;
=09=09=09=09SANE_Status status_loc =3D sane_control_option(handle, index,
SANE_ACTION_SET_VALUE,(SANE_String_Const*)depth, info);
=09=09=09=09printf(SANE CONTROL OPTION :%d,info);
=09=09=09=09if(status_loc =3D=3D SANE_STATUS_GOOD)
=09=09=09=09=09printf(Everything seems to be working ok.);
=09=09=09=09display_error_message(status_loc);
=09=09=09}=09
=09=09=09printf(\n);=09
=09=09}
=09=09option =3D sane_get_option_descriptor(handle, ++index);
=09}while(option!=3DNULL);
=09num_options =3D index;
}

However gdb throws an error in the second strcmp. I cannot understand
the reason why?

The following is the gdb output:

(gdb)
409 if(strcmp(option-name,mode)=3D=3D0)
(gdb)
411 SANE_String mode =3D Color;
(gdb)
412 SANE_Status status_loc =3D
sane_control_option(handle, index,
SANE_ACTION_SET_VALUE,(SANE_String_Const*)mode,NULL);
(gdb)
413 if(status_loc =3D=3D SANE_STATUS_GO=
OD)
(gdb)
414 printf(Mode set correctly.=
);
(gdb)
416 if(strcmp(option-name,mode)=3D=3D0)
(gdb)
=20
Program received signal SIGSEGV, Segmentation fault.
0x42079408 in strcmp () from /lib/tls/libc.so.6
(gdb) p option-name
No symbol option in current context.
(gdb)


Can any one tell me what am i doing wrong here?

Thanks,
Mohit



[sane-devel] Re: sane-devel digest, Vol 1 #806 - 7 msgs

2005-06-21 Thread Stéphane VOLTZ
Hello,

The test16.pnm picture you posted is perfectly fine (I'm using 
Imagemagick
to see it). The trouble you get is related to the image viewer you use.
After trying konqueror to display it, I saw the same artifacts you get. So
it's a kde a bug related to 16 bits pictures.

For the other bug -trying to scan outside usable area- bound checking is
done. I think it may be a bug in scan area origin detection bug. Origin may be
wrongly detected a few mm too much toward buttons side, so the scanning
head goes to far. You may check it by scanning a triangle shaped paper, with
one corner touching the very top of the scanning area. If expect that a few mm
of it will be missing.

You may also wait ~45 s after powering before testing. I think origin
detection may fails if scanner isn't warm enough.

When all debug is activated, the backend write debug pnm files 
containing 
data is scans. I'd like to have these:
- search_position16.pnm
- search_position.pnm
- laplace.pnm
- xsobel.pnm
- ysobel.pnm

Regards,
Stef



[sane-devel] hp 5200c usb problem

2005-06-21 Thread Gerald Murray
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.2.2
X-Originating-IP: 209.188.109.9


T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxC=
^^   
bus is 001/002 device


What do I do?
I use kernel 2.6.7 and hotplug to manage permissions. However hotplug has s
ome
problems: It cannot chown and chmod of /proc/bus/usb/001/003 which might be
my scanner device. (I think it should be 001:001). I don't always get this

You do need to get the permissions set on the right device.
In the procfs, the T: line identifys the device and provides information.
You do not have to guess in the sysfs either.  This command
will list all the device numbers first, followed (in the same order)
by idVendor or idProduct (by manufacturer may fail because some do not
supply their name.  idVendor and idProduct are required by USB specifications)

cat /sys/bus/usb/devices/*/{devnum,idVendor}

From the sane-project site:

Support for models 5200C/62X0C/63X0C connected to the USB  require  the
kernel scanner driver or libusb. See sane-usb(5) for more details.

Best regards,

Gerald



-- 





[sane-devel] Error while setting the mode option of HP ScanJet 6200C

2005-06-21 Thread Henning Meier-Geinitz
Hi,

On Tue, Jun 21, 2005 at 10:47:02AM +0530, Mohit Kumar wrote:
   printf(Option %d Name: %s,index, option-name);

option-name may be NULL (if the option is a group).

   if(strcmp(option-name,mode)==0)

See above. Test for the option type first.

Bye,
  Henning



[sane-devel] Kyocera FS-1118 MFP

2005-06-21 Thread David Chamberlin
This is a multi-part message in MIME format.

--=_NextPart_000_0072_01C575F1.71EB6EB0
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Rainer,

Currently, Kyocera Mita does not have any planned development for a sane
backend to interface to the native TWAIN network interfaces in our MFPs.  It
is something for consideration.

Regards,

David C. Chamberlin
Manager, Software Development
david.chamber...@ktd-kyocera.com
(925) 849-3307 direct




-Original Message-
From: Till Kamppeter [mailto:till.kamppe...@gmx.net] 
Sent: Saturday, June 18, 2005 2:05 PM
To: Rainer Bendig aka Ny
Cc: sane-devel@lists.alioth.debian.org; David Chamberlin; Markus Brauer
Subject: Re: [sane-devel] Kyocera FS-1118 MFP

David, Markus, any chance here?

Till


Rainer Bendig aka Ny wrote:
 Hi,
 
 does anyone know if the scanner of the multi-function-printer Kyocera
 FS-1118 MFP works with sane?
 
 Kyocera said nothing in replies to my mails :-(
 
 Greetings,
 Rainer

--=_NextPart_000_0072_01C575F1.71EB6EB0
Content-Type: application/x-pkcs7-signature;
name=smime.p7s
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=smime.p7s

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJ3DCCAj0w
ggGmAhEAzbp/VvDf5LxU/iKss3KqVTANBgkqhkiG9w0BAQIFADBfMQswCQYDVQQGEwJVUzEXMBUG
A1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVibGljIFByaW1hcnkgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNOTYwMTI5MDAwMDAwWhcNMjgwODAxMjM1OTU5WjBfMQsw
CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNzA1BgNVBAsTLkNsYXNzIDEgUHVi
bGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
MIGJAoGBAOUZv22jVmEtmUhx9mfeuY3rt56GgAqRDvo4Ja9GiILlc6igmyRdDR/MZW4MsNBWh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EgQ0EgSW5kaXZpZHVhbCBTdWJzY3JpYmVyLVBlcnNvbmEgTm90IFZhbGlk

[sane-devel] Agfa SnapScan e25 Procedure Check up

2005-06-21 Thread Mauricio Hernandez
After reading, googling, and more reading, this is what I assume it is
to be done in order to get the Scan working properly. However, I DO
NOT get it working, so please let me know what I am doing so wrong.

1) Connect the Scanner
2) Get the firmware (a_file.bin)
3) Place the file.bin somewhere
4) Specify that path in /etc/sane.d/snapscan.conf just like it says here...

# Change to the fully qualified filename of your firmware file, if
# firmware upload is needed by the scanner
   firmware /home/me/e25.bin

After that, is there anything else I should be doing?
--=20
Best Regards,

Mauricio Hernandez Z.

Hell is repeating someone else's mistakes (JPS)



[sane-devel] Re: Unpaper 1.0.1 problem

2005-06-21 Thread Jens Gulden
Janusz S. Bien schrieb:
 The original scans converted to DjVu

DjVu looks interesting (http://www.djvuzone.org/).
Thanks for that hint, I didn't know it before.

 Although the processing improved the images in some respects, in
 general the result seems to me less readable then the
 original.

The dirty artefacts around letters are strange. Do you think they 
originate from unpaper's processing?
I placed an unprocessed page from your djvu-file to

http://user.cs.tu-berlin.de/~jgulden/unpaper/archive/20050621JanuszBien/03.pbm

and processed it with

unpaper -vv --layout single --mask-scan-threshold 0.4 --black-threshold 
0.3 --border 0,100,0,0 03.pbm 03up.pbm

The resulting file is

http://user.cs.tu-berlin.de/~jgulden/unpaper/archive/20050621JanuszBien/03up.pbm

Do you get the same result on your system from the same unpaper run?

(Btw, the additional '--black-threshold 0.3' is supposed to lead to 
slightly more saturated black color in the output. A matter of taste, I 
guess.)

Hope that helps,
Jens