kopia lustrzana https://gitlab.com/sane-project/website
63 wiersze
3.4 KiB
HTML
63 wiersze
3.4 KiB
HTML
<html><body>
|
|
<a href="doc003.html"><img src=../icons/next.gif alt="Next"></a>
|
|
<a href="doc000.html"><img src=../icons/up.gif alt="Up"></a>
|
|
<a href="doc001.html"><img src=../icons/previous.gif alt="Previous"></a>
|
|
<a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a>
|
|
<hr>
|
|
|
|
<title>Introduction</title>
|
|
<h2><a name="s1">1 Introduction</a></h2>
|
|
|
|
<p>Have you ever wanted to scan an image under Linux? If so, you
|
|
probably know the feeling of being faced by a bewildering number of
|
|
scanner-driver packages. At the time of this writing, there exist
|
|
at least fourteen different scanner packages for Linux. While each
|
|
individual package is usually of high quality, it is often difficult
|
|
to determine which package should be used for which scanner.
|
|
Furthermore, some packages come with a command-line interface, others
|
|
include tcl/tk based graphical front ends, still others come with
|
|
full-featured, graphical front ends. While variety is said to make life
|
|
sweet, in this case it's more likely to cause a sizeable headache.
|
|
|
|
<p>SANE was created to provide a solution to this dilemma. The basic idea is
|
|
simple: if there were a general and well-defined application
|
|
programming interface (API), it would be easy to write applications
|
|
independently from scanner drivers. Thus, the author of a new scanner
|
|
driver would not have to worry about writing an application for the
|
|
driver. There are benefits for the application programmer as
|
|
well; since SANE is universal, an application can be written
|
|
independently of the devices that it will eventually control. Suppose
|
|
we wanted five applications to support ten different devices. With the
|
|
old approach, 5*10=50 programs would have to be written. With SANE,
|
|
only 5+10=15 programs have to be written. SANE has advantages for the
|
|
user too. It gives the user the liberty to choose whichever application
|
|
he likes best, and that one application can be used to control
|
|
all image-acquisition devices the user can access. Thus, SANE
|
|
makes it possible to present the same consistent interface independent
|
|
of the particular device that is in use.
|
|
|
|
<p>Of course, SANE is not the first attempt to create such a universal
|
|
interface. You may have heard of TWAIN, PINT or the Linux hand-scanner
|
|
interface. The problem is that these older interfaces prove to be
|
|
lacking in one way or another. For example, PINT is really a somewhat
|
|
primitive kernel-level interface and the hand-scanner interface by
|
|
definition is limited to hand-scanners. In contrast, SANE is general
|
|
enough to support any device that acquires raster images. The closest
|
|
thing to SANE is probably TWAIN. The fact that the two rhyme is not
|
|
coincidental, but that's a different story. The main reason TWAIN is
|
|
not SANE is that TWAIN puts the graphical user-interface to control
|
|
the device in the driver instead of the application. This makes it
|
|
unsuitable for Linux or networked environments where the scanner
|
|
driver might run on one machine and the application on another. In
|
|
contrast, SANE enforces a strict separation between the actual driver
|
|
and the user-interface for its controls. Indeed, the current SANE
|
|
distribution includes support for network-transparent scanning.
|
|
|
|
<p><p><hr>
|
|
<a href="doc003.html"><img src=../icons/next.gif alt="Next"></a>
|
|
<a href="doc000.html"><img src=../icons/up.gif alt="Up"></a>
|
|
<a href="doc001.html"><img src=../icons/previous.gif alt="Previous"></a>
|
|
<a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a>
|
|
<hr>
|
|
</body></html>
|