# Re: B&W qcam with SANE 0.6

Andrew Kuchling (amk@magnet.com)
Tue, 17 Jun 1997 17:49:03 -0400 (EDT)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Previous message: Guido Muesch: "SANE 0.6 configure"
- In reply to: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Next in thread: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Reply: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Reply: Guido Muesch: "Re: B&W qcam with SANE 0.6"

> No, unfortunately. Nobody with a b&w camera has come forward to debug
> the remaining issues so far.

I'm willing to work on that, if you'll let me know what the
remaining issues are. This B&W QuickCam has been temporarily borrowed
from a friend, so it's possible I haven't set it up properly. My goal
is to get it working, and then write a SANE interface for the Python
Imaging Library (http://www.python.org/sigs/image-sig/Imaging.html) so
you can initiate a scan and get an Image object, which can then be
fiddled with.

> Andrew> I'm going to try adding '||1' to the q->version check, and see
> Andrew> what happens then...
With the ||1 (added in two places), scanimage runs and
completes uneventfully, but the resulting PNM file isn't what the
camera is pointing at. --test-image=yes produces the same result, so
the problem is something fairly fundamental. Here's the output of
"SANE_DEBUG_QCAM=128 frontend/scanimage -d qcam --test-image=yes
>test.pnm 2>debug":

[sanei_init_debug]: Setting debug level of qcam to 128.
[qcam] qc_lock_wait: acquiring lock for 0x378
[qcam] qc_lock_wait: got lock for 0x378
[qcam] attach: found QuickCam version 0x00
[qcam] qc_lock_wait: releasing lock for 0x378
[qcam] open()
[qcam] qc_lock_wait: acquiring lock for 0x378
[qcam] qc_lock_wait: got lock for 0x378
[qcam] qc_send: sent 0xf6, camera echoed 0xf9
[qcam] qc_send: (re-read does not help)
[qcam] sane_start: top=0, left=5, white=150, bright=135, contr=104
[qcam] start: unidir 246 lines of 330 pixels each (81180 bytes) => 330x246
[qcam] scanmode (before increment): 0x42
[qcam] read(buf=0xbfff7d04,num_bytes=0,max_len=32768,len=32768)
[qcam] reader_process: got request for 81180 bytes
[qcam] reader_process: frame complete
[qcam] qc_lock_wait: releasing lock for 0x378
[qcam] read: got 4096 bytes
[qcam] read(buf=0xbfff7d04,num_bytes=4096,max_len=32768,len=32768)
[qcam] read: got 4096 bytes
[qcam] read(buf=0xbfff7d04,num_bytes=4096,max_len=32768,len=32768)
[qcam] read: got 4096 bytes
[qcam] read(buf=0xbfff7d04,num_bytes=8192,max_len=32768,len=32768)

... a fair number of 4K reads ...

[qcam] read(buf=0xbfff7d04,num_bytes=73728,max_len=32768,len=7452)
[qcam] read: got 4096 bytes
[qcam] read(buf=0xbfff7d04,num_bytes=77824,max_len=32768,len=3356)
[qcam] read: got 3356 bytes

Should it be reading from the device even with --test-image=yes?

The PNM file can be seen at http://people.magnet.com/~amk/test.pnm,
in case that's relevant.

Andrew Kuchling
amk@magnet.com
http://people.magnet.com/%7Eamk/

    --
    Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
    To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com

- Next message: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Previous message: Guido Muesch: "SANE 0.6 configure"
- In reply to: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Next in thread: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Reply: David Mosberger-Tang: "Re: B&W qcam with SANE 0.6"
- Reply: Guido Muesch: "Re: B&W qcam with SANE 0.6"