| SANE | |
|---|---|
| Original authors | David Mosberger-Tang Andy Beck |
| Initial release | November 27, 1996; 28 years ago (1996-11-27)[1] |
| Stable release | |
| Repository | |
| Operating system | Microsoft Windows,Linux,UNIX,OS/2 |
| License | GNU GPLv2 or later[3] (frontend programs), weakened[4] GPLv2 or later[5] (backend libraries), public domain[6] (SANE standard: API & network protocol)[7] |
| Website | www |
Scanner Access Now Easy (SANE) is an open-sourceapplication programming interface (API) that provides standardized access to any rasterimage scanner hardware (flatbed scanner,handheld scanner, video- and still-cameras,frame grabbers, etc.). The SANE API ispublic domain. It is commonly used onLinux.
SANE differs fromTWAIN in that it is cleanly separated intofrontend and backend (user programs and scanner drivers, respectively). Whereas a TWAIN driver handles theuser interface as well as communications with the scanner hardware, a SANE driver only provides aninterface with the hardware and describes a number of "options" which drive each scan.[8] Theseoptions specify parameters such as the resolution of the scan, the scan area, colour model, etc. Eachoption has a name, and information about its type, units, and range or possible values (e.g., enumerated list). By convention there are several "well known"options that frontends can supply using convenientGUI interaction e.g., the scan areaoptions can be set by dragging a rectangular outline over a preview image. Other options can be presented using GUI elements appropriate to their type e.g., sliders, drop-down lists, etc.
One consequence of this separation is that network scanning is easily implemented with no special handling in either the front ends or back ends. On a host with a scanner, thesaneddaemon runs and handles network requests. On client machines a "net" backend (driver) connects to the remote host to fetch the scanner options, and perform previews and scans. The saned daemon acts as a frontend locally, but simply passes requests and data between the network connections and the local scanner. Similarly, the "net" backend passes requests and data between the local frontend and the remote host.
Various types of unsupervised batch scanning are also possible with a minimum of support needed in the backend (driver). Many scanners support the attachment ofdocument feeders which allow a large number of sheets of paper to be automatically scanned in succession. Using the SANE API, the frontend simply has to "play back" the same set of options for each scan, driving the document feed in between scans to load the next sheet of paper. The frontend only has to obtain the set of options from the user once.
Several user interfaces have been written to combine SANE with an easy user method of controlling it.
gscan2pdf is an interface for scanning documents to PDF on theGNOME desktop that uses SANE to communicate with the scanner. It is available under theGPL. It includes common editing tools, e.g., for rotating or cropping pages. It is also able to performOCR using several optional OCR tools and save a searchable PDF. PDF files can be further downsampled upon saving.[9]
NAPS2 is free and open source scanning software for Windows 7+ (x64, x86),[10] macOS 10.15+ (x64, arm64) and Linux (x64, arm64) (GTK 3.20+, glibc 2.27+, libsane). Saves scans PDF, TIFF, JPEG, or PNG. Optical character recognition (OCR) is available using Tesseract.[11]

Simple Scan is a simplified GUI using SANE that is intended to be easier to use and better integrate into theGNOME desktop than XSane. It was initially written forUbuntu and is maintained by Robert Ancell ofCanonical Ltd. for Linux. Simple Scan was first fielded as part ofUbuntu 10.04 Lucid Lynx and is also used inLubuntu (until Lubuntu 18.04 LTS) andXubuntu. It is now part of theGNOME project.[12][13][14][15][16][17]

Skanlite is a simpleimage scanning application, based on the KSane backend. Kåre Särs is the lead developer.[18] InKDE 4 Skanlite replaced Kooka of KDE 3 as default KDE scanning application.[19]
Skanlite is based on libksane, an interface provided by KDE for SANE libraries to control flatbed scanners.[20] It also works with networked scanners.[21]
SwingSane is a cross-platform,Java front end for SANE, written and maintained by Roland Quast. It is available forMicrosoft Windows,Linux,Mac OS X and is licensed under the Apache 2.0 License.[22] The source code for the project can also be adapted for use with an existingSwing application.[23]
XSane is a graphical front end for SANE written by Oliver Rauch. It is available forMicrosoft Windows,Linux,UNIX, andOS/2 and is licensed under the GNU General Public License (GPL).[24] The Windows version only allows a Windows computer to access a scanner that is attached to a Unix, OS/2 or Mac OS X network computer, but not generally to the local Windows computer. Only the "complete" sane-back-ends versions will possibly work with some scanner models connected locally.[25]