# Re: Apple OneScanner/Color OneScanner status?

Milon Firikis (milonf@ariadne-t.gr)
Wed, 09 Sep 1998 13:59:00 +0300

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Kjetil Torgrim Homme: "What works best?"
- Previous message: Bernd Schroeder: "Re: ADF for microtek2 backend"
- Maybe in reply to: Ian R. Justman: "Apple OneScanner/Color OneScanner status?"

Ian R. Justman wrote:
>
>
> I have the Color OneScanner.
>
> > 2) How big is the internal buffer? (AppleScanner has 256 bytes)
>
> I do not know. I just assumed that much of the stuff that applies to the
> OneScanner also applies to the Color OneScanner. all of it does, but the
> Color OneScanner has... well... color. :)

I asked this because I have a premature theory about the bug you found.

>
> > 4) After you patch: Does everything works as expected? In all modes?
>
> I tested it fully in the normal OneScanner modes. Color, as your notes
> say, needs MUCH work.

The primary reason for this is the quantization stuff that I don't
really understand and it is poorly documented for scanners other the one
you have and you must do a lot of experiments to figure out how the
scanners do the quantization. Secondary reasons are the Color Correction
tables, and the Gamma vectors.

>
> > 5) If (4==TRUE) what about the round offs in scan area that are imposed
> > by the specific model you have. Note that in case of an unexpected round
> > offs the SANE may wait bigger/smaller image and that may lead to
> > undesired warnings and cropped images.
>
> No warnings, no cropped images, but the quantization algorithms introduce
> some really neat effects when there are rounding problems. One mode I
> tried does work right, but it yields a negative image. Otherwise, other
> modes look like a horizontally-rolling picture on a TV set.

Hm... I think Apple changed the polarity somewhere... I think I have an
option built-in. I don't remember if it is OneScanner or ColorOneScanner
specific. (Data Polarity?)
> If you'd like, I'll mail you sample scans and debugging loggage off-list
> for your perusal.

Yes it would be nice...
> Your patch looks that fixes a situation at the end of a scan.
Although
> > this is fine with me, the problems I had so far (other users actually
> > had them) was that the scanner wasn't starting the scan at all.
>
> Yes, my situation was that it reached the end of the scan, but there was
> still data available, causing the scanner to remain busy because of the
> logic problems in the status-checking code. The issue here was that the
> scanner was presenting status that it was no longer blocked but data was
> available. The code was transferring data ONLY when the scanner was
> blocked, and at the end of the scan, not only was data still available,
> the scanner was no longer in a blocked state, so said the block status
> bit. Since the only test was on the blocking bit, the code was in a tight
> loop waiting for that bit to be asserted, requiring me to CTRL-C out of
> the frontend and powercycle the scanner.
>
> As for the other situations, it could be possible that they might have an
> older rev of the firmware.

No. I think I figured out what happened.

AppleScanner which has only 256 bytes for buffer so it usually sets the
blocking bit when used with the defaults settings (LineArt, 75dpi=64k).
So I had never problem since the scanner was blocking and the read
procedure was continuing. But If you have large buffers it is possible
to end the scan and the buffer hadn't filled up (half of the buffer
actually). Thus the resulting bug you found. The others may be issued
scans which may result to smaller images than the buffer, so they didn't
notice any data exchange as you did.

I' ll try your patch today and if it works I will include it to the
changes for the next SANE versions. In the mean time feel free to send
me anything you got.

> You had mentioned that someone had worked on getting color support
> working, then mailed you the code mentioning that he didn't have the time
> to fully maintain it. That's the code I am keenly interested in working
> on, since I have the Color OneScanner.

You are referring to an older post that I sent accidentally, before I
was able to correct the various syntax errors I have made.

Here is the original:

> Finally there was one guy that he claimed that he had quick/hacked a
> program to scan from ColorOneScanners. I asked him if it was possible to
> built some of his knoweledge in the SANE backend. He said that he had no
> time for such a task, but he could send me the code. I said OK, fine
> thanks. Well I saw that code as much as did. I think that was

and here what I was intended to write. Sorry for the trouble.

Finally there was one guy that he claimed that he had quick/hacked a
program to scan from ColorOneScanners. I asked him if it was possible
to built some of his knowledge in the SANE backend. He said that he had
no time for such a task, but he could send me the code. I said OK, fine
thanks. Well I saw that code as much as you did. I think that was last
year.

If you want to work on ColorOneScanners be my guest. I will include
every patch you send me assumed that you are not breaking the
AppleScanner part. The sane-0.74 backend/apple.c with your patch is the
most recent sources that it is public available AFAIK.

Milon Firikis

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

- Next message: Kjetil Torgrim Homme: "What works best?"
- Previous message: Bernd Schroeder: "Re: ADF for microtek2 backend"
- Maybe in reply to: Ian R. Justman: "Apple OneScanner/Color OneScanner status?"