Scanner Access Now Easy. A scanner/image capture device API. It's becoming a standard scanner interface under UNIXen.

GIMP has, of course, a scanner interface plugin that uses SANE.

Home page:

Standard Apple Numerics Environment, the floating point environment shared by 680x0 Apple Macintoshes.

Superseded by PowerPC Numerics, which are more portable, but don't have a nearly as nifty sounding acronym. Because the operations supported by SANE are a subset of PPCN's, PowerPC Machintoshes are able to run 680x0 applications in the SANE floating point environment, and will do so until the applications in question are recompiled for the PowerPC architecture.

SANE has fewer types than PPCN, most notably lacking the double double type. It does, however, support the comp and extended types (80 and 96 bits, respectively). SANE actually performs all floating point operations with extended precision, whereas PPCN's operations are not type restricted in this manner.

Oddly, because of this, SANE features better overflow and underflow protection than PPCN. An example given on is for the expression (max_double + max_double) / max_double, where all three variables are of type double.

SANE will cast everything into extended type, which prevents an overflow on the initial add instruction. The expression correctly evaluates to 2, after the extended-precision division. PPCN, however, will perform both operations at double-precision, resulting in an overflow after the addition, and an incorrect result of positive infinity.

Scanner Access Now Easy

A play on 'TWAIN', SANE is an API for accessing scanners, originally designed for linux1. TWAIN was designed as a scanner API for windows 3.x, and is a very simple API indeed - an application using TWAIN invokes a 'TWAIN data source', and then accepts any images the TWAIN data source gives it. The TWAIN data source is responsible for the entire scanning process, from providing the user interface to driving the scanner. While the data source may use a scanner driver to do the heavy lifting, there is no standard interface between data sources and drivers.

The TWAIN framework allows for great flexability - an application that uses TWAIN can take input from any device that has a TWAIN data source, such as a digital camera, motion capture card, or FAX machine. As the TWAIN data source defines its own user-interface, advanced features of high-end scanners (film scanning, document feeders, etc.) can be easily supported. Despite this flexability, TWAIN has major architectural flaws. Because the user-interface is defined by the data source, two different scanners on the same computer with the same operating system invoked by the same application can have wildly differing user interfaces. If a data source has a horrible user interface (and many do), there's nothing the user can do about it. There is no way to automate scanning using TWAIN, as there is no standard for the application to communicate with the data source in any way more meaningful than opening and closing it.

SANE solves these architectural issues by defining a rigid interface between the 'front end', which takes care of the user interface, and the 'back end', which communicates with the scanner. Whichever scanner is used, the front-end stays the same; the user interface remains consistent, greatly improving the user's experience. Applications can provide their own front ends, for instance a kids' application could provide a simplified, easy-to-use front end.

The greatest advantage of SANE's front end/back end architecture, however, is that the front end and back end do not have to be on the same computer. saned, the SANE network daemon, allows scanners to be shared over the network. Rather than having one scanner per seat, or a dedicated 'scanning workstation', as is necessary with TWAIN, a single scanner can be connected to a linux server, and can be used by any computer on the network. In the best case, this saves having several unused scanners; at worst it still saves having to dedicate a workstation to scanning.

SANE scanners can be shared with windows machines by installing a TWAIN data source on the windows machines to access saned. SaneTwain ( is free beer, well-featured and stable. There also exist network frontends for Mac OS X, OS/2 and NeXTStep. SANE comes with backends for a large number of SCSI, parallel, and USB scanners, but has the same problems as linux in supporting deviced for which the specifications are not available. There's no technical reason why companies opposed to open-source could not release their own closed-source backends, but to my knowledge, none have.

SANE is licensed under the GPL, and is downloadable from . It is bundled with many linux distributions, including Debian and Red Hat.

1 - While originally designed for linux, there is a windows/cygwin port of SANE, supporting SCSI scanners only. At time of writing, it is very much work-in-progress. It can be found at

Sane (?), a. [L. sanus; cf. Gr. , , safe, sound. Cf. Sound, a.]


Being in a healthy condition; not deranged; acting rationally; -- said of the mind.


Mentally sound; possessing a rational mind; having the mental faculties in such condition as to be able to anticipate and judge of the effect of one's actions in an ordinary maner; -- said of persons.

Syn. -- Sound; healthy; underanged; unbroken.


© Webster 1913.

Log in or register to write something here or to contact authors.