kopia lustrzana https://gitlab.com/sane-project/website
280 wiersze
11 KiB
HTML
280 wiersze
11 KiB
HTML
<!-- received="Thu Aug 19 11:02:52 1999 PDT" -->
|
||
<!-- sent="Thu, 19 Aug 1999 12:48:30 -0400" -->
|
||
<!-- name="252353N@knotes.kodak.com" -->
|
||
<!-- email="252353N@knotes.kodak.com" -->
|
||
<!-- subject="Re: Starting a discussion about SANE and TWAIN..." -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="Starting a discussion about SANE and TWAIN..." -->
|
||
<title>sane-devel: Re: Starting a discussion about SANE and TWAIN...</title>
|
||
<h1>Re: Starting a discussion about SANE and TWAIN...</h1>
|
||
<a href="mailto:252353N@knotes.kodak.com"><i>252353N@knotes.kodak.com</i></a><br>
|
||
<i>Thu, 19 Aug 1999 12:48:30 -0400</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#237">[ date ]</a><a href="index.html#237">[ thread ]</a><a href="subject.html#237">[ subject ]</a><a href="author.html#237">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0238.html">Ethan Gold: "quickcam VC & SANE?"</a>
|
||
<li> <b>Previous message:</b> <a href="0236.html">Andreas Beck: "Re: Mustek Paragon 1200SP"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0084.html">252353N@knotes.kodak.com: "Starting a discussion about SANE and TWAIN..."</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0255.html">Oliver Rauch: "Re: Starting a discussion about SANE and TWAIN..."</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
From: Mark McLaughlin<br>
|
||
<p>
|
||
Hi Oliver...<br>
|
||
<p>
|
||
First off, my apologies for slowing down the pace of the discussion.<br>
|
||
Things at work have heated up and I've had to attend to other<br>
|
||
stuff, which is causing me to fall behind in replying to all these<br>
|
||
interesting messages...<br>
|
||
<p>
|
||
Anywho, here are my comments for this message...<br>
|
||
<p>
|
||
First off, a simplified view of the way TWAIN is organized...<br>
|
||
<p>
|
||
+-------------+<br>
|
||
<i>| Application |</i><br>
|
||
+-------------+<br>
|
||
+--------------+<br>
|
||
<i>| TWAIN_32.DLL |</i><br>
|
||
+--------------+<br>
|
||
+--------+ +---------+<br>
|
||
<i>| abc.ds | | xyz.ds | ...</i><br>
|
||
+--------+ +---------+<br>
|
||
<p>
|
||
The application loads the TWAIN Source Manager<br>
|
||
( TWAIN_32.DLL) into memory with a LoadLibrary()<br>
|
||
call. It then gets a pointer to the DSM_Entry() function<br>
|
||
inside of TWAIN_32.DLL using GetProcAddress().<br>
|
||
All communication with TWAIN is done through<br>
|
||
DSM_entry().<br>
|
||
<p>
|
||
When the application requests it, the Source Manager<br>
|
||
discovers the available Sources by searching for<br>
|
||
any files with the extension ".ds" in either the<br>
|
||
%windir%\TWAIN or %windir%\TWAIN_32 directory<br>
|
||
(the search is recursive down the directory tree).<br>
|
||
<p>
|
||
The ".ds" files are really DLL's. The Source Manager<br>
|
||
loads each one in turn with LoadLibrary() and looks<br>
|
||
for the DS_Entry() function. If uses that call to find out<br>
|
||
the identifying information for the Source, which is<br>
|
||
bubbled up to the application so that it can select<br>
|
||
which Source it wants to use. Once a Source is<br>
|
||
selected and opened, the Source Manager acts<br>
|
||
primarily as a passthru until the application indicates<br>
|
||
that it wants to close up the session.<br>
|
||
<p>
|
||
Now, as for this sane.ds thingy. With a change to the<br>
|
||
Source Manager, we can modify the diagram above<br>
|
||
to look like...<br>
|
||
<p>
|
||
+-------------+<br>
|
||
<i>| Application |</i><br>
|
||
+-------------+<br>
|
||
+--------------+<br>
|
||
<i>| TWAIN_32.DLL |</i><br>
|
||
+--------------+<br>
|
||
+--------+ +-------+ +------------------------------+<br>
|
||
<i>| aaa.ds | | bbb.ds| | 'sane.ds' [aaa.ds bbb.ds...] |</i><br>
|
||
+--------+ +-------+ or +------------------------------+<br>
|
||
+-----+ +-----+ +-----+ +-----+<br>
|
||
<i>| aaa | | bbb | | aaa | | bbb |</i><br>
|
||
+-----+ +-----+ +-----+ +-----+<br>
|
||
<p>
|
||
One way of connecting to a SANE driver is to write a<br>
|
||
generic TWAIN Source and copy it, so we get<br>
|
||
aaa.ds and bbb.ds which are identical code, but<br>
|
||
which interface with two different SANE drivers. The<br>
|
||
benefit of this is that no changes have to be made to<br>
|
||
TWAIN as it stands to make this work...<br>
|
||
<p>
|
||
The sane.ds notion involves the creation of a new<br>
|
||
kind of Source, one that can enumerate a list of<br>
|
||
identities. This would allow the one Source to show<br>
|
||
a list of any number of SANE devices. I like this<br>
|
||
model more, but it would require a change to the<br>
|
||
TWAIN Source Manager to make it work. Since we<br>
|
||
are targeting UNIX with this change, it shouldn't be<br>
|
||
too much of a problem. And it should be possible to<br>
|
||
craft this in such a way that only the Source Manager<br>
|
||
is affected. Applications would never know the<br>
|
||
difference.<br>
|
||
<p>
|
||
Okay...last bit. I would like to be involved in any coding<br>
|
||
effort. I've many years of UNIX and Windows programming<br>
|
||
in my past, so I feel it's something that would be fun to do.<br>
|
||
However, I'd be lying if I said I have a lot of time to play<br>
|
||
with right now, so I'm not sure how much of my time I will<br>
|
||
be able to commit at this point.<br>
|
||
<p>
|
||
What I am going to do is look over the Windows version<br>
|
||
of the TWAIN Source Manager and access how much<br>
|
||
effort is needed to abstract out the WIN32 portions into<br>
|
||
something that could run on UNIX. Once I have that<br>
|
||
accessment in place, we can try to decide on who is<br>
|
||
going to do it (and if I can scratch out the time, then I'll<br>
|
||
do what I can).<br>
|
||
<p>
|
||
As for the application, I would very much like to use some<br>
|
||
third party package to see if we can build and run our<br>
|
||
WIN32 test program on UNIX. I see this as a proof of<br>
|
||
concept, that someone could move their WIN32 app to<br>
|
||
UNIX with a minimum of effort. If this works out, then we'll<br>
|
||
have our app without too much effort.<br>
|
||
<p>
|
||
The only code remaining then is the SANE.DS (and I<br>
|
||
would recommend going for the simple version of this<br>
|
||
first). This would be a TWAIN Source this is capable<br>
|
||
of negotiating a couple of image processing parametes<br>
|
||
(like resolution and contrast) and transferring an image<br>
|
||
from a SANE driver. Most of the work will be spent on<br>
|
||
this code, I think...<br>
|
||
<p>
|
||
Anywho, those are my ideas. I've not had enough time to<br>
|
||
really dig into the SANE code the way I want to. If you<br>
|
||
have some samples you can share they would be much<br>
|
||
appreciated...<br>
|
||
<p>
|
||
-- Mark<br>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
Oliver Rauch <<a href="mailto:oliver.rauch@wolfsburg.de">oliver.rauch@wolfsburg.de</a>> on 08/17/99 12:38:31 PM<br>
|
||
<p>
|
||
To: Mark McLaughlin/252353/EKC<br>
|
||
cc: SANE-MAILLING-LIST <<a href="mailto:sane-devel@mostang.com">sane-devel@mostang.com</a>>, "Beck, Andreas"<br>
|
||
<becka@sunserver1.rz.uni-duesseldorf.de><br>
|
||
Subject: Re: Starting a discussion about SANE and TWAIN...<br>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<a href="mailto:252353N@knotes.kodak.com">252353N@knotes.kodak.com</a> wrote:<br>
|
||
<p>
|
||
Hi Mark,<br>
|
||
<p>
|
||
<i>> TWAIN doesn't really have any layers. At it's most</i><br>
|
||
<i>> abstract description TWAIN is nothing more than an</i><br>
|
||
<i>> elaborate conversion API between a standard name</i><br>
|
||
<i>> space to a set of arbitrary native commands for some</i><br>
|
||
<i>> given device.</i><br>
|
||
<p>
|
||
Yes, but which parts are bonded together?<br>
|
||
<p>
|
||
If I understand it right there is one source manager<br>
|
||
on a system. If we have two different scanners with<br>
|
||
two different drivers (sources), this source manager<br>
|
||
gets contact to the one or the other driver.<br>
|
||
<p>
|
||
I am able to select one source from one application<br>
|
||
and the second source from another application.<br>
|
||
<p>
|
||
Or is the source manager included into the application<br>
|
||
and each application has its own sourcemanager?<br>
|
||
<p>
|
||
How is the contact done, is the driver a library that is<br>
|
||
loaded on runtime?<br>
|
||
<p>
|
||
<p>
|
||
<i>> This is why the notion of a sane.ds file is so appealing</i><br>
|
||
<i>> to me.</i><br>
|
||
<p>
|
||
sane.DS? Did I miss a mail?<br>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<i>> In this model TWAIN becomes an application</i><br>
|
||
<i>> using SANE, and should therefore receive all the</i><br>
|
||
<i>> benefits that any application using SANE would expect</i><br>
|
||
<i>> to receive.</i><br>
|
||
<p>
|
||
Yes, and I don`t think it is a problem to add a<br>
|
||
TWAIN interface to an existing sane frontend.<br>
|
||
<p>
|
||
<p>
|
||
<i>> However, if the sane.ds has the intelligence</i><br>
|
||
<i>> to discover SANE devices on the network, then we gain</i><br>
|
||
<i>> remote scanning control with no change to the TWAIN</i><br>
|
||
<i>> spec (and more importantly, no changes to any TWAIN</i><br>
|
||
<i>> applications).</i><br>
|
||
<p>
|
||
That is no problem, there is no difference for the frontend if<br>
|
||
it connects to a local backend or to the network backend<br>
|
||
that connects to a remote scanner.<br>
|
||
<p>
|
||
<p>
|
||
<i>> I guess that's fundimental to my current notion of the best</i><br>
|
||
<i>> implementation of a TWAIN using SANE and SANE</i><br>
|
||
<i>> using TWAIN system. How much can we do to enable</i><br>
|
||
<i>> applications access to more image capture devices</i><br>
|
||
<i>> across more platforms, and do it with the applications</i><br>
|
||
<i>> changing little or no code.</i><br>
|
||
<p>
|
||
Are you interested in programming code for unix,<br>
|
||
especally to implement the source manager and<br>
|
||
a test application? Of course we will work together<br>
|
||
but we need somone who is familiar with TWAIN.<br>
|
||
<p>
|
||
Andreas Beck and me also need help for creating<br>
|
||
the interface between the source selection manager<br>
|
||
and the sane frontend.<br>
|
||
<p>
|
||
Do you like to do this and do you have the time for it?<br>
|
||
<p>
|
||
<p>
|
||
Andreas and I talked how the communication by<br>
|
||
events between application and source can be<br>
|
||
implemented on unix.<br>
|
||
<p>
|
||
It looks like there are already differences between<br>
|
||
Windows and Mac.<br>
|
||
<p>
|
||
I have to read the TWAIN standard at first, but it will<br>
|
||
take a while (>500 pages and less time).<br>
|
||
<p>
|
||
Do you already have the sane standard and source code<br>
|
||
example (you can download it from the sane homepage).<br>
|
||
If you have problems to read the formats of the files/archieves,<br>
|
||
let me now and I will convert them for you!<br>
|
||
<p>
|
||
<p>
|
||
Bye<br>
|
||
Oliver<br>
|
||
<p>
|
||
<pre>
|
||
--
|
||
EMAIL: <a href="mailto:Oliver.Rauch@Wolfsburg.DE">Oliver.Rauch@Wolfsburg.DE</a>
|
||
WWW: <a href="http://www.wolfsburg.de/~rauch">http://www.wolfsburg.de/~rauch</a>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<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="0238.html">Ethan Gold: "quickcam VC & SANE?"</a>
|
||
<li> <b>Previous message:</b> <a href="0236.html">Andreas Beck: "Re: Mustek Paragon 1200SP"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0084.html">252353N@knotes.kodak.com: "Starting a discussion about SANE and TWAIN..."</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0255.html">Oliver Rauch: "Re: Starting a discussion about SANE and TWAIN..."</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|