sane-project-website/old-archive/1998-11/0066.html

177 wiersze
8.2 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="Sun Nov 8 16:12:21 1998 PST" -->
<!-- sent="Mon, 09 Nov 1998 02:13:59 +0200" -->
<!-- name="Milon Firikis" -->
<!-- email="milonf@ariadne-t.gr" -->
<!-- subject="Apple: Patch for proper scanning" -->
<!-- id="" -->
<!-- inreplyto="" -->
<title>sane-devel: Apple: Patch for proper scanning</title>
<h1>Apple: Patch for proper scanning</h1>
<b>Milon Firikis</b> (<a href="mailto:milonf@ariadne-t.gr"><i>milonf@ariadne-t.gr</i></a>)<br>
<i>Mon, 09 Nov 1998 02:13:59 +0200</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#66">[ date ]</a><a href="index.html#66">[ thread ]</a><a href="subject.html#66">[ subject ]</a><a href="author.html#66">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0067.html">Milon Firikis: "Q: sane-1.0"</a>
<li> <b>Previous message:</b> <a href="0065.html">Andre Couture: "parallele BizCard Reader ???"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
This is a multi-part message in MIME format.<br>
--------------906255AA3B0EC6650D2B970E<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Transfer-Encoding: 7bit<br>
<p>
Hello<br>
<p>
I included and tested a patch that was sent to me by Ian R. Justman.<br>
This patch allows the backend to scan when the underlying hardware is<br>
the ColorOneScanner and I suspect that may also help with the<br>
OneScanner. It doesn't break the AppleScanner. I stressed it during the<br>
weekend.<br>
<p>
The problem with the Apple Scanners lies mostly to the quantization<br>
algorithm that is used by the underlying hardware. Only the<br>
ColorOneScanner has well documented quantization methods although I<br>
hadn't implement them mainly due to the lack of hardware. The other 2<br>
models needs extreme experimentation in order to guess the algorithm.<br>
You have practically to reverse engineer the internal algorithm of the<br>
scanner in order to give correct info to the SANE backend. At least<br>
these scanners looks robust enough not to explode :-) when out of bounds<br>
scanning region is specified. Mine for example refuses to scan until you<br>
specify a valid region. So the<br>
current status is:<br>
<p>
<p>
AppleScanner :Fully functional.<br>
<p>
OneScanner :It may scan.<br>
You may have quantization problems.<br>
<p>
ColorOneScanner :It will scan in non color modes.<br>
You may have quantization problems.<br>
<p>
<p>
Quantization problems:<br>
<p>
When you have quantization problems means that the SANE backend could<br>
not calculate correctly the number of pixels in X or Y direction (mostly<br>
in X). This results to unexpected round offs while the SANE may wait<br>
bigger/smaller image and that may lead to undesired warnings and cropped<br>
images. A cropped image is most possible a shifted image also. As Ian R.<br>
Justman said:<br>
<p>
<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>
<p>
Milon Firikis<br>
<p>
PS<br>
<p>
I am also attaching a patch containing some correction in my e-mail<br>
address.<br>
--------------906255AA3B0EC6650D2B970E<br>
Content-Type: text/plain; charset=us-ascii; name="apple_buffer"<br>
Content-Transfer-Encoding: 7bit<br>
Content-Disposition: inline; filename="apple_buffer"<br>
<p>
diff -ur sane-pre0.75.orig/backend/apple.c sane-pre0.75/backend/apple.c<br>
--- sane-pre0.75.orig/backend/apple.c Thu Oct 29 09:00:43 1998<br>
+++ sane-pre0.75/backend/apple.c Sun Nov 8 21:18:13 1998<br>
@@ -2502,7 +2502,8 @@<br>
<br>
if (data_length)<br>
{<br>
- if (result[3] &amp; 1) /* Scanner Blocked: Retrieve data */<br>
+ /* if (result[3] &amp; 1) Scanner Blocked: Retrieve data */<br>
+ if ((result[3] &amp; 1) || data_av)<br>
{<br>
DBG (IO_MESSAGE,<br>
"sane_read: (status) Available in scanner buffer %u.\n",<br>
diff -ur sane-pre0.75.orig/backend/apple.desc sane-pre0.75/backend/apple.desc<br>
--- sane-pre0.75.orig/backend/apple.desc Tue Jul 28 07:47:48 1998<br>
+++ sane-pre0.75/backend/apple.desc Sun Nov 8 21:54:30 1998<br>
@@ -1,10 +1,10 @@<br>
;Apple backend .desc file by Milon Firikis.<br>
<br>
:backend "apple" ; name of backend<br>
-:version "0.2" ; version of backend<br>
+:version "0.31" ; version of backend<br>
:status :alpha ; :alpha, :beta, :stable, :new<br>
:manpage "sane-apple" ; name of manpage (if it exists)<br>
-;:url "<a href="http://www.luser.com/temp/">http://www.luser.com/temp/</a>" ; backend's web page<br>
+;:url "<a href="http://no.www.page.yet/">http://no.www.page.yet/</a>" ; backend's web page<br>
<br>
:devicetype :scanner ; start of a list of devices....<br>
<br>
@@ -13,6 +13,6 @@<br>
:model "Apple Scanner"<br>
:comment "4bit, 16 shades of gray"<br>
:model "OneScanner"<br>
-:comment "8bit, 256 shades of gray (needs work)"<br>
+:comment "8bit, 256 shades of gray. The backend needs work especially in the quantization code but it may work."<br>
:model "ColorOneScanner"<br>
-:comment "truecolor (needs much work)"<br>
+:comment "truecolor (needs much work) but it scans in non color modes."<br>
<p>
--------------906255AA3B0EC6650D2B970E<br>
Content-Type: text/plain; charset=us-ascii; name="apple_mail"<br>
Content-Transfer-Encoding: 7bit<br>
Content-Disposition: inline; filename="apple_mail"<br>
<p>
diff -ur sane-pre0.75.orig/AUTHORS sane-pre0.75/AUTHORS<br>
--- sane-pre0.75.orig/AUTHORS Wed Oct 28 09:41:51 1998<br>
+++ sane-pre0.75/AUTHORS Sun Nov 8 22:36:02 1998<br>
@@ -8,6 +8,7 @@<br>
<br>
Backends:<br>
<br>
+ apple: Milon Firikis<br>
artec: Chris Pinkham<br>
coolscan: Didier Carlier<br>
dc25: Peter Fales<br>
@@ -59,7 +60,7 @@<br>
Matthew Marjanovic &lt;<a href="mailto:maddog@mir.com">maddog@mir.com</a>&gt;<br>
Michael K. Johnson &lt;<a href="mailto:johnsonm@redhat.com">johnsonm@redhat.com</a>&gt;<br>
Michel Roelofs &lt;<a href="mailto:michelr@stack.nl">michelr@stack.nl</a>&gt;<br>
-Milon Firikis &lt;<a href="mailto:milonf@isosun.ariadne-t.gr">milonf@isosun.ariadne-t.gr</a>&gt;<br>
+Milon Firikis &lt;<a href="mailto:milonf@ariadne-t.gr">milonf@ariadne-t.gr</a>&gt;<br>
Oliver Rauch &lt;<a href="mailto:Oliver.Rauch@Wolfsburg.DE">Oliver.Rauch@Wolfsburg.DE</a>&gt;<br>
Patrick Reynolds &lt;<a href="mailto:patrickr@virginia.edu">patrickr@virginia.edu</a>&gt;<br>
Peter Fales &lt;<a href="mailto:psfales@earthling.net">psfales@earthling.net</a>&gt;<br>
diff -ur sane-pre0.75.orig/PROJECTS sane-pre0.75/PROJECTS<br>
--- sane-pre0.75.orig/PROJECTS Tue Jul 21 08:43:19 1998<br>
+++ sane-pre0.75/PROJECTS Sun Nov 8 22:37:41 1998<br>
@@ -23,7 +23,7 @@<br>
Polaroid wip Dick Bruijn &lt;<a href="mailto:dick@wau.mis.ah.nl">dick@wau.mis.ah.nl</a>&gt; Polaroid SprintScan<br>
35 LE<br>
Artec wip Chris Pinkham &lt;<a href="mailto:cpinkham@infi.net">cpinkham@infi.net</a>&gt; Artec AT3<br>
-Apple wip Milon Firikis &lt;<a href="mailto:milonf@isosun.ariadne-t.gr">milonf@isosun.ariadne-t.gr</a>&gt; AppleScanner (?)<br>
+Apple wip Milon Firikis &lt;<a href="mailto:milonf@ariadne-t.gr">milonf@ariadne-t.gr</a>&gt; AppleScanner<br>
Coolscan wip Didier Carlier &lt;<a href="mailto:carlierd@acm.org">carlierd@acm.org</a>&gt; Nikon Coolscan II<br>
DC25 wip Peter Fales &lt;<a href="mailto:psfales@earthling.net">psfales@earthling.net</a>&gt; Kodak DC25<br>
DMC wip David Skoll &lt;<a href="mailto:dskoll@chipworks.com">dskoll@chipworks.com</a>&gt; Polaroid Digital<br>
<p>
--------------906255AA3B0EC6650D2B970E--<br>
<p>
<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="0067.html">Milon Firikis: "Q: sane-1.0"</a>
<li> <b>Previous message:</b> <a href="0065.html">Andre Couture: "parallele BizCard Reader ???"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>