sane-project-website/old-archive/1998-09/0061.html

150 wiersze
7.6 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Wed Sep 9 03:56:19 1998 PDT" -->
<!-- sent="Wed, 09 Sep 1998 13:59:00 +0300" -->
<!-- name="Milon Firikis" -->
<!-- email="milonf@ariadne-t.gr" -->
<!-- subject="Re: Apple OneScanner/Color OneScanner status?" -->
<!-- id="" -->
<!-- inreplyto="Apple OneScanner/Color OneScanner status?" -->
<title>sane-devel: Re: Apple OneScanner/Color OneScanner status?</title>
<h1>Re: Apple OneScanner/Color OneScanner status?</h1>
<b>Milon Firikis</b> (<a href="mailto:milonf@ariadne-t.gr"><i>milonf@ariadne-t.gr</i></a>)<br>
<i>Wed, 09 Sep 1998 13:59:00 +0300</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#61">[ date ]</a><a href="index.html#61">[ thread ]</a><a href="subject.html#61">[ subject ]</a><a href="author.html#61">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0062.html">Kjetil Torgrim Homme: "What works best?"</a>
<li> <b>Previous message:</b> <a href="0060.html">Bernd Schroeder: "Re: ADF for microtek2 backend"</a>
<li> <b>Maybe in reply to:</b> <a href="0023.html">Ian R. Justman: "Apple OneScanner/Color OneScanner status?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Ian R. Justman wrote:<br>
<i>&gt; </i><br>
<i>&gt; </i><br>
<i>&gt; I have the Color OneScanner.</i><br>
<i>&gt; </i><br>
<i>&gt; &gt; 2) How big is the internal buffer? (AppleScanner has 256 bytes)</i><br>
<i>&gt; </i><br>
<i>&gt; I do not know. I just assumed that much of the stuff that applies to the</i><br>
<i>&gt; OneScanner also applies to the Color OneScanner. all of it does, but the</i><br>
<i>&gt; Color OneScanner has... well... color. :)</i><br>
<p>
I asked this because I have a premature theory about the bug you found.<br>
<p>
<i>&gt; </i><br>
<i>&gt; &gt; 4) After you patch: Does everything works as expected? In all modes?</i><br>
<i>&gt; </i><br>
<i>&gt; I tested it fully in the normal OneScanner modes. Color, as your notes</i><br>
<i>&gt; say, needs MUCH work.</i><br>
<p>
The primary reason for this is the quantization stuff that I don't<br>
really understand and it is poorly documented for scanners other the one<br>
you have and you must do a lot of experiments to figure out how the<br>
scanners do the quantization. Secondary reasons are the Color Correction<br>
tables, and the Gamma vectors.<br>
<p>
<i>&gt; </i><br>
<i>&gt; &gt; 5) If (4==TRUE) what about the round offs in scan area that are imposed</i><br>
<i>&gt; &gt; by the specific model you have. Note that in case of an unexpected round</i><br>
<i>&gt; &gt; offs the SANE may wait bigger/smaller image and that may lead to</i><br>
<i>&gt; &gt; undesired warnings and cropped images.</i><br>
<i>&gt; </i><br>
<i>&gt; No warnings, no cropped images, but the quantization algorithms introduce</i><br>
<i>&gt; some really neat effects when there are rounding problems. One mode I</i><br>
<i>&gt; tried does work right, but it yields a negative image. Otherwise, other</i><br>
<i>&gt; modes look like a horizontally-rolling picture on a TV set.</i><br>
<p>
Hm... I think Apple changed the polarity somewhere... I think I have an<br>
option built-in. I don't remember if it is OneScanner or ColorOneScanner<br>
specific. (Data Polarity?)<br>
<br>
<i>&gt; If you'd like, I'll mail you sample scans and debugging loggage off-list</i><br>
<i>&gt; for your perusal.</i><br>
<p>
Yes it would be nice...<br>
<br>
<i> &gt; Your patch looks that fixes a situation at the end of a scan.</i><br>
Although<br>
<i>&gt; &gt; this is fine with me, the problems I had so far (other users actually</i><br>
<i>&gt; &gt; had them) was that the scanner wasn't starting the scan at all.</i><br>
<i>&gt; </i><br>
<i>&gt; Yes, my situation was that it reached the end of the scan, but there was</i><br>
<i>&gt; still data available, causing the scanner to remain busy because of the</i><br>
<i>&gt; logic problems in the status-checking code. The issue here was that the</i><br>
<i>&gt; scanner was presenting status that it was no longer blocked but data was</i><br>
<i>&gt; available. The code was transferring data ONLY when the scanner was</i><br>
<i>&gt; blocked, and at the end of the scan, not only was data still available,</i><br>
<i>&gt; the scanner was no longer in a blocked state, so said the block status</i><br>
<i>&gt; bit. Since the only test was on the blocking bit, the code was in a tight</i><br>
<i>&gt; loop waiting for that bit to be asserted, requiring me to CTRL-C out of</i><br>
<i>&gt; the frontend and powercycle the scanner.</i><br>
<i>&gt; </i><br>
<i>&gt; As for the other situations, it could be possible that they might have an</i><br>
<i>&gt; older rev of the firmware.</i><br>
<p>
<p>
No. I think I figured out what happened.<br>
<p>
AppleScanner which has only 256 bytes for buffer so it usually sets the<br>
blocking bit when used with the defaults settings (LineArt, 75dpi=64k).<br>
So I had never problem since the scanner was blocking and the read<br>
procedure was continuing. But If you have large buffers it is possible<br>
to end the scan and the buffer hadn't filled up (half of the buffer<br>
actually). Thus the resulting bug you found. The others may be issued<br>
scans which may result to smaller images than the buffer, so they didn't<br>
notice any data exchange as you did.<br>
<p>
I' ll try your patch today and if it works I will include it to the<br>
changes for the next SANE versions. In the mean time feel free to send<br>
me anything you got.<br>
<p>
<i>&gt; You had mentioned that someone had worked on getting color support</i><br>
<i>&gt; working, then mailed you the code mentioning that he didn't have the time</i><br>
<i>&gt; to fully maintain it. That's the code I am keenly interested in working</i><br>
<i>&gt; on, since I have the Color OneScanner.</i><br>
<p>
You are referring to an older post that I sent accidentally, before I<br>
was able to correct the various syntax errors I have made.<br>
<p>
Here is the original:<br>
<p>
<i>&gt; Finally there was one guy that he claimed that he had quick/hacked a</i><br>
<i>&gt; program to scan from ColorOneScanners. I asked him if it was possible to</i><br>
<i>&gt; built some of his knoweledge in the SANE backend. He said that he had no</i><br>
<i>&gt; time for such a task, but he could send me the code. I said OK, fine</i><br>
<i>&gt; thanks. Well I saw that code as much as did. I think that was</i><br>
<p>
and here what I was intended to write. Sorry for the trouble.<br>
<p>
Finally there was one guy that he claimed that he had quick/hacked a<br>
program to scan from ColorOneScanners. I asked him if it was possible<br>
to built some of his knowledge in the SANE backend. He said that he had<br>
no time for such a task, but he could send me the code. I said OK, fine<br>
thanks. Well I saw that code as much as you did. I think that was last<br>
year.<br>
<p>
If you want to work on ColorOneScanners be my guest. I will include<br>
every patch you send me assumed that you are not breaking the<br>
AppleScanner part. The sane-0.74 backend/apple.c with your patch is the<br>
most recent sources that it is public available AFAIK.<br>
<p>
Milon Firikis<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0062.html">Kjetil Torgrim Homme: "What works best?"</a>
<li> <b>Previous message:</b> <a href="0060.html">Bernd Schroeder: "Re: ADF for microtek2 backend"</a>
<li> <b>Maybe in reply to:</b> <a href="0023.html">Ian R. Justman: "Apple OneScanner/Color OneScanner status?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>