From 1fa4d8cfd4b6a9931788d4e11842e16f9f551141 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Tue, 23 Sep 2003 16:52:00 +0000 Subject: [PATCH] Added SANE standard. --- html/doc000.html | 116 + html/doc001.html | 56 + html/doc002.html | 31 + html/doc003.html | 42 + html/doc004.html | 38 + html/doc005.html | 24 + html/doc006.html | 41 + html/doc007.html | 104 + html/doc008.html | 154 + html/doc009.html | 30 + html/doc010.html | 77 + html/doc011.html | 878 +++++ html/doc012.html | 666 ++++ html/doc013.html | 99 + html/doc014.html | 145 + html/doc015.html | 82 + html/doc016.html | 89 + html/doc017.html | 460 +++ html/doc018.html | 43 + html/doc019.html | 186 ++ html/footnotes.html | 7 + html/img000.gif | 0 html/img001.gif | 0 html/img002.gif | 0 html/img003.gif | 0 html/img004.gif | 0 html/index.html | 56 + sane.ps | 4845 +++++++++++++++++++++++++++ sane2/0.05/sane2-0.05.dvi.gz | Bin 0 -> 220572 bytes sane2/0.05/sane2-0.05.ps.gz | 5722 ++++++++++++++++++++++++++++++++ sane2/0.05/sane2-0.05.tex.gz | 2664 +++++++++++++++ sane2/0.06/sane2-0.06.dvi.gz | Bin 0 -> 222928 bytes sane2/0.06/sane2-0.06.ps.gz | 5813 ++++++++++++++++++++++++++++++++ sane2/0.06/sane2-0.06.tex.gz | 2645 +++++++++++++++ sane2/0.07/doc000.html | 131 + sane2/0.07/doc001.html | 63 + sane2/0.07/doc002.html | 31 + sane2/0.07/doc003.html | 46 + sane2/0.07/doc004.html | 38 + sane2/0.07/doc005.html | 24 + sane2/0.07/doc006.html | 41 + sane2/0.07/doc007.html | 104 + sane2/0.07/doc008.html | 155 + sane2/0.07/doc009.html | 32 + sane2/0.07/doc010.html | 77 + sane2/0.07/doc011.html | 1001 ++++++ sane2/0.07/doc012.html | 874 +++++ sane2/0.07/doc013.html | 197 ++ sane2/0.07/doc014.html | 455 +++ sane2/0.07/doc015.html | 82 + sane2/0.07/doc016.html | 89 + sane2/0.07/doc017.html | 460 +++ sane2/0.07/doc018.html | 43 + sane2/0.07/doc019.html | 207 ++ sane2/0.07/footnotes.html | 7 + sane2/0.07/img000.gif | Bin 0 -> 6930 bytes sane2/0.07/img001.gif | Bin 0 -> 1011 bytes sane2/0.07/img002.gif | Bin 0 -> 1864 bytes sane2/0.07/img003.gif | Bin 0 -> 9568 bytes sane2/0.07/img004.gif | Bin 0 -> 2230 bytes sane2/0.07/index.html | 63 + sane2/0.07/sane2-0.07.dvi | Bin 0 -> 221000 bytes sane2/0.07/sane2-0.07.ps | 5734 ++++++++++++++++++++++++++++++++ sane2/0.07/sane2-0.07.tex | 2632 +++++++++++++++ sane2/0.08/doc000.html | 132 + sane2/0.08/doc001.html | 63 + sane2/0.08/doc002.html | 31 + sane2/0.08/doc003.html | 46 + sane2/0.08/doc004.html | 38 + sane2/0.08/doc005.html | 24 + sane2/0.08/doc006.html | 41 + sane2/0.08/doc007.html | 104 + sane2/0.08/doc008.html | 155 + sane2/0.08/doc009.html | 32 + sane2/0.08/doc010.html | 77 + sane2/0.08/doc011.html | 1039 ++++++ sane2/0.08/doc012.html | 871 +++++ sane2/0.08/doc013.html | 207 ++ sane2/0.08/doc014.html | 486 +++ sane2/0.08/doc015.html | 82 + sane2/0.08/doc016.html | 89 + sane2/0.08/doc017.html | 460 +++ sane2/0.08/doc018.html | 43 + sane2/0.08/doc019.html | 212 ++ sane2/0.08/footnotes.html | 7 + sane2/0.08/img000.gif | Bin 0 -> 6930 bytes sane2/0.08/img001.gif | Bin 0 -> 1011 bytes sane2/0.08/img002.gif | Bin 0 -> 1864 bytes sane2/0.08/img003.gif | Bin 0 -> 9568 bytes sane2/0.08/img004.gif | Bin 0 -> 2230 bytes sane2/0.08/index.html | 63 + sane2/0.08/sane2-0.08.dvi | Bin 0 -> 231836 bytes sane2/0.08/sane2-0.08.ps | 6060 ++++++++++++++++++++++++++++++++++ sane2/0.08/sane2-0.08.tex | 2721 +++++++++++++++ sane2/sane2-api-todo.txt | 205 ++ 95 files changed, 50987 insertions(+) create mode 100644 html/doc000.html create mode 100644 html/doc001.html create mode 100644 html/doc002.html create mode 100644 html/doc003.html create mode 100644 html/doc004.html create mode 100644 html/doc005.html create mode 100644 html/doc006.html create mode 100644 html/doc007.html create mode 100644 html/doc008.html create mode 100644 html/doc009.html create mode 100644 html/doc010.html create mode 100644 html/doc011.html create mode 100644 html/doc012.html create mode 100644 html/doc013.html create mode 100644 html/doc014.html create mode 100644 html/doc015.html create mode 100644 html/doc016.html create mode 100644 html/doc017.html create mode 100644 html/doc018.html create mode 100644 html/doc019.html create mode 100644 html/footnotes.html create mode 100644 html/img000.gif create mode 100644 html/img001.gif create mode 100644 html/img002.gif create mode 100644 html/img003.gif create mode 100644 html/img004.gif create mode 100644 html/index.html create mode 100644 sane.ps create mode 100644 sane2/0.05/sane2-0.05.dvi.gz create mode 100644 sane2/0.05/sane2-0.05.ps.gz create mode 100644 sane2/0.05/sane2-0.05.tex.gz create mode 100644 sane2/0.06/sane2-0.06.dvi.gz create mode 100644 sane2/0.06/sane2-0.06.ps.gz create mode 100644 sane2/0.06/sane2-0.06.tex.gz create mode 100644 sane2/0.07/doc000.html create mode 100644 sane2/0.07/doc001.html create mode 100644 sane2/0.07/doc002.html create mode 100644 sane2/0.07/doc003.html create mode 100644 sane2/0.07/doc004.html create mode 100644 sane2/0.07/doc005.html create mode 100644 sane2/0.07/doc006.html create mode 100644 sane2/0.07/doc007.html create mode 100644 sane2/0.07/doc008.html create mode 100644 sane2/0.07/doc009.html create mode 100644 sane2/0.07/doc010.html create mode 100644 sane2/0.07/doc011.html create mode 100644 sane2/0.07/doc012.html create mode 100644 sane2/0.07/doc013.html create mode 100644 sane2/0.07/doc014.html create mode 100644 sane2/0.07/doc015.html create mode 100644 sane2/0.07/doc016.html create mode 100644 sane2/0.07/doc017.html create mode 100644 sane2/0.07/doc018.html create mode 100644 sane2/0.07/doc019.html create mode 100644 sane2/0.07/footnotes.html create mode 100644 sane2/0.07/img000.gif create mode 100644 sane2/0.07/img001.gif create mode 100644 sane2/0.07/img002.gif create mode 100644 sane2/0.07/img003.gif create mode 100644 sane2/0.07/img004.gif create mode 100644 sane2/0.07/index.html create mode 100644 sane2/0.07/sane2-0.07.dvi create mode 100644 sane2/0.07/sane2-0.07.ps create mode 100644 sane2/0.07/sane2-0.07.tex create mode 100644 sane2/0.08/doc000.html create mode 100644 sane2/0.08/doc001.html create mode 100644 sane2/0.08/doc002.html create mode 100644 sane2/0.08/doc003.html create mode 100644 sane2/0.08/doc004.html create mode 100644 sane2/0.08/doc005.html create mode 100644 sane2/0.08/doc006.html create mode 100644 sane2/0.08/doc007.html create mode 100644 sane2/0.08/doc008.html create mode 100644 sane2/0.08/doc009.html create mode 100644 sane2/0.08/doc010.html create mode 100644 sane2/0.08/doc011.html create mode 100644 sane2/0.08/doc012.html create mode 100644 sane2/0.08/doc013.html create mode 100644 sane2/0.08/doc014.html create mode 100644 sane2/0.08/doc015.html create mode 100644 sane2/0.08/doc016.html create mode 100644 sane2/0.08/doc017.html create mode 100644 sane2/0.08/doc018.html create mode 100644 sane2/0.08/doc019.html create mode 100644 sane2/0.08/footnotes.html create mode 100644 sane2/0.08/img000.gif create mode 100644 sane2/0.08/img001.gif create mode 100644 sane2/0.08/img002.gif create mode 100644 sane2/0.08/img003.gif create mode 100644 sane2/0.08/img004.gif create mode 100644 sane2/0.08/index.html create mode 100644 sane2/0.08/sane2-0.08.dvi create mode 100644 sane2/0.08/sane2-0.08.ps create mode 100644 sane2/0.08/sane2-0.08.tex create mode 100644 sane2/sane2-api-todo.txt diff --git a/html/doc000.html b/html/doc000.html new file mode 100644 index 00000000..39e4f5a9 --- /dev/null +++ b/html/doc000.html @@ -0,0 +1,116 @@ + +Next +Previous +Previous +Contents +Index +
+Contents +

Contents

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1 Preface
1.1 About This Document
1.1.1 Typographic Conventions
2 Introduction
2.1 Terminology
3 The SANE Environment
3.1 Attaching to a SANE backend
3.2 Image Data Format
3.2.1 Image Transmission
4 The SANE Application Programmer Interface (API)
4.1 Version Control
4.2 Data Types
4.2.1 Base Types
4.2.2 Boolean Type
4.2.3 Integer Type
4.2.4 Fixed-point Type
4.2.5 Text
4.2.5.1 Character Type
4.2.5.2 String Type
4.2.6 Scanner Handle Type
4.2.7 Status Type
4.2.8 Device Descriptor Type
4.2.9 Option Descriptor Type
4.2.9.1 Option Name
4.2.9.2 Option Title
4.2.9.3 Option Description
4.2.9.4 Option Value Type
4.2.9.5 Option Value Unit
4.2.9.6 Option Value Size
4.2.9.7 Option Capabilities
4.2.9.8 Option Value Constraints
4.3 Operations
4.3.1 sane_init
4.3.2 sane_exit
4.3.3 sane_get_devices
4.3.4 sane_open
4.3.5 sane_close
4.3.6 sane_get_option_descriptor
4.3.7 sane_control_option
4.3.8 sane_get_parameters
4.3.9 sane_start
4.3.10 sane_read
4.3.11 sane_cancel
4.3.12 sane_set_io_mode
4.3.13 sane_get_select_fd
4.3.14 sane_strstatus
4.4 Code Flow
4.5 Well-Known Options
4.5.1 Option Number Count
4.5.2 Scan Resolution Option
4.5.3 Preview Mode Option
4.5.4 Scan Area Options
5 Network Protocol
5.1 Data Type Encoding
5.1.1 Primitive Data Types
5.1.2 Type Constructors
5.2 Remote Procedure Call Requests
5.2.1 SANE_NET_INIT
5.2.2 SANE_NET_GET_DEVICES
5.2.3 SANE_NET_OPEN
5.2.4 SANE_NET_CLOSE
5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS
5.2.6 SANE_NET_CONTROL_OPTION
5.2.7 SANE_NET_GET_PARAMETERS
5.2.8 SANE_NET_START
5.2.9 SANE_NET_CANCEL
5.2.10 SANE_NET_AUTHORIZE
5.2.11 SANE_NET_EXIT
6 Contact Information
+ +

List of Figures

+ + + + + + + +
1Example SANE Hiearchy
2Transfer order of image data bytes
3Bit and byte order or image data
4Code flow
5Scan area options
+ + + +

List of Tables

+ + + + + + + + + + + +
1Status Codes
2Predefined Device Information Strings
3Option Value Types (SANE_Value_Type)
4Physical Units (SANE_Unit)
5Option Capabilities
6Option Value Constraints
7Action Values (SANE_Action)
8Additional Information Returned When Setting an Option
9Frame Format (SANE_Frame)
+ +


+Next +Previous +Previous +Contents +Index +
+ diff --git a/html/doc001.html b/html/doc001.html new file mode 100644 index 00000000..fbae5a87 --- /dev/null +++ b/html/doc001.html @@ -0,0 +1,56 @@ + +Next +Up +Previous +Contents +Index +
+./sane + + +

+ +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ + +

SANE Standard Version 1.03

+
+
2003-02-22
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc002.html b/html/doc002.html new file mode 100644 index 00000000..fb16c3d7 --- /dev/null +++ b/html/doc002.html @@ -0,0 +1,31 @@ + +Next +Up +Previous +Contents +Index +
+ +Preface +

1 Preface

+ +

The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +6. + +

The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + +

1.1 About This Document


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc003.html b/html/doc003.html new file mode 100644 index 00000000..6a527abf --- /dev/null +++ b/html/doc003.html @@ -0,0 +1,42 @@ + +Next +Up +Previous +Contents +Index +
+ +About This Document +

1.1 About This Document

+ +

This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +

The remainder of this document is organized as follows. +Chapter 2 provides introductional material. +Chapter 3 presents the environment SANE is designed +for. Chapter 4 details the SANE Application Programmer +Interface. Chapter 5 specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter 6 gives information on how +to join the SANE development process. + +

1.1.1 Typographic Conventions

+ +

Changes since the last revision of this document are highlighted +like this: + +

+


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc004.html b/html/doc004.html new file mode 100644 index 00000000..132e99aa --- /dev/null +++ b/html/doc004.html @@ -0,0 +1,38 @@ + +Next +Up +Previous +Contents +Index +
+ +Introduction +

2 Introduction

+ +

SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +

SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +

2.1 Terminology


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc005.html b/html/doc005.html new file mode 100644 index 00000000..1fbad177 --- /dev/null +++ b/html/doc005.html @@ -0,0 +1,24 @@ + +Next +Up +Previous +Contents +Index +
+ +Terminology +

2.1 Terminology

+ +

An application that uses the SANE interface is called a SANE + frontend. A driver that implements the SANE interface is called a +SANE backend. A meta backend provides some means to +manage one or more other backends. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc006.html b/html/doc006.html new file mode 100644 index 00000000..86d60331 --- /dev/null +++ b/html/doc006.html @@ -0,0 +1,41 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Environment +

3 The SANE Environment

+ +

SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +

Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE option. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +brightness whose value is an integer in the range from 0 to +255. + +

With self-describing options, a backend need not be concerned with +presentation issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the meaning of each option. It simply provides +means to present and alter the options defined by the backend. + +

3.1 Attaching to a SANE backend

3.2 Image Data Format


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc007.html b/html/doc007.html new file mode 100644 index 00000000..d088ed3d --- /dev/null +++ b/html/doc007.html @@ -0,0 +1,104 @@ + +Next +Up +Previous +Contents +Index +
+ +Attaching to a SANE backend +

3.1 Attaching to a SANE backend

+ +

The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +

+ +

+

+ + +

Figure 1: Example SANE Hiearchy
+ +
+

+ +

The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure 1. The figure shows that machine +A uses a dynamic-linking based meta backend called dll to +access the backends called pnm, mustek, and net. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called saned. The saned in +turn has access to the hp and autolum backends through +another instance of the dll backend. The autolum meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called qcam. + +

Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc008.html b/html/doc008.html new file mode 100644 index 00000000..9d37d600 --- /dev/null +++ b/html/doc008.html @@ -0,0 +1,154 @@ + +Next +Up +Previous +Contents +Index +
+ +Image Data Format +

3.2 Image Data Format

+ +

Arguably the most important aspect of an image acquisition system is +how images are represented. The SANE approach is to define a simple +yet powerful representation that is sufficient for vast majority of +applications and devices. While the representation is simple, the +interface has been defined carefully to allow extending it in the +future without breaking backwards compatibility. Thus, it will be +possible to accommodate future applications or devices that were not +anticipated at the time this standard was created. + +

A SANE image is a rectangular area. The rectangular area is +subdivided into a number of rows and columns. At the intersection of +each row and column is a quadratic pixel. A pixel consists of one or +more sample values. Each sample value represents one channel (e.g., +the red channel). Each sample value has a certain bit depth. The bit +depth is fixed for the entire image and can be as small as one bit. +Valid bit depths are 1, 8, or 16 bits per sample. If a device's +natural bit depth is something else, it is up to the driver to scale +the sample values appropriately (e.g., a 4 bit sample could be scaled +by a factor of four to represent a sample value of depth 8). + +

3.2.1 Image Transmission

+ +

The SANE API transmits an image as a sequence of frames. Each frame +covers the same rectangular area as the entire image, but may contain +only a subset of the channels in the final image. For example, a +red/green/blue image could either be transmitted as a single frame +that contains the sample values for all three channels or it could be +transmitted as a sequence of three frames: the first frame containing +the red channel, the second the green channel, and the third the blue +channel. + +

Conceptually, each frame is transmitted a byte at a time. Each byte +may contain 8 sample values (for an image bit depth of 1), one full +sample value (for an image bit depth of 8), or a partial sample value +(for an image bit depth of 16 or bigger). In the latter case, the +bytes of each sample value are transmitted in the machine's native +byte order. For depth 1, the leftmost pixel is stored in the most +significant bit, and the rightmost pixel in the least significant bit. +

+
+ Backend Implementation Note +
+ A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +
+ +

+

+ + +

Figure 2: Transfer order of image data bytes
+ +
+

+ +

The order in which the sample values in a frame are transmitted is +illustrated in Figure 2. As can be seen, the values are +transmitted row by row and each row is transmitted from left-most to +right-most column. The left-to-right, top-to-bottom transmission +order applies when the image is viewed in its normal orientation (as +it would be displayed on a screen, for example). + +

If a frame contains multiple channels, then the channels are +transmitted in an interleaved fashion. Figure 3 +illustrates this for the case where a frame contains a complete +red/green/blue image with a bit-depth of 8. For a bit depth of 1, +each byte contains 8 sample values of a single channel. In +other words, a bit depth 1 frame is transmitted in a byte interleaved +fashion. + +

+

+ + +

Figure 3: Bit and byte order or image data
+ +
+

+ +

When transmitting an image frame by frame, the frontend needs to know +what part of the image a frame represents (and how many frames it +should expect). For that purpose, the SANE API tags every frame with +a type. This version of the SANE standard supports the following +frame types: +

+
+ +

SANE_FRAME_GRAY:
The frame contains a single + channel of data that represents sample values from a spectral band + that covers the human visual range. The image consists of this + frame only. + +

SANE_FRAME_RGB:
The frame contains three + channels of data that represent sample values from the red, green, + and blue spectral bands. The sample values are interleaved in the + order red, green, and blue. The image consists of this frame only. + +

SANE_FRAME_RED:
The frame contains one channel + of data that represents sample values from the red spectral band. + The complete image consists of three frames: + SANE_FRAME_RED, SANE_FRAME_GREEN, and + SANE_FRAME_BLUE. The order in which the frames are + transmitted chosen by the backend. + +

SANE_FRAME_GREEN:
The frame contains one + channel of data that represents sample values from the green + spectral band. The complete image consists of three frames: + SANE_FRAME_RED, SANE_FRAME_GREEN, and + SANE_FRAME_BLUE. The order in which the frames are + transmitted chosen by the backend. + +

SANE_FRAME_BLUE:
The frame contains one channel + of data that represents sample values from the blue spectral band. + The complete image consists of three frames: + SANE_FRAME_RED, SANE_FRAME_GREEN, and + SANE_FRAME_BLUE. The order in which the frames are + transmitted chosen by the backend. + +

+
+ +

In frames of type SANE_FRAME_GRAY, when the bit depth is 1 there are +only two sample values possible, 1 represents minimum intensity +(black) and 0 represents maximum intensity (white). For all other bit +depth and frame type combinations, a sample value of 0 represents +minimum intensity and larger values represent increasing intensity. + +

The combination of bit depth 1 and SANE_FRAME_RGB (or +SANE_FRAME_RED, SANE_FRAME_GREEN, SANE_FRAME_BLUE) +is rarely used and may not be supported by every frontend. + +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc009.html b/html/doc009.html new file mode 100644 index 00000000..7fd37cec --- /dev/null +++ b/html/doc009.html @@ -0,0 +1,30 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Application Programmer Interface (API) +

4 The SANE Application Programmer Interface (API)

+ +

This Section defines version 1 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called sane/sane.h. This file should +normally be included via a C pre-processor directive of the form: +

+  #include <sane/sane.h>
+
+ +

4.1 Version Control

4.2 Data Types

4.3 Operations

4.4 Code Flow

4.5 Well-Known Options


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc010.html b/html/doc010.html new file mode 100644 index 00000000..26e707e8 --- /dev/null +++ b/html/doc010.html @@ -0,0 +1,77 @@ + +Next +Up +Previous +Contents +Index +
+ +Version Control +

4.1 Version Control

+ +

The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +

SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +

The SANE API provides the following five macros to manage version +numbers. +

+
+
SANE_CURRENT_MAJOR:
The value of this macro is the + number of the SANE standard that the interface implements. + +

SANE_VERSION_CODE(maj,min,bld):
+ + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (maj), the minor version number min, + and the build revision of a backend (bld). The major and + minor version numbers must be in the range 0...255 and the + build revision must be in the range 0...65535. + +

Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + +

Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + +

SANE_VERSION_MAJOR(vc):
This macro returns the + major version number component of the version code passed in + argument vc. +
SANE_VERSION_MINOR(vc):
This macro returns the + minor version number component of the version code passed in + argument vc. +
SANE_VERSION_BUILD(vc):
This macro returns the + build revision component of the version code passed in argument + vc. +
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc011.html b/html/doc011.html new file mode 100644 index 00000000..f7169059 --- /dev/null +++ b/html/doc011.html @@ -0,0 +1,878 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Types +

4.2 Data Types

+ +

4.2.1 Base Types

+ +

The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +

+ typedef some-scalar-type SANE_Byte;
+ typedef some-scalar-type SANE_Word
; +
+SANE_Byte must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. SANE_Word must be +capable of holding any of the following: + +Note that the SANE standard does not define what C type +SANE_Byte and SANE_Word map to. For example, on some +platforms, the latter may map to long int whereas on others it +may map to int. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +

4.2.2 Boolean Type

+ +

SANE_Bool is used for variables that can take one of +the two truth values SANE_FALSE and +SANE_TRUE. The former value is defined to be 0, +whereas the latter is 1.1 The C +declarations for this type are given below. +

+
+#define SANE_FALSE      0
+#define SANE_TRUE       1
+typedef SANE_Word SANE_Bool;
+
+
+Note that SANE_Bool is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Bool whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +

4.2.3 Integer Type

+ +

SANE_Int is used for variables that can take integer +values in the range -232 to 231-1. Its C declaration is +given below. +

+
+typedef SANE_Word SANE_Int;
+
+
+Note that SANE_Int is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Int whenever a given variable or formal argument has a +fixed interpretation as an integer object. + +

4.2.4 Fixed-point Type

+ +

SANE_Fixed is used for variables that can take fixed +point values in the range -32768 to 32767.9999 with a resolution +of 1/65535. The C declarations relating to this type are given +below. +

+
+#define SANE_FIXED_SCALE_SHIFT  16
+typedef SANE_Word SANE_Fixed;
+
+
+The macro SANE_FIXED_SCALE_SHIFT gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of 1/65536. + +

Note that SANE_Fixed is simply an alias of SANE_Word. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Fixed whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +

For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +

+
+ +

SANE_FIX(d):
Returns the largest SANE + fixed-point value that is smaller than the double value d. + No range checking is performed. If the value of d is out of + range, the result is undefined. + +

SANE_UNFIX(w):
Returns the nearest + double machine number that corresponds to fixed-point value + w. + +

+
+SANE does not require that the following two expressions hold +true (even if the values of w and d are in range): +
+
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+
+
+In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + +

4.2.5 Text

+ +

4.2.5.1 Character Type

+ +

Type SANE_Char represents a single text character or +symbol. At present, this type maps directly to the underlying C +char type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +sizeof(SANE_Char)==sizeof(char). +

+
+typedef char SANE_Char;
+
+
+ +

4.2.5.2 String Type

+ +

Type SANE_String represents a text string as a sequence +of C char values. The end of the sequence is indicated by a +'\0' (NUL) character. +

+
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+
+
+The type SANE_String_Const is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +
+
+const SANE_String str;
+
+
+declares a string pointer that is constant (not a string pointer that +points to a constant value). + +

4.2.6 Scanner Handle Type

+ +

Access to a scanner is provided through an opaque type called +SANE_Handle. The C declaration of this type is given +below. +

+
+typedef void *SANE_Handle;
+
+
+While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a SANE_Handle. In +particular, SANE does not require that a value of this type is a legal +pointer value. + +

4.2.7 Status Type

+ +

Most SANE operations return a value of type SANE_Status +to indicate whether the completion status of the operation. If an +operation completes successfully, SANE_STATUS_GOOD is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table 1. It is recommended to use function +sane_strstatus() to convert status codes into a legible +string. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +SANE_STATUS_GOOD + 0 Operation completed succesfully.
+SANE_STATUS_UNSUPPORTED + 1 Operation is not supported.
+SANE_STATUS_CANCELLED + 2 Operation was cancelled.
+SANE_STATUS_DEVICE_BUSY + 3 Device is busy---retry later.
+SANE_STATUS_INVAL + 4 Data or argument is invalid.
+SANE_STATUS_EOF + 5 No more data available (end-of-file).
+SANE_STATUS_JAMMED + 6 Document feeder jammed.
+SANE_STATUS_NO_DOCS + 7 Document feeder out of documents.
+SANE_STATUS_COVER_OPEN + 8 Scanner cover is open.
+SANE_STATUS_IO_ERROR + 9 Error during device I/O.
+SANE_STATUS_NO_MEM + 10 Out of memory.
+SANE_STATUS_ACCESS_DENIED + 11 Access to resource has been denied.
+ +
+

Table 1: Status Codes
+
+

+ +

4.2.8 Device Descriptor Type

+ +

Each SANE device is represented by a structure of type +SANE_Device. The C declaration of this type is given +below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const vendor;
+    SANE_String_Const model;
+    SANE_String_Const type;
+  }
+SANE_Device;
+
+
+ +The structure provides the unique name of the scanner in member +name. It is this unique name that should be passed in a call +to sane_open(). The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is recommended that backends keep +unique names below 32 characters in length. However, applications +must be able to cope with arbitrary length unique names. + +

The remaining members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members vendor, model, and type are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vendor Strings
+ + AGFA Minolta
+ Abaton Mitsubishi
+ Acer Mustek
+ Apple NEC
+ Artec Nikon
+ Avision Plustek
+ CANON Polaroid
+ Connectix Relisys
+ Epson Ricoh
+ Fujitsu Sharp
+ Hewlett-Packard Siemens
+ IBM Tamarack
+ Kodak UMAX
+ Logitech Noname
+ Microtek
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Type Strings
+ + film scanner
+ flatbed scanner
+ frame grabber
+ handheld scanner
+ multi-function peripheral
+ sheetfed scanner
+ still camera
+ video camera
+ virtual device
+ +
+ +

Table 2: Predefined Device Information Strings
+ +
+

+Note that vendor string Noname can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +

4.2.9 Option Descriptor Type

+ +

Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +SANE_Option_Descriptor type is given below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const title;
+    SANE_String_Const desc;
+    SANE_Value_Type type;
+    SANE_Unit unit;
+    SANE_Int size;
+    SANE_Int cap;
+    SANE_Constraint_Type constraint_type;
+    union
+      {
+        const SANE_String_Const *string_list;
+        const SANE_Word *word_list;
+        const SANE_Range *range;
+      }
+    constraint;
+  }
+SANE_Option_Descriptor;
+
+
+ +

4.2.9.1 Option Name

+ +

Member name is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (a--z), +digits (0--9), or the dash character (-) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +

4.2.9.2 Option Title

+ +

Member title is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +

4.2.9.3 Option Description

+ +

Member desc is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +

4.2.9.4 Option Value Type

+ +

Member type specifies the type of the option value. The +possible values for type SANE_Value_Type are described +in Table 3. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_TYPE_BOOL

0 Option value is of type + SANE_Bool.
+ +

SANE_TYPE_INT

1 Option value is of type + SANE_Int.
+ +

SANE_TYPE_FIXED

2 Option value is of type + SANE_Fixed.
+ +

SANE_TYPE_STRING

3 Option value is of type + SANE_String.
+ +

SANE_TYPE_BUTTON

4 An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper.
+ +

SANE_TYPE_GROUP

5 An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members title and +type are valid in the option descriptor.
+ +

+

+

Table 3: Option Value Types (SANE_Value_Type)
+ +
+

+ +

4.2.9.5 Option Value Unit

+ +

Member unit specifies what the physical unit of the option +value is. The possible values for type SANE_Unit are +described in Table 4. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_UNIT_NONE

0 Value is unit-less (e.g., page count).
+SANE_UNIT_PIXEL 1 Value is in number of pixels.
+SANE_UNIT_BIT 2 Value is in number of bits.
+SANE_UNIT_MM 3 Value is in millimeters.
+SANE_UNIT_DPI 4 Value is a resolution in dots/inch.
+SANE_UNIT_PERCENT 5 Value is a percentage.
+SANE_UNIT_MICROSECOND 6 Value is time in µ-seconds.
+ +

+

+

Table 4: Physical Units (SANE_Unit)
+ +
+

+ +

4.2.9.6 Option Value Size

+ +

Member size specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +

+
+
SANE_TYPE_STRING:
The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating NUL character is considered to be part of the + string. Note that the terminating NUL character must + always be present in string option values. +
SANE_TYPE_INT, SANE_TYPE_FIXED:
The size + must be a positive integer multiple of the size of a + SANE_Word. The option value is a vector of length + +

+

+ size/sizeof(SANE_Word).
+

+

SANE_TYPE_BOOL:
The size must be set to + sizeof(SANE_Word). +
SANE_TYPE_BUTTON, SANE_TYPE_GROUP:
The + option size is ignored. +
+
+ +

4.2.9.7 Option Capabilities

+ +

Member cap describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table 5. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +

+
+ +

SANE_OPTION_IS_ACTIVE(cap):
This macro + returns SANE_TRUE if and only if the option with the + capability set cap is currently active. + +

SANE_OPTION_IS_SETTABLE(cap):
This + macro returns SANE_TRUE if and only if the option with the + capability set cap is software settable. +
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_CAP_SOFT_SELECT

1 The option + value can be set by a call to sane_control_option().
+ +

SANE_CAP_HARD_SELECT

2 The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE_CAP_SOFT_SELECT (either one of them can be set, but not both + simultaneously).
+ +

SANE_CAP_SOFT_DETECT

4 The option + value can be detected by software. If + SANE_CAP_SOFT_SELECT is set, this capability must + be set. If SANE_CAP_HARD_SELECT is set, this capability + may or may not be set. If this capability is set but neither + SANE_CAP_SOFT_SELECT nor SANE_CAP_HARD_SELECT + are, then there is no way to control the option. That is, the + option provides read-out of the current value only.
+ +

SANE_CAP_EMULATED

8 If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option.
+ +

SANE_CAP_AUTOMATIC

16 If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling sane_control_option() + with an action value of SANE_ACTION_SET_AUTO.
+ +

SANE_CAP_INACTIVE

32 If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value).
+ +

SANE_CAP_ADVANCED

64 + If set, this capability indicates that the option should be + considered an ``advanced user option.'' A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). +
+ +

+

+

Table 5: Option Capabilities
+ +
+

+ +

4.2.9.8 Option Value Constraints

+ +

It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member constraint_type indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member constraint. The possible values of type +SANE_Constraint_Type and the interpretation of the +constraint union is described in Table 6. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_CONSTRAINT_NONE

0 The value is unconstrained. + The option can take any of the values possible for the option's + type.
+ +

SANE_CONSTRAINT_RANGE

1 This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member constraint.range points to + a range of the type SANE_Range. This type is illustrated + below: +
+
+typedef struct
+  {
+    SANE_Word min;
+    SANE_Word max;
+    SANE_Word quant;
+  }
+SANE_Range;
+
+
+ All three members in this structure are interpreted according to the + option value type (SANE_TYPE_INT or SANE_TYPE_FIXED). + Members min and max specify the minimum and maximum + values, respectively. If member quant is non-zero, it + specifies the quantization value. If l is the minimum value, u + the maximum value and q the (non-zero) quantization of a range, + then the legal values are v=k*q+l for all non-negative + integer values of k such that v<=u.
+ +

SANE_CONSTRAINT_WORD_LIST

2 This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + constraint.word_list points to a list of words that + enumerates the legal values. The first element in that list is an + integer (SANE_Int) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (SANE_TYPE_INT or SANE_TYPE_FIXED).
+ +

SANE_CONSTRAINT_STRING_LIST

3 This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + constraint.string_list points to a NULL terminated + list of strings that enumerate the legal values for the option + value. +
+
+

Table 6: Option Value Constraints
+ +
+

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc012.html b/html/doc012.html new file mode 100644 index 00000000..9bf80bd2 --- /dev/null +++ b/html/doc012.html @@ -0,0 +1,666 @@ + +Next +Up +Previous +Contents +Index +
+ +Operations +

4.3 Operations

+ +

4.3.1 sane_init

+ +

This function must be called before any other SANE function can be called. +The behavior of a SANE backend is undefined if this function is not called +first or if the status code returned by sane_init is different from +SANE_STATUS_GOOD. The version code of the backend is returned +in the value pointed to by version_code. If that pointer is +NULL, no version code is returned. Argument authorize is either +a pointer to a function that is invoked when the backend requires +authentication for a specific resource or NULL if the frontend does not +support authentication. +

+
+SANE_Status sane_init (SANE_Int * version_code,
+                       SANE_Authorization_Callback authorize);
+
+
+ +

The authorization function may be called by a backend in response to +any of the following calls: +

+ sane_open, sane_control_option, sane_start +
+If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +

The authentication function type has the following declaration: +

+ +
+#define SANE_MAX_USERNAME_LEN   128
+#define SANE_MAX_PASSWORD_LEN   128
+
+typedef void (*SANE_Authorization_Callback)
+    (SANE_String_Const resource,
+     SANE_Char username[SANE_MAX_USERNAME_LEN],
+     SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+
+
+Three arguments are passed to the authorization function: +resource is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The username +and password arguments are (pointers to) an array of +SANE_MAX_USERNAME_LEN and SANE_MAX_PASSWORD_LEN +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +must be ASCII-NUL terminated. + +

4.3.2 sane_exit

+ +

This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to sane_close(), but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than sane_init() may be called (regardless +of the status value returned by sane_exit(). Neglecting to +call this function may result in some resources not being released +properly. +

+
+void sane_exit (void);
+
+
+ +

4.3.3 sane_get_devices

+ +

This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a NULL terminated array of pointers to SANE_Device +structures in *device_list. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to sane_exit() is performed. This +function can be called repeatedly to detect when new devices become +available. If argument local_only is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +

+
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+                              SANE_Bool local_only);
+
+
+ +

This function may fail with SANE_STATUS_NO_MEM if an +insufficient amount of memory is available. + +

+
+ Backend Implementation Note +
+ SANE does not require that this function is called before a + sane_open() call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. +
+ +

4.3.4 sane_open

+ +

This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +name. If the call completes successfully, a handle for the +device is returned in *h. As a special case, specifying a +zero-length string as the device requests opening the first available +device (if there is such a device). +

+
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h);
+
+
+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_DEVICE_BUSY:
The device is currently + busy (in use by somebody else). +
SANE_STATUS_INVAL:
The device name is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.5 sane_close

+ +

This function terminates the association between the device handle +passed in argument h and the device it represents. If the +device is presently active, a call to sane_cancel() is +performed first. After this function returns, handle h must +not be used anymore. + +

+
+void sane_close (SANE_Handle h);
+
+
+ +

4.3.6 sane_get_option_descriptor

+ +

This function is used to access option descriptors. The function +returns the option descriptor for option number n of the device +represented by handle h. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle h (the count +includes option 0). If n is not a valid option index, the function +returns NULL. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +

+
+const SANE_Option_Descriptor *
+    sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+
+
+ +

4.3.7 sane_control_option

+ +

This function is used to set or inquire the current value of option +number n of the device represented by handle h. The +manner in which the option is controlled is specified by parameter +a. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +v. It is a pointer to the memory that holds the option value. +The memory area pointed to by v must be big enough to hold the +entire option value (determined by member size in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument v may be shorter since the backend will stop +reading the option value upon encountering the first NUL +terminator in the string. If argument i is not NULL, +the value of *i will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +

+
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+                                 SANE_Action a, void *v,
+                                 SANE_Int * i);
+
+
+ +

The way the option is affected by a call to this function is +controlled by parameter a which is a value of type +SANE_Action. The possible values and their meaning is +described in Table 7. + +

+

+ + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_ACTION_GET_VALUE

0 Get current option value.
+ +

SANE_ACTION_SET_VALUE

1 Set option value. The + option value passed through argument v may be modified by the + backend if the value cannot be set exactly.
+ +

SANE_ACTION_SET_AUTO

2 Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter v is completely ignored in this case and + may be NULL.
+ +

+

+

Table 7: Action Values (SANE_Action)
+ +
+

+ +

After setting a value via an action value of +SANE_ACTION_SET_VALUE, additional information on how well the +request has been met is returned in *i (if i is +non-NULL). The returned value is a bitset that may contain any +combination of the values described in Table 8. +

+

+ + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_INFO_INEXACT

1 This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in *i has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value.
+ +

SANE_INFO_RELOAD_OPTIONS

2 The setting of an + option may affect the value or availability of one or more + other options. When this happens, the SANE backend sets this + member in *i to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed.
+ +

SANE_INFO_RELOAD_PARAMS

4 The setting of an option may + affect the parameter values (see sane_get_parameters()). + If setting an option affects the parameter values, this member will + be set in *i. Note that this member may be set even if the + parameters did not actually change. However, it is guaranteed that + the parameters never change without this member being set.
+ +

+

+

Table 8: Additional Information Returned When Setting an Option
+ +
+

+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_UNSUPPORTED:
The operation is not + supported for the specified handle and option number. +
SANE_STATUS_INVAL:
The option value is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the option has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.8 sane_get_parameters

+ +

This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (sane_start() has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +sane_start() gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle h of the device for which the +parameters should be obtained and a pointer p to a parameter +structure. The parameter structure is described in more detail below. + +

+
+SANE_Status sane_get_parameters (SANE_Handle h,
+                                 SANE_Parameters * p);
+
+
+ +

The scan parameters are returned in a structure of type +SANE_Parameters. The C declaration of this structure +is given below. +

+
+typedef struct
+  {
+    SANE_Frame format;
+    SANE_Bool last_frame;
+    SANE_Int lines;
+    SANE_Int depth;
+    SANE_Int pixels_per_line;
+    SANE_Int bytes_per_line;
+  }
+SANE_Parameters;
+
+
+ +

Member format specifies the format of the next frame to be +returned. The possible values for type SANE_Frame are +described in Table 9. The meaning of these +values is described in more detail in Section 3.2. +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_FRAME_GRAY

0 Band covering human visual range.
+SANE_FRAME_RGB 1 Pixel-interleaved red/green/blue bands.
+SANE_FRAME_RED 2 Red band of a red/green/blue image.
+SANE_FRAME_GREEN 3 Green band of a red/green/blue image.
+SANE_FRAME_BLUE 4 Blue band of a red/green/blue image.
+ +

+

+

Table 9: Frame Format (SANE_Frame)
+ +
+

+ +

Member last_frame is set to SANE_TRUE if and only if +the frame that is currently being acquired (or the frame that will be +acquired next if there is no current frame) is the last frame of a +multi frame image (e.g., the current frame is the blue component of a +red, green, blue image). + +

Member lines specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call sane_read() until it +returns a status of SANE_STATUS_EOF. + +

Member bytes_per_line specifies the number of bytes that +comprise one scan line. + +

Member depth specifies the number of bits per sample. + +

Member pixels_per_line specifies the number of pixels that +comprise one scan line. + +

Assume B is the number of channels in the frame, then the bit depth +d (as given by member depth) and the number of pixels per +line n (as given by this member pixels_per_line) are +related to c, the number of bytes per line (as given by member +bytes_per_line) as follows: + +

+

+ + c >= \left{ + ll + \lceil B*n / 8\rceil if d=1 +(1) + + B*n *\lceil (d + 7)/8 \rceil if d>1 + + \right. +
+

+Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +

4.3.9 sane_start

+ +

This function initiates aquisition of an image from the device +represented by handle h. +

+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes. +
+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_DEVICE_BUSY:
The device is busy. The + operation should be retried later. +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_INVAL:
The scan cannot be started with the current + set of options. The frontend should reload the option descriptors, as if + SANE_INFO_RELOAD_OPTIONS had been returned from a call to + sane_control_option(), since the device's capabilities may have + changed. +
+
+ +

4.3.10 sane_read

+ +

This function is used to read image data from the device represented +by handle h. Argument buf is a pointer to a memory area +that is at least maxlen bytes long. The number of bytes +returned is stored in *len. A backend must set this to zero +when a status other than SANE_STATUS_GOOD is returned. +When the call succeeds, the number of bytes returned can be anywhere in +the range from 0 to maxlen bytes. +

+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+                       SANE_Int maxlen, SANE_Int * len);
+
+
+If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle h. +
    +
  1. If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +

  2. If the device is in non-blocking I/O mode, the call returns + immediately with status SANE_STATUS_GOOD and with + *len set to zero. +
+The I/O mode of handle h can be set via a call to +sane_set_io_mode(). + +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_EOF:
No more data is available for the + current frame. +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.11 sane_cancel

+ +

This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +h. +

+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does not imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been initiated. Cancellation +completes only when the cancelled call returns (typically with a +status value of SANE_STATUS_CANCELLED). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must not call any other operation until the +cancelled operation has returned. + +

4.3.12 sane_set_io_mode

+ +

This function is used to set the I/O mode of handle h. The I/O mode +can be either blocking or non-blocking. If argument m is +SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to +blocking mode. This function can be called only after a call to +sane_start() has been performed. +

+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value SANE_STATUS_UNSUPPORTED is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument m set to SANE_FALSE is guaranteed to complete +successfully. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support + the requested I/O mode. +
+
+ +

4.3.13 sane_get_select_fd

+ +

This function is used to obtain a (platform-specific) file-descriptor +for handle h that is readable if and only if image data is +available (i.e., when a call to sane_read() will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in *fd. +

+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start() +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until sane_cancel() or sane_start() get called again +or until sane_read() returns with status +SANE_STATUS_EOF). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +sane_read() call would return SANE_STATUS_EOF. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call sane_read(). + +

A backend may elect not to support this operation. In such a case, +the function returns with status code +SANE_STATUS_UNSUPPORTED. + +

Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using select() +or poll() under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to sane_read() is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support + this operation. +
+
+ +

4.3.14 sane_strstatus

+ +

This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return NULL. +The returned pointer is valid at least until the next call to this +function is performed. +

+
+const SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc013.html b/html/doc013.html new file mode 100644 index 00000000..3e6ad5dd --- /dev/null +++ b/html/doc013.html @@ -0,0 +1,99 @@ + +Next +Up +Previous +Contents +Index +
+ +Code Flow +

4.4 Code Flow

+ +

The code flow for the SANE API is illustrated in +Figure 4. Functions sane_init() and +sane_exit() initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +

+

+ + +

Figure 4: Code flow
+ +
+

+ +

Function sane_get_devices() can be called any time after +sane_init() has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +

Once a device has been chosen, it is opened using a call to +sane_open(). Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +

An opened device can be setup through the corresponding device handle +using functions sane_get_option_descriptor() and +sane_control_option(). While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. However, as options are set, other options +may become active or inactive. Thus, after setting an option, it +maybe necessary to re-read some or all option descriptors. While +setting up the device, it is also admissible to call +sane_get_parameters() to get an estimate of what the image +parameters will look like once image acquisition begins. + +

The device handle can be put in blocking or non-blocking mode by a +call to sane_set_io_mode(). Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +

After the device is setup properly, image acquisition can be started +by a call to sane_start(). The backend calculates the exact +image parameters at this point. So future calls to +sane_get_parameters() will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to sane_read() is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +sane_set_io_mode() and/or sane_get_select_fd() at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +

Image data is collected by repeatedly calling sane_read(). +Eventually, this function will return an end-of-file status +(SANE_STATUS_EOF). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels in of a red/green/blue image or multiple images), +it can call sane_start() again. Once all desired frames have +been acquired, function sane_cancel() must be called. This +operation can also be called at any other time to cancel a pending +operation. Note that sane_cancel() must be called even if the +last read operation returned SANE_STATUS_EOF. + +

When done using the device, the handle should be closed by a call to +sane_close(). Finally, before exiting the application, +function sane_exit() must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc014.html b/html/doc014.html new file mode 100644 index 00000000..8e4f4159 --- /dev/null +++ b/html/doc014.html @@ -0,0 +1,145 @@ + +Next +Up +Previous +Contents +Index +
+ +Well-Known Options +

4.5 Well-Known Options

+ +

While most backend options are completely self-describing, there are a +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan) of the scanner surface and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +

4.5.1 Option Number Count

+ +

Option number 0 has an empty string as its name. The value of this +option is of type SANE_TYPE_INT and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +sane_get_option_descriptor() returns NULL, or a +frontend can directly read out the value of option number 0. + +

4.5.2 Scan Resolution Option

+ +

Option resolution is used to select the resolution at which an +image should be acquired. The type of this option is either +SANE_TYPE_INT or SANE_TYPE_FIXED. The unit is +SANE_UNIT_DPI (dots/inch). + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +

4.5.3 Preview Mode Option

+ +

The boolean option preview is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to SANE_TRUE, +preview mode is in effect, when set to SANE_FALSE image +acquisition should proceed in normal quality mode. The setting of +this option must not affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option resolution). A backend is free to override the +resolution value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +

4.5.4 Scan Area Options

+ +

The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure 5. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the smallest and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the largest. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +

+

+ + +

Figure 5: Scan area options
+ +
+

+ +

The names of the four options that define the scan area are given in +the table below: +

+ + + + + + + + + + + + + + + + + + +
+Name Description
+tl-x Top-left x coordinate value
+tl-y Top-left y coordinate value
+br-x Bottom-right x coordinate value
+br-y Bottom-right y coordinate value
+
+
+There are several rules that should be followed by front and backends +regarding these options: + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc015.html b/html/doc015.html new file mode 100644 index 00000000..9f831204 --- /dev/null +++ b/html/doc015.html @@ -0,0 +1,82 @@ + +Next +Up +Previous +Contents +Index +
+ +Network Protocol +

5 Network Protocol

+ +

The SANE interface has been designed to facilitate network access to +image acquisition devices. In particular, most SANE implementations +are expected to support a network backend (net client) and a +corresponding network daemon (net server) that allows accessing image +acquisition devices through a network connection. Network access is +useful in several situations: +

+ +

The network protocol described in this chapter has been design with +the following goals in mind: +

    + +

  1. Image transmission should be efficient (have low encoding + overhead). + +

  2. Accessing option descriptors on the client side must be + efficient (since this is a very common operation). + +

  3. Other operations, such as setting or inquiring the value of an + option are less performance critical since they typically require + explicit user action. + +

  4. The network protocol should be simple and easy to implement on + any host architecture and any programming language. + +

+The SANE protocol can be run across any transport protocol that +provides reliable data delivery. While SANE does not specify a +specific transport protocol, it is expected that TCP/IP will be among +the most commonly used protocols. + +

5.1 Data Type Encoding

5.2 Remote Procedure Call Requests


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc016.html b/html/doc016.html new file mode 100644 index 00000000..2479d6dd --- /dev/null +++ b/html/doc016.html @@ -0,0 +1,89 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Type Encoding +

5.1 Data Type Encoding

+ +

5.1.1 Primitive Data Types

+ +

The four primitive types of the SANE standard are encoded as follows: +

+ +

SANE_Byte:
A byte is encoded as an 8 bit value. + Since the transport protocol is assumed to be byte-orientd, the bit + order is irrelevant. + +

SANE_Word:
A word is encoded as 4 bytes (32 + bits). The bytes are ordered from most-significant to + least-significant byte (big-endian byte-order). + +

SANE_Char:
A character is currently encoded as an 8-bit + ISO LATIN-1 value. An extension to support wider character sets (16 or 32 + bits) is planned for the future, but not supported at this point. + +

SANE_String:
A string pointer is encoded as a + SANE_Char array. The trailing NUL byte is considered part + of the array and a NULL pointer is encoded as a zero-length + array. + +
SANE_Handle:
A handle is encoded like a word. + The network backend needs to take care of converting these integer + values to the opaque pointer values that are presented to the user + of the network backend. Similarly, the SANE daemon needs to take + care of converting the opaque pointer values it receives from its + backends into 32-bit integers suitable for use for network encoding. + +

enumeration types:
Enumeration types are encoded + like words. + +

+ +

5.1.2 Type Constructors

+ +

Closely following the type constructors of the C language, the SANE network +protocol supports the following four constructors: +

+ +

pointer:
A pointer is encoded by a word that indicates + whether the pointer is a NULL-pointer which is then followed by the + value that the pointer points to (in the case of a non-NULL pointer; + in the case of a NULL pointer, no bytes are encoded for the pointer + value). + +

array:
An array is encoded by a word that indicates + the length of the array followed by the values of the elements in + the array. The length may be zero in which case no bytes are + encoded for the element values. + +

structure:
A structure is encoded by simply encoding the + structure members in the order in which they appear in the + corresponding C type declaration. + +

union:
A union must always be accompanied by a tag + value that indicates which of the union members is the currently the + active one. For this reason, the union itself is encoded simply by + encoding the value of the currently active member. + +

+ +

Note that for type constructors, the pointer, element, or member +values themselves may have a constructed type. Thus, the above rules +should be applied recursively until a sequence of primitive types has +been found. + +

Also SANE had no need for encoding of circular structures. This +greatly simplifies the network protocol. + +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc017.html b/html/doc017.html new file mode 100644 index 00000000..208007ac --- /dev/null +++ b/html/doc017.html @@ -0,0 +1,460 @@ + +Next +Up +Previous +Contents +Index +
+ +Remote Procedure Call Requests +

5.2 Remote Procedure Call Requests

+ +

The SANE network protocol is a client/server-style remote procedure +call (RPC) protocol. This means that all activity is initiated by the +client side (the network backend)---a server is restricted to +answering request by the client. + +

5.2.1 SANE_NET_INIT

+ +

This RPC establishes a connection to a particular SANE network daemon. +It must be the first call in a SANE network session. The parameter +and reply arguments for this call are shown in the table below: +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word version_code SANE_Word status
+ SANE_String user_name SANE_Word version_code
+
+
+The version_code argument in the request is the SANE +version-code of the network backend that is contacting the network +daemon (see Section 4.1). The +``build-revision'' in the version code is used to hold the network +protocol version. The SANE network daemon receiving such a request +must make sure that the network protocol version corresponds to a +supported version since otherwise the encoding of the network stream +may be incompatible (even though the SANE interface itself may be +compatible). The user_name argument is the name of the user +on whose behalf this call is being performed. If the network backend +cannot determine a user-name, it passes a NULL pointer for this +argument. No trust should be placed in the authenticity of this +user-name. The intent of this string is to provide more convenience +to the user. E.g., it could be used as the default-user name in +subsequent authentication calls. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values.2 The version_code argument returns the +SANE version-code that the network daemon supports. See the comments +in the previous paragraph on the meaning of the build-revision in this +version code. + +

5.2.2 SANE_NET_GET_DEVICES

+ +

This RPC is used to obtain the list of devices accessible by the SANE +daemon. +

+ + + + + + + + + + + + +
+ request: reply:
+ void SANE_Word status
+ SANE_Device ***device_list
+
+
+There are no arguments in the request for this call. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The device_list +argument is a pointer to a NULL-terminated array of +SANE_Device pointers. + +

5.2.3 SANE_NET_OPEN

+ +

This RPC is used to open a connection to a remote SANE device. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String device_name SANE_Word status
+ SANE_Word handle
+ SANE_String resource
+
+
+The device_name argument specifies the name of the device to +open. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The handle +argument specifies the device handle that uniquely identifies the +connection. The resource argument is used to request +authentication. If it has a non-NULL value, the network +backend should authenticate the specified resource and then retry this +operation (see Section 5.2.10 for details on how to +authorize a resource). + +

5.2.4 SANE_NET_CLOSE

+ +

This RPC is used to close a connection to a remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection that should be +closed. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS

+ +

This RPC is used to obtain all the option descriptors for a +remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle Option_Descriptor_Array odesc
+
+
+The handle argument identifies the remote device whose option +descriptors should be obtained. + +

In the reply, the odesc argument is used to return the array of +option descriptors. The option descriptor array has the following +structure: +

+
+struct Option_Descriptor_Array
+  {
+    SANE_Word num_options;
+    SANE_Option_Descriptor **desc;
+  };
+
+
+ +

5.2.6 SANE_NET_CONTROL_OPTION

+ +

This RPC is used to control (inquire, set, or set to automatic) a +specific option of a remote SANE device. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word option SANE_Word info
+ SANE_Word action SANE_Word value_type
+ SANE_Word value_type SANE_Word value_size
+ SANE_Word value_size void *value
+ void *value SANE_String *resource
+
+
+The handle argument identifies the remote device whose option +should be controlled. Argument option is the number (index) of +the option that should be controlled. Argument action +specifies what action should be taken (get, set, or set automatic). +Argument value_type specifies the type of the option value +(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT, +SANE_TYPE_FIXED, SANE_TYPE_STRING, +SANE_TYPE_BUTTON). Argument value_size specifies +the size of the option value in number of bytes (see +Section 4.2.9.6 for the precise meaning of this value). +Finally, argument value is a pointer to the option value. It +must be a writeable area that is at least value_size bytes +large. (Note that this area must be writable even if the action is to +set the option value. This is because the backend may not be able to +set the exact option value, in which case the option value is used to +return the next best value that the backend has chosen.) + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has undefined +values. The info argument returns the information on how well +the backend was able to satisfy the request. For details, see the +description of the corresponding argument in +Section 4.3.7. Arguments value_type and +value_size have the same values as the arguments by the same +name in corresponding request. The values are repeated here to ensure +that both the request and the reply are self-contained (i.e., they can +be encoded and decoded independently). Argument value is holds +the value of the option that has become effective as a result of this +RPC. + +

5.2.7 SANE_NET_GET_PARAMETERS

+ +

This RPC is used to obtain the scan parameters of a remote SANE +device. +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Parameters params
+
+
+The handle argument identifies the connection to the remote +device whose scan parameters should be returned. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The argument +params is used to return the scan parameters. + +

5.2.8 SANE_NET_START

+ +

This RPC is used to start image acquisition (scanning). +

+ + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word port
+ SANE_Word byte_order
+ SANE_String resource
+
+
+The handle argument identifies the connection to the remote +device from which the image should be acquired. + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument, status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has +undefined values. The argument port returns the port number +from which the image data will be available. To read the image data, +a network client must connect to the remote host at the indicated port +number. Through this port, the image data is transmitted as a +sequence of data records. Each record starts with the data length in +bytes. The data length is transmitted as a sequence of four bytes. +These bytes should be interpreted as an unsigned integer in big-endian +format. The four length bytes are followed by the number of data +bytes indicated by the length. Except for byte-order, the data is in +the same format as defined for sane_read(). Since some +records may contain no data at all, a length value of zero is +perfectly valid. The special length value of 0xffffffff is +used to indicate the end of the data stream. That is, after receiving +a record length of 0xffffffff, the network client should close +the data connection and stop reading data. + +

Argument byte_order specifies the byte-order of the image +data. A value of 0x1234 indicates little-endian format, a value of +0x4321 indicates big-endian format. All other values are presently +undefined and reserved for future enhancements of this protocol. The +intent is that a network server sends data in its own byte-order and +the client is responsible for adjusting the byte-order, if necessary. +This approach causes no unnecessary overheads in the case where the +server and client byte-order match and puts the extra burden on the +client side when there is a byte-order mismatch. Putting the burden +on the client-side improves the scalability properties of this +protocol. + +

5.2.9 SANE_NET_CANCEL

+ +

This RPC is used to cancel the current operation of a remote SANE +device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection whose operation +should be cancelled. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.10 SANE_NET_AUTHORIZE

+ + +

This RPC is used to pass authorization data from the net client to the +net server. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String resource SANE_Word dummy
+ SANE_String username
+ SANE_String password
+
+
+The resource argument specifies the name of the resource to be +authorized. This argument should be set to the string returned in the +resource argument of the RPC reply that required this +authorization call. The username and password are the +name of the user that is accessing the resource and the password for +the specified resource/user pair. + +

Since the password is not encrypted during network transmission, it is +recommended to use the following extension: + +

If the server adds the string `$MD5$' to the resource-name followed +by a random string not longer then 128 bytes, the client may answer with the +MD5 digest of the concatenation of the password and the random string. To +differentiate between the MD5 digest and a strange password the client prepends +the MD5 digest with the string `$MD5$'. + +

In the reply, dummy is completely unused. Note that there is +no direct failure indication. This is unnecessary since a net client +will retry the RPC that resulted in the authorization request until +that call succeeds (or until the request is cancelled). The RPC that resulted +in the authorization request continues after the reply from the client and may +fail with SANE_STATUS_ACCESS_DENIED. + +

5.2.11 SANE_NET_EXIT

+ +

This RPC is used to disconnect a net client from a net server. There +are no request or reply arguments in this call. As a result of this +call, the connection between the client and the server that was +established by the SANE_NET_INIT call will be closed. + +

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc018.html b/html/doc018.html new file mode 100644 index 00000000..5dcf753a --- /dev/null +++ b/html/doc018.html @@ -0,0 +1,43 @@ + +Next +Up +Previous +Contents +Index +
+ +Contact Information +

6 Contact Information

+ +

The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +

+
+sane-devel-request@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the +above address. + +

A complete list of commands supported can be obtained by sending a +mail with a subject of ``help'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +

+http://www.mostang.com/sane/ +
+ +

+ + + +

+


+
Next +Up +Previous +Contents +Index +
+ diff --git a/html/doc019.html b/html/doc019.html new file mode 100644 index 00000000..76b598fb --- /dev/null +++ b/html/doc019.html @@ -0,0 +1,186 @@ + +Previous +Up +Previous +Contents +Index +
+

Index

+ + +

+

array
+ +

br-x
+br-y
+ +

code flow
+ +

device-name
+domain
+ +

enumeration types
+ +

image data format
+ +

mailing list
+ +

network authorization
+NUL
+ +

option count
+Option_Descriptor_Array
+ +

password
+pointer
+preview mode
+ +

resolution option
+ +

SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+structure
+ +

tl-x
+tl-y
+Type Strings
+ +

union
+username
+ +

Vendor Strings
+ +

well-known options
+


+Previous +Up +Previous +Contents +Index +
+ diff --git a/html/footnotes.html b/html/footnotes.html new file mode 100644 index 00000000..6478c6a8 --- /dev/null +++ b/html/footnotes.html @@ -0,0 +1,7 @@ +Footnotes

Footnotes

+ +


1 This is different from ANSI C where + any non-zero integer value represents logical TRUE. +


2 The sane network + daemon should be careful not to leak information in the undefined + portion of the reply. diff --git a/html/img000.gif b/html/img000.gif new file mode 100644 index 00000000..e69de29b diff --git a/html/img001.gif b/html/img001.gif new file mode 100644 index 00000000..e69de29b diff --git a/html/img002.gif b/html/img002.gif new file mode 100644 index 00000000..e69de29b diff --git a/html/img003.gif b/html/img003.gif new file mode 100644 index 00000000..e69de29b diff --git a/html/img004.gif b/html/img004.gif new file mode 100644 index 00000000..e69de29b diff --git a/html/index.html b/html/index.html new file mode 100644 index 00000000..fbae5a87 --- /dev/null +++ b/html/index.html @@ -0,0 +1,56 @@ + +Next +Up +Previous +Contents +Index +


+./sane + + +

+ +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ + +

SANE Standard Version 1.03

+
+
2003-02-22
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane.ps b/sane.ps new file mode 100644 index 00000000..30c5a11f --- /dev/null +++ b/sane.ps @@ -0,0 +1,4845 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software +%%Title: sane.dvi +%%Pages: 48 +%%PageOrder: Ascend +%%BoundingBox: 0 0 596 842 +%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic CMSY10 +%%+ CMR10 CMR8 CMMI10 CMTT10 CMEX10 Times-BoldItalic +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: /usr/bin/dvips sane.dvi -o sane.ps +%DVIPSParameters: dpi=600, compressed +%DVIPSSource: TeX output 2003.09.23:1836 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +%%BeginProcSet: 8r.enc +% File 8r.enc as of 2002-03-12 for PSNFSS 9 +% +% This is the encoding vector for Type1 and TrueType fonts to be used +% with TeX. This file is part of the PSNFSS bundle, version 9 +% +% Authors: S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry, W. Schmidt +% +% Idea is to have all the characters normally included in Type 1 fonts +% available for typesetting. This is effectively the characters in Adobe +% Standard Encoding + ISO Latin 1 + extra characters from Lucida + Euro. +% +% Character code assignments were made as follows: +% +% (1) the Windows ANSI characters are almost all in their Windows ANSI +% positions, because some Windows users cannot easily reencode the +% fonts, and it makes no difference on other systems. The only Windows +% ANSI characters not available are those that make no sense for +% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen +% (173). quotesingle and grave are moved just because it's such an +% irritation not having them in TeX positions. +% +% (2) Remaining characters are assigned arbitrarily to the lower part +% of the range, avoiding 0, 10 and 13 in case we meet dumb software. +% +% (3) Y&Y Lucida Bright includes some extra text characters; in the +% hopes that other PostScript fonts, perhaps created for public +% consumption, will include them, they are included starting at 0x12. +% +% (4) Remaining positions left undefined are for use in (hopefully) +% upward-compatible revisions, if someday more characters are generally +% available. +% +% (5) hyphen appears twice for compatibility with both ASCII and Windows. +% +% (6) /Euro is assigned to 128, as in Windows ANSI +% +/TeXBase1Encoding [ +% 0x00 (encoded characters from Adobe Standard not in Windows 3.1) + /.notdef /dotaccent /fi /fl + /fraction /hungarumlaut /Lslash /lslash + /ogonek /ring /.notdef + /breve /minus /.notdef +% These are the only two remaining unencoded characters, so may as +% well include them. + /Zcaron /zcaron +% 0x10 + /caron /dotlessi +% (unusual TeX characters available in, e.g., Lucida Bright) + /dotlessj /ff /ffi /ffl + /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef + % very contentious; it's so painful not having quoteleft and quoteright + % at 96 and 145 that we move the things normally found there down to here. + /grave /quotesingle +% 0x20 (ASCII begins) + /space /exclam /quotedbl /numbersign + /dollar /percent /ampersand /quoteright + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +% 0x30 + /zero /one /two /three /four /five /six /seven + /eight /nine /colon /semicolon /less /equal /greater /question +% 0x40 + /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O +% 0x50 + /P /Q /R /S /T /U /V /W + /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +% 0x60 + /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o +% 0x70 + /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /asciitilde + /.notdef % rubout; ASCII ends +% 0x80 + /Euro /.notdef /quotesinglbase /florin + /quotedblbase /ellipsis /dagger /daggerdbl + /circumflex /perthousand /Scaron /guilsinglleft + /OE /.notdef /.notdef /.notdef +% 0x90 + /.notdef /.notdef /.notdef /quotedblleft + /quotedblright /bullet /endash /emdash + /tilde /trademark /scaron /guilsinglright + /oe /.notdef /.notdef /Ydieresis +% 0xA0 + /.notdef % nobreakspace + /exclamdown /cent /sterling + /currency /yen /brokenbar /section + /dieresis /copyright /ordfeminine /guillemotleft + /logicalnot + /hyphen % Y&Y (also at 45); Windows' softhyphen + /registered + /macron +% 0xD0 + /degree /plusminus /twosuperior /threesuperior + /acute /mu /paragraph /periodcentered + /cedilla /onesuperior /ordmasculine /guillemotright + /onequarter /onehalf /threequarters /questiondown +% 0xC0 + /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla + /Egrave /Eacute /Ecircumflex /Edieresis + /Igrave /Iacute /Icircumflex /Idieresis +% 0xD0 + /Eth /Ntilde /Ograve /Oacute + /Ocircumflex /Otilde /Odieresis /multiply + /Oslash /Ugrave /Uacute /Ucircumflex + /Udieresis /Yacute /Thorn /germandbls +% 0xE0 + /agrave /aacute /acircumflex /atilde + /adieresis /aring /ae /ccedilla + /egrave /eacute /ecircumflex /edieresis + /igrave /iacute /icircumflex /idieresis +% 0xF0 + /eth /ntilde /ograve /oacute + /ocircumflex /otilde /odieresis /divide + /oslash /ugrave /uacute /ucircumflex + /udieresis /yacute /thorn /ydieresis +] def + +%%EndProcSet +%%BeginProcSet: bbad153f.enc +% Thomas Esser, Dec 2002. public domain +% +% Encoding for: +% cmsy10 cmsy5 cmsy6 cmsy7 cmsy8 cmsy9 +% +/TeXbbad153fEncoding [ +/minus /periodcentered /multiply /asteriskmath /divide /diamondmath +/plusminus /minusplus /circleplus /circleminus /circlemultiply +/circledivide /circledot /circlecopyrt /openbullet /bullet +/equivasymptotic /equivalence /reflexsubset /reflexsuperset /lessequal +/greaterequal /precedesequal /followsequal /similar /approxequal +/propersubset /propersuperset /lessmuch /greatermuch /precedes /follows +/arrowleft /arrowright /arrowup /arrowdown /arrowboth /arrownortheast +/arrowsoutheast /similarequal /arrowdblleft /arrowdblright /arrowdblup +/arrowdbldown /arrowdblboth /arrownorthwest /arrowsouthwest /proportional +/prime /infinity /element /owner /triangle /triangleinv /negationslash +/mapsto /universal /existential /logicalnot /emptyset /Rfractur /Ifractur +/latticetop /perpendicular /aleph /A /B /C /D /E /F /G /H /I /J /K +/L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /union /intersection +/unionmulti /logicaland /logicalor /turnstileleft /turnstileright +/floorleft /floorright /ceilingleft /ceilingright /braceleft /braceright +/angbracketleft /angbracketright /bar /bardbl /arrowbothv /arrowdblbothv +/backslash /wreathproduct /radical /coproduct /nabla /integral +/unionsq /intersectionsq /subsetsqequal /supersetsqequal /section +/dagger /daggerdbl /paragraph /club /diamond /heart /spade /arrowleft +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/minus /periodcentered /multiply /asteriskmath /divide /diamondmath +/plusminus /minusplus /circleplus /circleminus /.notdef /.notdef +/circlemultiply /circledivide /circledot /circlecopyrt /openbullet +/bullet /equivasymptotic /equivalence /reflexsubset /reflexsuperset +/lessequal /greaterequal /precedesequal /followsequal /similar +/approxequal /propersubset /propersuperset /lessmuch /greatermuch +/precedes /follows /arrowleft /spade /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +] def + +%%EndProcSet +%%BeginProcSet: f7b6d320.enc +% Thomas Esser, Dec 2002. public domain +% +% Encoding for: +% cmb10 cmbx10 cmbx12 cmbx5 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10 +% cmdunh10 cmr10 cmr12 cmr17cmr6 cmr7 cmr8 cmr9 cmsl10 cmsl12 cmsl8 +% cmsl9 cmss10cmss12 cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10 +% cmssi12 cmssi17 cmssi8cmssi9 cmssq8 cmssqi8 cmvtt10 +% +/TeXf7b6d320Encoding [ +/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega +/ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve +/macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash +/suppress /exclam /quotedblright /numbersign /dollar /percent /ampersand +/quoteright /parenleft /parenright /asterisk /plus /comma /hyphen +/period /slash /zero /one /two /three /four /five /six /seven /eight +/nine /colon /semicolon /exclamdown /equal /questiondown /question /at +/A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X +/Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent +/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u +/v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space +/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /.notdef +/.notdef /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute +/caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE +/OE /Oslash /suppress /dieresis /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +] def + +%%EndProcSet +%%BeginProcSet: aae443f0.enc +% Thomas Esser, Dec 2002. public domain +% +% Encoding for: +% cmmi10 cmmi12 cmmi5 cmmi6 cmmi7 cmmi8 cmmi9 cmmib10 +% +/TeXaae443f0Encoding [ +/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega +/alpha /beta /gamma /delta /epsilon1 /zeta /eta /theta /iota /kappa +/lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon /phi /chi /psi +/omega /epsilon /theta1 /pi1 /rho1 /sigma1 /phi1 /arrowlefttophalf +/arrowleftbothalf /arrowrighttophalf /arrowrightbothalf /arrowhookleft +/arrowhookright /triangleright /triangleleft /zerooldstyle /oneoldstyle +/twooldstyle /threeoldstyle /fouroldstyle /fiveoldstyle /sixoldstyle +/sevenoldstyle /eightoldstyle /nineoldstyle /period /comma /less /slash +/greater /star /partialdiff /A /B /C /D /E /F /G /H /I /J /K /L /M /N +/O /P /Q /R /S /T /U /V /W /X /Y /Z /flat /natural /sharp /slurbelow +/slurabove /lscript /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p +/q /r /s /t /u /v /w /x /y /z /dotlessi /dotlessj /weierstrass /vector +/tie /psi /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi +/.notdef /.notdef /Omega /alpha /beta /gamma /delta /epsilon1 /zeta /eta +/theta /iota /kappa /lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon +/phi /chi /psi /tie /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef +] def + +%%EndProcSet +%%BeginProcSet: 09fbbfac.enc +% Thomas Esser, Dec 2002. public domain +% +% Encoding for: +% cmsltt10 cmtt10 cmtt12 cmtt8 cmtt9 +/TeX09fbbfacEncoding [ +/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi +/Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown +/dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla +/germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /exclam +/quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft +/parenright /asterisk /plus /comma /hyphen /period /slash /zero /one +/two /three /four /five /six /seven /eight /nine /colon /semicolon /less +/equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N +/O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright +/asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l +/m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright +/asciitilde /dieresis /visiblespace /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /space /Gamma /Delta /Theta /Lambda /Xi /Pi +/Sigma /Upsilon /Phi /Psi /.notdef /.notdef /Omega /arrowup /arrowdown +/quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute +/caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE +/OE /Oslash /visiblespace /dieresis /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +] def + +%%EndProcSet +%%BeginProcSet: texps.pro +%! +TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 +index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll +exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 +ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ +pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get +div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type +/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end +definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup +sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll +mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ +exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} +forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def +end + +%%EndProcSet +%%BeginProcSet: special.pro +%! +TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N +/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N +/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N +/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ +/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho +X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B +/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ +/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known +{userdict/md get type/dicttype eq{userdict begin md length 10 add md +maxlength ge{/md md dup length 20 add dict copy def}if end md begin +/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S +atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ +itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll +transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll +curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf +pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} +if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 +-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 +get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip +yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub +neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ +noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop +90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get +neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr +1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr +2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 +-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S +TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ +Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale +}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState +save N userdict maxlength dict begin/magscale true def normalscale +currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts +/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x +psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx +psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub +TR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def +@MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll +newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto +closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N +/@beginspecial{SDict begin/SpecialSave save N gsave normalscale +currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N} +N/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs +neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate +rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse +scale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg +lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx +ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N +/setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{ +pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave +restore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B +/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1 +setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY +moveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix +matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc +savematrix setmatrix}N end + +%%EndProcSet +%%BeginFont: CMEX10 +%!PS-AdobeFont-1.1: CMEX10 1.00 +%%CreationDate: 1992 Jul 23 21:22:48 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.00) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMEX10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +end readonly def +/FontName /CMEX10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 40 /braceleftBigg put +readonly def +/FontBBox{-24 -2960 1454 772}readonly def +/UniqueID 5000774 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 +016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 +9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F +D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 +469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 +2BDBF16FBC7512FAA308A093FE5CF5B8CAC6A7BEB5D02276E511FFAF2AE11910 +DE076F24311D94D07CACC323F360887F1EA11BDDA7927FF3325986FDB0ABDFC8 +8E4B40E7988921D551EC0867EBCA44C05657F0DC913E7B3004A5F3E1337B6987 +FEBC45F989C8DC6DC0AD577E903F05D0D54208A0AE7F28C734F130C133B48422 +BED48639A2B74E4C08F2E710E24A99F347E0F4394CE64EACB549576E89044E52 +EABE595BC964156D9D8C2BAB0F49664E951D7C1A3D1789C47F03C7051A63D5E8 +DF04FAAC47351E82CAE0794AA9692C6452688A74A7A6A7AD09B8A9783C235EC1 +EA2156261B8FB331827145DE315B6EC1B3D8B67B3323F761EAF4C223BB214C4C +6B062D1B281F5041D068319F4911058376D8EFBA59884BA3318C5BC95684F281 +E0591BC0D1B2A4592A137FF301610019B8AC46AE6E48BC091E888E4487688350 +E9AD5074EE4848271CE4ACC38D8CBC8F3DB32813DDD5B341AF9A6601281ABA38 +4A978B98483A63FCC458D0E3BCE6FD830E7E09B0DB987A6B63B74638FC9F21A5 +8C68479E1A85225670D79CDDE5AC0B77F5A994CA700B5F0FF1F97FC63EFDE023 +8135F04A9D20C31998B12AE06676C362141AAAA395CDEF0A49E0141D335965F2 +FB4198499799CECCC8AA5D255264784CD30A3E8295888EFBC2060ADDD7BAC45A +EEEECDFF7A47A88E69D84C9E572616C1AC69A34B5F0D0DE8EE4EDF9F4ADE0387 +680924D8D5B73EF04EAD7F45977CA8AD73D4DD45DE1966A3B8251C0386164C35 +5880DD2609C80E96D1AB861C9259748E98F6711D4E241A269ED51FF328344664 +3AF9F18DCE671611DB2F5D3EA77EE734D2BED623F973E6840B8DAD1E2C3C2666 +DD4DD1C1C8384F906A7BAACDF441BB0AAEA2A697E453C9A10A119BBE236F5B3D +E6C27A9B608666E509C8F9B09DB3D41BDE7375D769F4C62F1CDAB748731734B1 +06284A7C45142D0FE4E88F9584D88AD8ED3FEE113073589A471C3DEE38E16CAA +77CF129F6D9B781161AA1D888FF06C9188B9C6F0A4F98986C26D4DEDA2AFA61F +6F664EBDB011C6FE6AD2F2075C7A2A8FBAF29D58A293AF049F8718E212B55168 +FCFD0930E6C4C7CC6B7C807DF99AC0BDE168E9F3DF08AC5C032F159F444CFA6D +67E568DB3C1748FB2EF61B2DC6E616597A8195BFD494F6458895406B4D208114 +AF3CC231C2C44E194CAA5F54BD608FFA26B603DF675E83D485D03D4F8B579783 +E65BEA1B95BCACAE3E7261C3A4729B611ADB6553FC8A8F01FD6BC09D56D7BEF0 +41E9E20CBB4234035CA11D909E765A9368127350185F8698246E6B1700AE3D18 +CCEC2F8BA4D05106619FC814218CD877612BFFCE37E85EFF6DCFE78AB2A45900 +2E1345FDA0AC100EF081E1C9E7A867E580D9B7E75C103C230C35A5 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMTT10 +%!PS-AdobeFont-1.1: CMTT10 1.00B +%%CreationDate: 1992 Apr 26 10:42:42 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.00B) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMTT10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch true def +end readonly def +/FontName /CMTT10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /.notdef put +readonly def +/FontBBox{-4 -235 731 800}readonly def +/UniqueID 5000832 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 +016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 +9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F +D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 +469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 +2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D19 +38DD5C4467F9DD8C5D1A2000B3A6BF2F25629BAEC199AE8BD4BA6ED9BBF7DABF +D0E153BAB1C17900D4FCE209622ACD19E7C74C2807D0397357ED07AB460D5204 +EB3A45B7AC4D106B7303AD8348853032A745F417943F9B4FED652B835AA49727 +A8B4117AFF1D4BCE831EB510B6851796D0BE6982B76620CB3CE0C22CACDD4593 +F244C14EEC0E5A7C4AC42392F81C01BC4257FE12AF33F4BFEA9108FF11CF9714 +4DD6EC70A2C4C1E4F328A1EB25E43525FB1E16C07E28CC359DF61F426B7D41EA +6A0C84DD63275395A503AAE908E1C82D389FD12A21E86999799E7F24A994472E +A10EAE77096709BE0D11AAD24A30D96E15A51D720AFB3B10D2E0AC8DC1A1204B +E8725E00D7E3A96F9978BC19377034D93D080C4391E579C34FF9FC2379CB119F +1E5BBEA91AE20F343C6420BE1E2BD0636B04FCCC0BEE0DC2D56D66F06DB22438 +452822CBEAF03EE9EAA8398F276EC0D92A7FB978C17805DB2F4A7DFBA56FD6AF +8670EB364F01DE8FCAFBAF657D68C3A03112915736CEABAA8BA5C0AC25288369 +5D49BD891FABEFE8699A0AE3ED85B48ACB22229E15623399C93DE7D935734ADA +DA7A1462C111D44AD53EA35B57E5D0B5FC0B481820E43222DB8EFCD5D30E15F9 +BA304FA879392EE0BCC1A6ADAB001EDF5C9D6FE45735098A304A8BD4A0AC9980 +7FFE62FEAD3843EF8C45E1203E303D028897CFE1D4D0AB8BBA74CE279275A67E +81AEA417A3E49397386B7304DC9247290A5CE2408114441EDD82F9B3A8E49C4D +D9745142652BE8B82C2A9610B26EA1A71212CE97781A06B58C3DDD9179016AB6 +740166FF986AE856AFDD2D8955D95B2D0C57BC179F1D9136BEFBB6F17E8DE96E +921502FB19F0C21F0A491F951D83972DECD70AA8987112F05C939A6FB073A5EA +495069A1DDF11DC589D2E91C1514C2799C5B954EB8B347918C4920C7142A2AC6 +8231DD2AF57E9540C46BDA6AAC09689487F5E0EB021CADA860FD25B2E5230259 +7BFF0F12D7DF5CE219716715073177028CE276FC313D6A101898D1A6BB0AD8D5 +662A85EE6B921A72E46589CC08EA87EECFDF36B819B07306C44AC3FBCD134930 +4B2F9EC4D5C57518E8210FC2C61DA3FD185CFA65DF3DB858BCF75E95321A7131 +547E0C85406F70D2C3C67E142BC0642344A5806FBE012868A76DBB9CB27CF878 +38A11705B857FC5F7F3EFA1DBEB4DA5200E2F29D25BC8614D6C29F336C5E9F60 +656D2F7CC463146790A6C4DAB137A9984258F46F0921600AB525BA1C03CCA30D +F03D2BAF5E8AA0939FF8849E760494BBF70003BA53516615023DBDE205E27F0A +8DCFDD26F25590CEC8C64834FCCD3AF3A93AA02760B216ECA422F349638C74C4 +B9060C46ABAE3789FADE86D20E3A3AB5940616A6AF8EAED5A70BF2A4A8E40860 +4369101BD16DB8A70A7E46F92001D56CDD56837C68BD8E2AA43147DD078E42DB +FE638E4AC8D58BDA2FFD457D760BACFA908B124958C2606F28C3998D7F565D5F +5539EA278477BC1D0056FAF929178B7AACAE1D371228606B58787EBCCA903E99 +F7EB4E1D1C5ECFA2D925E13BD7D67620B5D4DD42D1BD888D966E97636661BA71 +EB2229A1B1EED0B0F39968A21A816466ACC0B1B80386D9FA7970D092CB8D261A +08A4EE6F0A5DF57CE8A20F5A518D532C2829A4DF057618B1B3ABD12B44977D0A +45D5D799C2CEE1F006E108E9D493DA658215649657E1D04C0D52C33C846333B7 +38A93BC3635C7C4233B252DE7360E1485BAE136546289E9300C16AEF9A9F13D6 +D8CD9861AA42A0EC2E291033F02CC4D153CBDE0DDB6879529AE65F474C3EBAB3 +7CB10ECFFC019A71FF5228E89C9159F985A557B731F1716A740B96869D6E4332 +AB4BED696A5FF5E1CA4ECAB1FD7C8F0BD0B13D23F0FC2C04EB267B4F376714C9 +B7A2BE94F4E64A2754B6A2082E4217FE9991FA062B1BEF6EEC058D788BE4565F +53424C0169FCF47EF1D2031F68B0433F8C6973271461336683C1D4650487C050 +EA3FE882B6D45D2B6A19469B277674757EAFE42F9BD4AE651FD7580BB7FF1BA0 +AFE6267C71CA2EDC659EADDE85DBAC70294C32BE53C9D3D8A82092261521D7DA +66CEAECD2E107B00BD9E3B95A284D4B434AC709D26AD58F4310E78553FC9E5F4 +661A2A464C9B18A9F48A2F48C6938F55F9F8DE798AB043E5FA5FAADE31395514 +69C51D56BFBDC4E47FA113854CB511559C50626CC9FBF3203E5C51E70A5D8C88 +ABBB15A8C70F711184054EB6B0F8C81758BA1CFC0C8D771A7C5A432F6382C85C +09B27F5DD4E6A27B06C503F28AF19CC7E9A39DC18279A1C9CA59B8B90D5180FB +A57D571FAAEBCF488FE0C3ED878CC3E7C5CF863549629823B20EA58063871676 +B1478F98A9C9A43E962DBCA3E98F0F48B0CAE07569C48EA60C65FFC06A2008B4 +8481AB4D1205ED42C458FF6261883A307859897056F44E5424443C7F9FF2599E +F0EBEE2442F377311F535A7C559908377357A9D2FAA892373B452C526572F384 +FBC25E19B04A17DE99415FCAE984DE9C0CB9F7136CA1529FEC2FD92BAE245245 +377765E7AB0CBEAD3D9071B59CAF313360646AB3F51AB95B5C01867C3452917F +F019F4C63ABA866AAC859E209E13E795E0411C82B56741DA73B760B629ED2070 +19BB41EA91222B7358DC32EF21725AD41C4045BB95FABD52841C24DD38DC9DF4 +6A54F1E76043B1F54F69D94099981125B4C667EDF08A600E15CCBAA75E5D6EF2 +3A3759C58FF22D03C578C2BD0DA60A479BA24D85E39FDCE1CC129CF36B54589C +226E8B3575449AC9CFA594A9EFC99EFFAEEABB371AA21EFD25A0FFC9F46300AA +7773885F58B7F023248B164E7350AAE0092800B2B3F422BD580BAA94D6F99337 +F72BF2930E59E751F3D23389D1A63521E0FE5273F0FB122B007AF92D5C024912 +E957D98242D76635079970DECDFC99A7D6B907FA2667E7826A5297CC65FE6DBA +E739CD3E99FCBC4EA1A0A94287D7B59B0AAD320305B2736E8FD4C7AFB99B856C +0FA3004F441B03421E58DFFDDD68415E2AFC89F2D9BCF23B587FD4FCF8F0105D +EA44437C3A13D3A1235A37669CC8EB3FBF094EA6F70897E60EE1CAD8772592DF +D63629700526B0FC9B40A3ED89A3718DDF61A554FAC06F4722CBCC8FAABD7960 +DD7D733A73E820787F5AE1F5B0526A76FE49057AFAA7D42654C95B39C9294B74 +983083CD7A7D8AA14EA3C3B0EE3C61427320CF1C1DED864394E58BC4C164458E +E8EE940B097B87549325C0A516E5C48D58B3549729820AB04EBDD2AB83B9DDCD +528B0CEBE9D30B730EFA6B5D22888B79F81105A03FAD20C43893828CC3BD2C8A +A3F4072DAEC5B203AF56F9FC4301402461F3D8E543A63F2AAA8C6F786C2AEF88 +665514BEBF2689CC1A67E5F3FEA8B15B41AA1D18EA7F363F973FEB0D7094A827 +81A8369D7D2A6117A599CB645D2C9C9A9B6AD1851B810680D01CE32BDEC953A7 +4826775E5C09BEEAB08AA9045525A852DA144E7056E21C3A6477238F4CE58FDD +85ECB106B52DDC04F68CCCF74A404F1F56FAFF361548DC56D5D3833599B8E6D6 +C7F156BAFBF3B08FC3880E9892345825120DB09F8DAF82E59E1A3B769CAEE723 +A36CF49FF311F1C692ABFE67041F072A10CFC1A12E2DB98EAD86C64B8A4D50D3 +65BA77D198E520F65CCC0AC232551996583C744AC31C191FD42AC8BBA8BC30D2 +7724A124C584539247965052325EB87505298A7D5134B8D35B4F32FA9CD5DCBF +EE5DA08E635E572D47D3FECD53D7811BB69165F4C9413F03226F0A0BAFB89932 +314C52A1ADF5C1600D81D61839F59D57A65137761920CEF4ECEA8C18F839057A +8AA55C366BEB30F28961BC26FDCCBACDB5ED9FD063424C45F7E0FB23741C910E +D7183368EA7F75E49A9DCD9B92370F0AD9D550451F548F8E1912BB7C40166E9E +366D787806A3026F818B724562A8A4E2934FBE61AAA9D7996AA389E2CAC71599 +AC5A6FCAAD3891A414E91A045D93E483C76E34A16B6808AC96FF86882DB095BE +919C19446D6AB96B0FCF1B4CB9C5D3719F42CA8E5C70322A529243F69D0D48F9 +BCB792CC42ABCC47BBE841B1AFE81D302817D5DD890D5B3B70858192FF501786 +1A7A267EA26AAC220309F1FE53E467243C11347D4FBE18B20063FEAD45C45501 +01EA152F828FDE560E5DF6229F0C218B996EA170B1F59CEFC2B7960B590CF0CA +62992CA032FB00F69CF6A950A9378FCE196EEA3FBD7531369025A0B85CB7005E +39422CEEC16EB07CB064693122E82B54A9490FEF8B37AA1A25F1B3B62F998E21 +C3D834E4C13B710748DDABFA0A1025AD5E32850C1FC4F51EB73898578270207C +66D0DF36A91905AEEEC2257EE68790935FDC79104F0FFEE3E6350E728F71B786 +24EC38258E5B108CC1DF7ECB0A956F46CAEF065AC6F7288F3B500A96B33ACD39 +0C11BD46F5BCFC579C777E7682C225DBDC510CA40C4E54FBF976DA72E19C99B1 +18DD05128C2ACC386B6C238C54501A252A6E52E41BD4E5114E0E1B2162F68371 +D3C491183074664D549C5392897D177C21422B062593495E1687C1AAB01A47BA +DA8743150B533325E3A4A15B29C82989A02B1F4DE99CBCFE6575CB04FBD89E26 +850F4BC9BAC4AAE384A4E7FFA6D73BA02CD0171E5F80EF13D6800D99E2EB26B3 +C098E7BA5D93CFBF3B0A5E13072DD81B6A +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMMI10 +%!PS-AdobeFont-1.1: CMMI10 1.100 +%%CreationDate: 1996 Jul 23 07:53:57 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.100) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMMI10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.04 def +/isFixedPitch false def +end readonly def +/FontName /CMMI10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /.notdef put +readonly def +/FontBBox{-32 -250 1048 750}readonly def +/UniqueID 5087385 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE +3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B +532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 +B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B +986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE +D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 +9E394A533A081C36D456A09920001A3D2199583EB9B84B4DEE08E3D12939E321 +990CD249827D9648574955F61BAAA11263A91B6C3D47A5190165B0C25ABF6D3E +6EC187E4B05182126BB0D0323D943170B795255260F9FD25F2248D04F45DFBFB +DEF7FF8B19BFEF637B210018AE02572B389B3F76282BEB29CC301905D388C721 +59616893E774413F48DE0B408BC66DCE3FE17CB9F84D205839D58014D6A88823 +D9320AE93AF96D97A02C4D5A2BB2B8C7925C4578003959C46E3CE1A2F0EAC4BF +8B9B325E46435BDE60BC54D72BC8ACB5C0A34413AC87045DC7B84646A324B808 +6FD8E34217213E131C3B1510415CE45420688ED9C1D27890EC68BD7C1235FAF9 +1DAB3A369DD2FC3BE5CF9655C7B7EDA7361D7E05E5831B6B8E2EEC542A7B38EE +03BE4BAC6079D038ACB3C7C916279764547C2D51976BABA94BA9866D79F13909 +95AA39B0F03103A07CBDF441B8C5669F729020AF284B7FF52A29C6255FCAACF1 +74109050FBA2602E72593FBCBFC26E726EE4AEF97B7632BC4F5F353B5C67FED2 +3EA752A4A57B8F7FEFF1D7341D895F0A3A0BE1D8E3391970457A967EFF84F6D8 +47750B1145B8CC5BD96EE7AA99DDC9E06939E383BDA41175233D58AD263EBF19 +AFC0E2F840512D321166547B306C592B8A01E1FA2564B9A26DAC14256414E4C8 +42616728D918C74D13C349F4186EC7B9708B86467425A6FDB3A396562F7EE4D8 +40B43621744CF8A23A6E532649B66C2A0002DD04F8F39618E4F572819DD34837 +B5A08E643FDCA1505AF6A1FA3DDFD1FA758013CAED8ACDDBBB334D664DFF5B53 +95601766758B4BB6C93DDBF4C7D28729C5FE8E8BB90DEC3D366F135DF1E57A19 +0F82F65A402A24CC845CF40775123553166A2A4DBE5A17993512368E3C1B3F07 +124CA10145B331F17E08A78A7D9EB3A2A0742C69476396B81AE64F6C3AFC2EBF +9DD021433A67C1647047ACCC7B7B920DFC21E55ED2F1CDE349CDF13E757B0E2B +41B9A056D6BA82CA51CFC765DAD7FE7690A212EF317B41DFFA3392B78489F70B +D54F28DC74544444918FAE218E46B6D162100F5AA09B1819DBC8B0B6468E79D4 +58D6FC6A14AD7960A8CF1E22547189356A45B5867A6C3BC85931CE0077EF207D +95213DD37F34468DEEDEF53EAC9D779FA2C596B2CE616B5FFBEFB8A6EF1066AA +564EC0473AC29BF25310CBC4E4364FC4B25893AC349D72616A057F873CC56AF9 +83084F39F8633F5105627C6C9CB0ED340FA0CEAD31457BEC2B07CA95D05E2AC8 +7815D73004C44A8B2496FEA1D6C55ED66C25D03D7CF04D6E360FED58CF0BE921 +CC0B9D72E28FC5D9E25ED6AD8465F4AA6F06824FAE07B1B6C438080E4A2CA5AA +D957964A9714A6382D4FE8B7D598C9707DB21A2CFF4D61E16FCC52F086FF5D24 +37570913D1B602D083250DE2C4EA968742D0B886BD023A45A4F6DD569D15CEFC +9EF399A3A12CD3CA4153F45A5B66FF2FB2C3C8AD7A1EB91FE48DFB7ABEF3F820 +FDADC134563C19C691B853BE60780BF940AB74C6053FCF10E5B77C9127F0F13F +85A1D99BC8B89BEF55464A59B6007EF7F4083B75B38035FF4D48F799B6E2C00C +D4DF079D1E3F65AEF99F3CCA54C0BCBAEF0A4BD7FCFBCB0C13E7A85AF872A0A2 +652F8276FF3FCE12075A6B6DD56410D6C248D2FD4E84BEE0D33F59CC18D25138 +CF2E20AECA187B9588485B328AC83971370CB58F6B4062B0D59571A52D34DA07 +4B393C26B5F2483A4CCFECCA828F5693BC9F51AA549D2A1F0FF3EEE1A987DB99 +ED347030DCED7C5BD1CD9D0817FA6C5E7A6D1535AD5D9411014422C5213D1E33 +E44F5302FBD2F697865F1747A85813784D0A560E5C2100E101771CE6CA772B4C +30DC71583A54E619952C37578DFE8345D0BCA72B216C34EF3FFA6D9ED045FB2E +F263934A07D71DBDEEEC42623E589AE52415F1794E01AD37EEF1B00C7AA99D52 +8BB0D503AF49E92AED350DE1B184399F2E75B1EAE1EC2EC225C8A9937651C164 +B70F50D31E7770B65A9816252530025647C14111F32B178D81879D028D0132C0 +33BB6A96E93989A6BB4596DD8EEC3BEDEABD9C3F00B3BF8ACC76FD4FA8AD108C +FE65ADA2574F3FD636554BAA61C71131A0B5ADD3684BEC448EBDC9A0E906BCF2 +1FEB83D188E3C32FC9F4A25D9C722C6F4D0F2E8BA6B0062AA735CD21D342C453 +1C409ADA3EBF1D0A28686832EC90CEE239284E4027ADAA03277DB02D79074DF0 +2062F85F88DC7AC696A46016AAE455E73C1D65EBB5CC09065E3FE208FEDB16B4 +2A0DD94DA33A6688517AFD09AB7C2BCA26B1B4A75C25816A9AA4D0314D81340F +3D990FEAB9203EBD127C1B4924295C57FB68A9EE331A35EEACACA3EE091A72C4 +77DA3A234A3B57A361021E8943EDBD018D7F944381D7966E7BD8747A79486AE1 +5D31204DD9C6E84AD44E16CF318D803D507800D21613EDDE13332630BACDDDDE +677D147E3F21CDA81E5A1FCD98DAB1DE6636CA8513E7C2F592D6CC8629327D27 +BFF2C2EEAC75BB2231CC47BBD609884094DEC9BF94B67338FB3116C4CF8142CD +D053F0C77BFBC8ECAE6C029B1AE56AD5BF50B70C6989724F1460055713F8720A +9D1C8789D52BE842D68C591F527721751BE7A2D06CECA1C22F9929C2F6F83B57 +C11863DED295C49A184B78505702918E8829C9CD1DB7E0441DEB20A874E11386 +17972933ED59309CBB5BBB3120C80E619FE8D2339C739EAD96E5FCC2B0855CA5 +0628F84B897BB822DD435E3DC74B727371E01B2A9AE927D4C36865945DE99778 +67748A99B47413842FFC9522C514CD9A880FCB9A88654133D37B56762EAA0BFE +0B748AE9B4499AD422D7DF7E24AD2CAEECD8A5BD5CD7CCAAAB82BA97F88AF281 +259D500F5F1AAC85AE3D8B97E8EB0E90440F69C9A3A1E984656456F9615FB198 +42FC82DF7F1021A969266DCB1001DEFEF0BFB148952863F378689504FD2D69DD +7257BBEB28A3D3DD0CFAEB2349E0974F1156781445ECC6CC8EACE8C65D6C0C90 +5D9625D7FB4A5471323F79E71104A987D3D682283384F3453C20D66D07240B2F +B64394F9801774AA7070167089B4F561B6B899F58AFF41BBA05E960826635BB5 +1133BD7568D3C1B8AF131B9A0DBD04168D1D9698D11BCEA897F10486C7635365 +865CED6C6F82DEEC6F742B08367C3AA1128CFE3B2EC60A4C84CB2EF820F121B7 +0074DAD54AA80D947E21F5925FDE3CE7B9E77A2AD7C887F375ADC5FA71AC814E +215003DCF571C289D429A45FAA9B05C70C62690A5C7E1BC8BC6B047CFCC86440 +BCCB101BE5F6580C3682BED0E5D716EE5A5F3BC198BDC7F628738861DDB95E1D +DE01C33EC06ED492A789C7049CAA95E9B1117B37FD288B6D534325538EFC332B +91EFF15DD0F28879A99246F8573F970400FBF483ADA6468C07E23F6B24ABBEA6 +57FB3EA5A2CCE3C5C9BE566C66007F0025F661A3FD2CD2581AFCC6959F23377F +81672FD02717679EE0773F736F77F06415A32AC9C5701259DD281EF7286F595D +D22F1B40B0AD54830795626E1342FFC7BCE1CEC1A628D98E9BA949E1F8C21154 +92637E040A1308779D878D7A564165B33AA62F88A9BD479BCCD12D8B052BB7F9 +6BA72EB33AA683FB031930677CE35C57F64846E29DA8104267B1177FC9DB5D71 +F4F4964CA95CEA8B542AF79DF9C38D21D24184F363F1FF22BAABFEB5948AE0DA +15D3EC2032A2F82A1C897B48B66C54DC4A2A7A9282E40817F8C8BB6BFBBF0D8B +3F7D7C5121CC336A75DFBE33844A8AB6ABCDD2C295FC6C855CE939288A801795 +A8305C2AF094C0933C3F94AD9379A37D87561BA7B1CACC2B387D06A4AFD84DC5 +625187C5E25FD88B62BF178629B79C0BF2936BD373C4BBFFA6DC50A6B063991F +5FD89C70B52FDE24927C794160101AFA1568D2F60BB5BDA1300F7EA9A4D1EDA1 +33356E41B115D393B185935D1EA8B37205D6DE54439DB22993154366697F5E91 +9C1799E8F0E2F6641800F63BC459F014D075A30A34E86728AF728E57C7697E3E +ACD1AD83F48402B71D6223B2B2209AD07B4614AD653B5F2DCC3D85A7CD83F8EB +C8B0B85249C6CEEA5E26D952E0EA012C563D31D5CFCB3392180313CEEFD6737D +6234019CE223AEAF05A42AB2C702A83E11318432032D352D098970A078C72781 +D2A6E7866B3865C9F536CD6E3B15040F55A71F636F8682AF424050CB0F816A02 +0F8BA60E45F357DA2A0B9653D67488FAC680DC5914617DBB08EE2E209B59146B +170CB772CC5E38BCC1B1EC293D79190D43C157EC7B09BEAB9A0FCB7A2366C546 +AE9BD47A1B0720E52C14AE9A495AA02BD34A6EE6FF7FB7442E53AE19A722F7DE +63DBD90269D9F71D5642B1D28385C906B747352C50809DC239548D3945888A46 +68F6873AF2CEC26470A178897ADE6DF5807AC0CEEC38A35652BCE5B5FAF02B76 +622ABDF63F01D7A2886952B3ADF12A1C8418C2F54FFA1966A91AE20C2EC5D75A +ECC5D75E9D6ACB4F729B304E48BC47AA8A45F5BA860AEEC233F47D227D299AE4 +C0E2197B65647D3EC64EC04CA5050F25F1C81745A047AAD9BEEB076A5F68F91F +783B584F1971AFD4AC5FA26E85387C9C212A8A837EE475DD68E670A1A1BF34AF +8A9D40EBFDC816C8EACA57F48222F41780D708AC6A925B2EEC8402779597A25E +47C8C74150B307E03C72AC90D49ED3943E79628DDCAEF83E67C38923690221F2 +409FC5BF32F2D4F1F3E5916108D453E887CEA29698C3E260DAC5947174B962F9 +A64B377472D1DC3ACD4E5B2C80C99AF5E009DB0013EB04FDB05DEFD25BB21896 +2AD64CC273C7379FB8CF4AE2C4C9A100E0AB792D29632185F8636D00608EFF3D +342BBB96BC844F829F27DE6EF8652F381BDA9945281D94C2B7F6CA1F0CA7D75A +09E4E658A930A08C561375DDFEEF2A1D97EFB1BD53D63CE66198F5AE6D84C6E6 +680B6982E7C3A86C4972B7C95C75C645C3859887884074CC425D69A6A5B3255E +7CA15B406382FA1537227CA5E481B690C9234AAA82B89F5F34B3DCA8CA1AABA4 +7AEB28D742507799273DFB3178055F8E6419711E0AF44A8F24404FABC6779BDD +C0780FAEFE5CC4582CCC115A8ACE2986AB00BB1F10B509B94765548F4069BE65 +E811F857A95DB42F3AF7FE7FC1258036FB60110CABF7B5E91550946C640814CC +19B31E74D3A5 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR8 +%!PS-AdobeFont-1.1: CMR8 1.0 +%%CreationDate: 1991 Aug 20 16:39:40 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.0) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMR8) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +end readonly def +/FontName /CMR8 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /.notdef put +readonly def +/FontBBox{-36 -250 1070 750}readonly def +/UniqueID 5000791 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 +016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 +9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F +D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 +469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 +2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C +68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361 +3645B82392D5CAE11A7CB49D7E2E82DCD485CBA1772CE422BB1D7283AD675B65 +48A7EA0069A883EC1DAA3E1F9ECE7586D6CF0A128CD557C7E5D7AA3EA97EBAD3 +9619D1BFCF4A6D64768741EDEA0A5B0EFBBF347CDCBE2E03D756967A16B613DB +0FC45FA2A3312E0C46A5FD0466AB097C58FFEEC40601B8395E52775D0AFCD7DB +8AB317333110531E5C44A4CB4B5ACD571A1A60960B15E450948A5EEA14DD330F +EA209265DB8E1A1FC80DCD3860323FD26C113B041A88C88A21655878680A4466 +FA10403D24BB97152A49B842C180E4D258C9D48F21D057782D90623116830BA3 +9902B3C5F2F2DD01433B0D7099C07DBDE268D0FFED5169BCD03D48B2F058AD62 +D8678C626DC7A3F352152C99BA963EF95F8AD11DB8B0D351210A17E4C2C55AD8 +9EB64172935D3C20A398F3EEEEC31551966A7438EF3FEE422C6D4E05337620D5 +ACC7B52BED984BFAAD36EF9D20748B05D07BE4414A63975125D272FAD83F76E6 +10FFF8363014BE526D580873C5A42B70FA911EC7B86905F13AFE55EB0273F582 +83158793B8CC296B8DE1DCCF1250FD57CB0E035C7EDA3B0092ED940D37A05493 +2EC54E09B984FCA4AB7D2EA182BCF1263AA244B07EC0EA901C077A059F709F30 +4384CB5FA748F2054FAD9A7A43D4EA427918BD414F766531136B60C3477C6632 +BEFE3897B58C19276A301926C2AEF2756B367319772C9B201C49B4D935A8267B +041D6F1783B6AEA4DAC4F5B3507D7032AA640AAB12E343A4E9BDCF419C04A721 +3888B25AF4E293AACED9A6BDC78E61DA1C424C6503CC1885F762BFD4563ABA4F +D926227FAD2B2D4975835541EA88A9122250DB8FDF8A059573591995D990EF3C +DF93C316B57159DEB0ED1D04345E185A3A6ED52BD68CDC5B105DCA99684ABF7A +C22FE9E198559B40BDB4FE42C80ED82E9274A4B67B948166DC9D69C85A7F2F91 +3B17ED4242F63E8949C311BBFE38172B1628644258DFE06C72D757395C5BD42E +C03780E517B3D633E4D30C9B8DDFB317ED5A12DE941021AA3A542114136269CE +423340BC28EF54C35CD0E77E5C8756AAF31FA952D3DC541129D186B292C0D489 +E6BC46239545682818A8BAEC3AD95397EC58BA75CBA2170C6E4AF7C069AB9B67 +E0A2D12C75000E1A2D17B92107E62FE9990D6F83A3582A4779749CF62F50CD77 +818DCDA3AA9487774E56ECE703CDCE72932E157453971A588FE7F4522AC23422 +DE1E11AF28FE2AB0B29CDC9EB8C76D2CB1F11271BD997DF00A422C7C43E5825C +0074A3AC6FA9219DE81ED9087D02B5DC4BD6E7ABB70E7B859345959DF8BF685A +203607BF2AF44CB538762B0A76EC09C4CA3D58BB289CB37D613913B6040FF739 +D3DA2F07B9B811CB393904FFEA743D9E1AA85A155FD757FE19CF9BDC00130779 +A3A28B22CED4D4DECDA1982D966101B5F06588D45981BA84C8B07CF11D0F581D +AEDEAE38E212689E5AE0DD8F66891563D6FDF4FEA880B95A2F7783F9E74E6012 +285A4E8E4DF0423C7FC5D030AC918B0EB3B9AE6318EC0F7FC5E69E4A09A62D06 +64119684BEA344B0E775C681F6F78E10A40C9C06BB8F1F45FF60686D4E6164BC +AB289CEE800D560C8CDDA2C86B98975B56CC066A10DD3A4EF3D6161699F9F7C5 +083CA1EE40C9EC4DA8EBE39EB3E941 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR10 +%!PS-AdobeFont-1.1: CMR10 1.00B +%%CreationDate: 1992 Feb 19 19:54:52 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.00B) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMR10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle 0 def +/isFixedPitch false def +end readonly def +/FontName /CMR10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /.notdef put +readonly def +/FontBBox{-251 -250 1009 969}readonly def +/UniqueID 5000793 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 +016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 +9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F +D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 +469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 +2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 +87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F +D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 +92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C +295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 +409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C +4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF +2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E +0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E +B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 +24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B +43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF +D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 +5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC +96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 +7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3A38ED682C65299D6C +67201AC4BEC92930ED59A43AFA43F24F6ACBEA592A03841835D631F03C2C1A78 +D554F14F748CFE52EE1255995118829A77F388B119B21C90975F74DE5E4A6DA9 +C531C14FDA14B4AA1EC720F6CE0342AD2CFE20771E4F80ECEB0ACA2CF89E2280 +6BA7F408F14F24DEEFB988141457533E4822D51A43231D49BE8B184483530CDF +6B37AE44174A99A2367CDFA06D801B1588A55CD8FBC5B1A6903110F1BC42EC5F +FCCE6840E8ADC084E63A7C5C45FE6953D18AD1C2573314AF568A69608A9B3825 +8DDD825D7E8041DCDA231DFB8E6ABD97BCDCA95500E72B2A64F2F989A6D7AD7C +875D0E0E051ACBD893E30EA56145D44F2DC60EA9D0F7D62021E05D2624B00B93 +92171DBF9964BBEC03013F324BD4B1E3053CEED520CD0E02D3BD8695B3C1D422 +9FD5F78A6F1810C4440110E7CF77EF9E89E7CFD5C7E6C184E7BB76320ACD3E59 +118F1F7381C2FBB0DFC4B2D7805435133C2526B1EBFC75F605FC422B56D69EB9 +6663FECF5BD529D9E7C7EBD598A6CF8E5755258959D93624FFE199D39A3DA75E +B091FC3CE77584E9FB3C5D5D4B045BB5270B6DA4F8750D81480FF4FA476CF794 +F45503B19EB32BD540B24672F7383ED0AC2FE4D6AB77570225D4900DC856DA39 +76ABF6931AD5B3270E553E45AD618EEB77BDFE4480A36CD4F92D20F442A410D6 +F9F7AF27DD7EB863F35EBD0252A06BF0DAF5142E7656064CEEC693C16B00486C +D2A81696E0E285BDCE9D146DB188BCC895FC2C608649FBEC19D6EDC9915FAB9D +588C34864F3D19B617B1C83F76B2CD6CFB51276675A46A0EFDCDBB57526BCE54 +4990806785A2B9A86A2076B0D1FF159D3A54359FE8E3FE8BBDEC164416411F33 +F45F4173C51E84A8BFD121BA9E9F251DFDD09572EF428D6B1343FA1D3582EA9F +A6CB5E534596F15A9EBEB77FFAF00FDF0D9E2B312A81D04B38A5CDED9EE7A31B +D92C3145C1C1C8FE8D006373F9ED95CBEAE966F4D7F6FBEFD2C5A36FA4773DCB +66DE0F21073C0795744567041F02861EAEDD054459F9804867C9AB81EF68D0B8 +75E13145AFBF57176CA5CD5CADADBE9DAA2C52D973C9AC1B00E601AD6F855B61 +5CEF71A4999B7A9ACCC66A0728D283CE5E91DD4022FA126169830AD6BB981E1B +DB796680E9FE0FD4EE146EF8D0B6B652A6E3A57FDF2047F19A9D0FA5CFED185A +0E94174FE775B753003E4AF70C2208E751DC07AC979B2179437B9382501F4240 +BADA84A464DA04ED1154D254A664F7F896E10916C64E4C73C9EC34249CFE782D +14BD6190E6B32853F1D23680389CCF3A81FA1496E9CCE6CD21775DF4E92A2623 +EE88DFE79B81F386F0431EDD5195B2964700488D7EEE24BD4613A2BDB6BDD270 +86EABF50C25AE21F14B84E51024CD103B49AB5CDCA5A30D293D3F779932DC989 +5E75A93F72880066BA35AD56C70323E294E8444F55B18A2A849CF0A1F4FBB86B +6DF37BAADC1D51475504ED97051DB01DE0CDB7807FC6529B8A1A7E2AF37863E9 +7E213C8EBD5587826EC1A6748A4312134C7B8942302041C252BD8BB534070050 +70268EB528A57BBE39B406DD3FFE55691A243B3713B9C4DB8593186BD8F3E17B +FA647C8C549B4D354F0EA5BBFEFD3E831648E6228DD00B89CEA7F6DF83CC1CFC +CB8B7738E2F2738B179A253ED22E0D4F4C63AFBB22F7BA2598DC87ED04FF9FC4 +9DB734B5AB8D475DDCE37247D8DD123AA777654F3739CB71EA758D07B67A95F2 +A32FF46437C058BF36158E48A34A730D3D92EB44C1E486C249D023921F466711 +ECE40CDBFAF8CE4B0AC46D29D09CF268AD8F2741A27F13D62CA83C674C32BC39 +BBFD7DD42BAD2B9DDD6BCB6A5BD9FA1C0CF0774965903FE3312EE0F959752768 +C00E81F4F28BD7E773A47C5755AE5075F6457435B63E21A90DB0425A046095C9 +EC283ABD6D9BE1E668FA1465BDFBF8BF6BEBA17B964FD60B6BD7EEE28E079839 +55D8CD7F0D668480E7CBA2C6A47C73787083D47443E16C06AB96BDF35C9476A3 +D356AAE101F9DE2341A34555B23B565B74814BE7FE83B75E06CB8C8B2190E82C +FBA8D0AAD2A9C4E6D7D6A83989878BDDE27F73AADAF87CB573C74761ACDF5AB4 +5B9735E84882282127929357E9CF4B6499B576C8A79F9230E9528FA2F3A703B6 +5FC71B95433958A67F2F08D286E2B3A0E5691930D2DCB7C97CAD3733C7D8C5F6 +114CDB7895FB51E2B9D730007747673B8BA83614C7AE9A3103E8C7760EFD2887 +3FED8D79A876CAA55F9EC99D33AAA7B62E1A3322EB8E6A67B79946CFCC3C8BF6 +463B07C454165A5863008D67BF073F9E1BD0507C4512A0F8E557B08F35640998 +A261DAE743A146A525248A3518F8824E952E2EDCFA845FF75879E613837A1AFD +6251CD6188C92845D67E00BE2D4D69C8DC14D17696B8246A64A49DC5F61B330F +1A7B5FE881DF896A0A69580E3299A66E23880FD0A7FDDB1B8E734898AD3373B0 +B2D9482A837C7C745044793A961CCA98829790107173AD41ECF54706520B5206 +D41464BD1421CB99C10FAFB1DC52D0C40C21C830C658CDFCC0DEB1E54BED772A +1FEE615D345B80DB798BC93ED0C231DE4332E2D7D2FFF85E97804A1E02375D8A +20F678B5A1FAF53C0877C901FFE8A5B56AACD1A3334FACD5965BE02123DC0525 +2E6A88DC469B4FCB37FBE84FD31CC090FB6B98C5DB4AE554C784B4F6BA7E39DD +5274B6F7E905C555ADED6D8B3DB81B7B0B62F6C20E309D17ECA8AC378E1BBC01 +E9AAC46C5AD4147A498AD99F170BA2063AFA07989FD0AE9DE929077887DCCEA0 +0E0BDE07FA0A86C536C7B2420CD9E7562CCA5B7AC5988CCE53C3F68E53061A22 +9622FF2A9595AF39F5CB8CB487A7159725D573450174038964F577A871853D3C +C6FB09D701E760B4171BC26CBF6C7524AE0CE1F3C1889597C21F8648F93B5FCF +710A9F5C6A5FC1CAB3D53CF85015086CEB41BCB1D4F6CEC7113AD867EF5FA534 +67FD7DD0C47B09B9F8C30B61BD51BE497AEBD4B74E2A9C82E01ADE32A66DFF6F +F042EC8DA702164F26C4B789B2E9788E6E09C440089010C43190E114D9F5EA85 +D4BA7DFC22F011DC5E1B6C7CBAC13D6D929C3E0673F4A9F4E2A970B93352A076 +74D1444C61507D9505134586E5036E6772EE503C7F00B71AA345927B3A2CD7A4 +9F5575C3085250C3383C0AD33300A2C087B41E66AECE3B8DB8A77B8AA6D97CF2 +CA23F0DBF4485A1C0DBCECE287D95F8D70DF80B11473D70E527C1F6804950A9F +5B19411285FB45775EC9AFB05F9AADFBFD98A87C2FF38C314BA9CE41B7C4E664 +E480838DD4299004329DB3E665AAC2FE5A53E295D627ED896D56876268C55981 +FF3F19DFA5E6ED355B3020F9615F64273670A8EA36B0A106D37CC1051580EA3F +694DA991C9DF54A51D596A491827E6B53790343D7DF81E652ABC7D3DA38B58DE +EAE0DA56A20312F8C2803D904EE2B4389B5A680C55BB564B5C203539B5F7B445 +8ED9D8CA51B789F5BE09152D1B44FBDD9594B628BEF543BDF9BB9EA182C4F4FB +98213E82636CA16D377A483023D13A3B9C658D4B9F1BE08808A67004A5EFF944 +B9FEE34F193F055256BCB7CEDA4BFC3FF4668FAF9B175DD926F9774EBFE9F487 +E91B8D332BEFCE996F6F1B800F3F +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMSY10 +%!PS-AdobeFont-1.1: CMSY10 1.0 +%%CreationDate: 1991 Aug 15 07:20:57 +% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. +11 dict begin +/FontInfo 7 dict dup begin +/version (1.0) readonly def +/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def +/FullName (CMSY10) readonly def +/FamilyName (Computer Modern) readonly def +/Weight (Medium) readonly def +/ItalicAngle -14.035 def +/isFixedPitch false def +end readonly def +/FontName /CMSY10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 0 /.notdef put +readonly def +/FontBBox{-29 -960 1116 775}readonly def +/UniqueID 5000820 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964 +7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4 +A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85 +E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A +221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A +27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF +5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09 +0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730 +DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A +71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09 +4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C +515DB70A8D4F6146FE068DC1E5DE8BC57033D79919697C81395D5B94C3AAAB11 +52D73937B8F82D3E2E764DA1B3BE273CBB84E4B1919CC1D5586C21F6FC23BF1D +82DE5A8DFA3E8F5C25622AAB9F7A588532D13C663079C8FB84DA6BD4D2DEDB2F +84CE30D0F188EEA2785B492B7704AF51ECE436B1B191B22DFEB7894DD5457E4C +D14787B5F8630B42B3FC9C15A1B7B887063D92009BE4A5A9F8416CD9187851B8 +CF244E087740953A1639BAFFB86CA7C99FBD401FB9C556F330F1E4E987E715F8 +59A751BA88003F808F85A690E55812D8FBAE945A5AD24FF79D59C9876B3CCEAD +7F3CA53A1A9E2696392C43162DA3750DABE6FDDA7AC795F26D8A97BEFFAB870C +A2F1A91C4AA767BAC502771ED346363D1ADE899BF289BDA5D464EB55F45ABC7D +CD481A68994B08EA0F71EB252A8BA0E238A1B854104D33C7693AD4E84F480E11 +B7558EDF834C57C2EB5F9134967B76364DE2ABC32D7AD30C9ABF8FD4CF82E560 +451ACF5403739ACFFE084E9645FBAD30A0C61C3F90143A69984C48633CB9F4F7 +AF76B78A156952CB66DDE425E27364B626C2E070A8DCF80A0B7B632802E7492F +2C5856A6DF0DCDA3ADBDF4992770E3ECF0C8E849A8563F229C2B8BB3F572F9EF +EC47B8C28F21D51803A8891CC5C2159FB49B4DF8A263F4BF3855443583D1509F +EA11E69BE2380DC77C68315BF451A396D0D90A86CA41D1FBF83CB5B8FC9EE68C +E63976571F1F2E8F47D9B4FF9773E8E4055165D8DDD62A304EC10834BA4BF747 +F41CAC +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +TeXDict begin 39158280 55380996 1000 600 600 (sane.dvi) +@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40 +1[40 1[45 97[{ TeXBase1Encoding ReEncodeFont }13 90.9091 +/Times-BoldItalic rf /Fb 215[67 40[{}1 83.022 /CMEX10 +rf /Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 +1[60 60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 +60 60 60 60 2[60 60 60 1[60 60 60 1[60 65[{ + TeXBase1Encoding ReEncodeFont }37 99.6264 /Courier rf +/Fd 133[48 6[48 48 2[48 5[48 2[48 48 48 12[48 3[48 4[48 +8[48 3[48 65[{ TeX09fbbfacEncoding ReEncodeFont }13 90.9091 +/CMTT10 rf /Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 +37 58 21 37 1[21 37 37 25 33 37 33 37 33 11[54 46 42 +50 3[54 4[25 3[46 1[50 1[54 18[19 25 42[42 2[{ + TeXBase1Encoding ReEncodeFont }35 74.7198 /Times-Roman +rf /Ff 206[25 49[{ TeXBase1Encoding ReEncodeFont }1 49.8132 +/Times-Roman rf /Fg 206[33 49[{ TeXBase1Encoding ReEncodeFont }1 +66.4176 /Times-Roman rf /Fh 134[45 52 1[44 52 3[41 2[55 +1[27 47 6[47 39 32[69 3[71 45 71 1[25 35[55 22[{ + TeXaae443f0Encoding ReEncodeFont }16 90.9091 /CMMI10 +rf /Fi 204[35 35 35 49[{ TeXf7b6d320Encoding ReEncodeFont }3 +66.4176 /CMR8 rf /Fj 194[71 3[45 45 45 45 45 1[45 45 +45 5[71 1[35 35 40[{ TeXf7b6d320Encoding ReEncodeFont }12 +90.9091 /CMR10 rf /Fk 154[40 40 84[45 13[25 71{ + TeXbbad153fEncoding ReEncodeFont }5 90.9091 /CMSY10 +rf /Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 +25 25 45 45 25 40 45 40 45 45 51[30 45[{ TeXBase1Encoding ReEncodeFont } +24 90.9091 /Times-Italic rf /Fm 134[50 50 72 50 55 33 +39 44 1[55 50 55 83 28 2[28 55 50 1[44 55 44 55 50 12[66 +55 72 1[61 78 72 94 3[39 78 1[61 1[72 72 66 72 7[50 50 +50 50 50 50 50 50 50 50 1[25 33 45[{ TeXBase1Encoding ReEncodeFont }47 +99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53 +66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120 +86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86 +11[60 60 60 60 60 2[30 40 45[{ TeXBase1Encoding ReEncodeFont }43 +119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76 +3[86 29[124 12[86 86 86 86 86 86 49[{ TeXBase1Encoding ReEncodeFont }13 +172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 1[55 55 2[55 55 55 55 55 55 55 1[55 +55 55 55 2[55 55 35[{ TeXBase1Encoding ReEncodeFont }80 +90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45 +66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 +40 45 40 45 40 30 5[56 66 66 86 66 66 56 51 61 1[51 66 +66 81 56 66 35 30 66 66 51 56 66 61 61 66 5[25 25 45 +45 45 45 45 45 45 45 45 45 25 23 30 23 2[30 30 30 35[51 +51 2[{ TeXBase1Encoding ReEncodeFont }77 90.9091 /Times-Roman +rf /Fr 133[40 45 1[66 45 51 30 35 40 51 51 45 51 76 25 +51 1[25 51 45 30 40 51 40 51 45 10[66 66 61 51 2[56 71 +66 4[35 3[61 66 66 61 66 6[30 1[45 45 45 45 45 45 45 +45 4[23 2[30 30 40[{ TeXBase1Encoding ReEncodeFont }49 +90.9091 /Times-Bold rf /Fs 135[103 149 103 115 69 80 +92 1[115 103 115 172 57 115 1[57 115 103 69 92 115 92 +115 103 12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 +1[149 23[69 69 40[{ TeXBase1Encoding ReEncodeFont }34 +206.559 /Times-Bold rf /Ft 204[50 50 1[50 2[33 45[{ + TeXBase1Encoding ReEncodeFont }4 99.6264 /Times-Roman +rf /Fu 139[48 67 57 2[86 86 4[48 3[76 86 2[76 10[124 +2[96 4[124 8[105 3[124 13[86 1[86 86 1[43 46[{ + TeXBase1Encoding ReEncodeFont }18 172.188 /Times-Roman +rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%PaperSize: A4 + end +%%EndSetup +%%Page: 1 1 +TeXDict begin 1 0 bop 941 1939 a Fu(SANE)44 b(Standard)g(V)-19 +b(ersion)44 b(1.03)1718 2698 y Ft(2003-02-22)p eop end +%%Page: 1 2 +TeXDict begin 1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 +b(Pr)n(eface)3430 b(6)136 1610 y Fq(1.1)96 b(About)24 +b(This)g(Document)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(6)345 1781 y(1.1.1)110 +b(T)-7 b(ypographic)26 b(Con)l(v)o(entions)92 b(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 b(7)136 2214 +y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(7)0 2476 y Fr(3)91 b(The)23 b(SANE)e(En)l(vir)n(onment)2770 +b(8)136 2647 y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Image)24 +b(T)m(ransmission)85 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(10)0 3251 y Fr(4)91 b(The)23 +b(SANE)e(A)n(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639 +b(13)136 3422 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3593 y(4.2)96 +b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(14)345 3764 y(4.2.1)110 b(Base)24 b(T)-7 b(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T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4790 +y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)345 4961 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7 +b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(17)345 5132 y(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7 +b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(19)1927 5381 y(1)p eop end +%%Page: 2 3 +TeXDict begin 2 2 bop 136 123 a Fq(4.3)96 b(Operations)32 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)345 292 +y(4.3.1)110 b Fp(sane)p 861 292 28 4 v 31 w(init)75 b +Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(24)345 462 y(4.3.2)110 b Fp(sane)p +861 462 V 31 w(exit)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)345 632 +y(4.3.3)110 b Fp(sane)p 861 632 V 31 w(get)p 1057 632 +V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(25)345 801 y(4.3.4)110 b Fp(sane)p +861 801 V 31 w(open)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)345 971 +y(4.3.5)110 b Fp(sane)p 861 971 V 31 w(close)88 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(26)345 1140 y(4.3.6)110 b Fp(sane)p 861 1140 +V 31 w(get)p 1057 1140 V 32 w(option)p 1419 1140 V 30 +w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(26)345 1310 y(4.3.7)110 b Fp(sane)p 861 1310 V 31 w(control)p +1277 1310 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(26)345 1479 y(4.3.8)110 b Fp(sane)p +861 1479 V 31 w(get)p 1057 1479 V 32 w(parameters)25 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(27)345 1649 y(4.3.9)110 b Fp(sane)p 861 1649 V 31 w(start)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(30)345 1819 y(4.3.10)65 b Fp(sane)p +861 1819 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)345 1988 +y(4.3.11)65 b Fp(sane)p 861 1988 V 31 w(cancel)33 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(31)345 2158 y(4.3.12)65 b Fp(sane)p 861 2158 +V 31 w(set)p 1057 2158 V 32 w(io)p 1199 2158 V 31 w(mode)78 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(31)345 2327 y(4.3.13)65 b Fp(sane)p 861 2327 V 31 w(get)p +1057 2327 V 32 w(select)p 1419 2327 V 30 w(fd)37 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(32)345 2497 y(4.3.14)65 b Fp(sane)p 861 2497 V 31 w(strstatus)73 +b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(32)136 2667 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(32)136 2836 y(4.5)96 +b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(34)345 3006 y(4.5.1)110 b(Option)25 b(Number)e(Count)70 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(34)345 3175 y(4.5.2)110 b(Scan)24 b(Resolution)i(Option)87 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(35)345 3345 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(35)345 3514 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(35)0 3775 y Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989 +b(37)136 3944 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(38)345 4114 y(5.1.1)110 b(Primiti)n(v)o(e)24 +b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(38)345 4284 y(5.1.2)110 b(T)-7 +b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 4453 y(5.2)96 +b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(39)345 4623 y(5.2.1)110 +b Fp(SANE)p 861 4623 V 31 w(NET)p 1057 4623 V 32 w(INIT)82 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(39)345 4792 y(5.2.2)110 b Fp(SANE)p 861 4792 +V 31 w(NET)p 1057 4792 V 32 w(GET)p 1254 4792 V 31 w(DEVICES)62 +b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(40)345 4962 y(5.2.3)110 b Fp(SANE)p 861 4962 V 31 w(NET)p +1057 4962 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(40)345 5132 y(5.2.4)110 +b Fp(SANE)p 861 5132 V 31 w(NET)p 1057 5132 V 32 w(CLOSE)27 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(40)1927 5381 y(2)p eop end +%%Page: 3 4 +TeXDict begin 3 3 bop 345 123 a Fq(5.2.5)110 b Fp(SANE)p +861 123 28 4 v 31 w(NET)p 1057 123 V 32 w(GET)p 1254 +123 V 31 w(OPTION)p 1615 123 V 30 w(DESCRIPTORS)28 b +Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(41)345 294 y(5.2.6)110 b +Fp(SANE)p 861 294 V 31 w(NET)p 1057 294 V 32 w(CONTROL)p +1474 294 V 29 w(OPTION)36 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(41)345 466 y(5.2.7)110 b Fp(SANE)p 861 466 V +31 w(NET)p 1057 466 V 32 w(GET)p 1254 466 V 31 w(PARAMETERS)34 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(42)345 +638 y(5.2.8)110 b Fp(SANE)p 861 638 V 31 w(NET)p 1057 +638 V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(42)345 809 y(5.2.9)110 b +Fp(SANE)p 861 809 V 31 w(NET)p 1057 809 V 32 w(CANCEL)41 +b Fq(.)k(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(43)345 981 y(5.2.10)65 b Fp(SANE)p 861 981 V 31 w(NET)p +1057 981 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(43)345 1153 y(5.2.11)65 b Fp(SANE)p +861 1153 V 31 w(NET)p 1057 1153 V 32 w(EXIT)82 b Fq(.)46 +b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(44)0 1415 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871 +b(45)1927 5381 y Fq(3)p eop end +%%Page: 4 5 +TeXDict begin 4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 +1349 y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45 +b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data) +g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(or)g(image)g +(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(11)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(33)136 2119 y(4.2)96 +b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)1927 5381 y(4)p eop end +%%Page: 5 6 +TeXDict begin 5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 +b(ables)136 1349 y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)136 1521 y(4.2)96 +b(Prede\002ned)25 b(De)n(vice)f(Information)i(Strings)47 +b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(18)136 +1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 b(T)-7 b(ypes)24 +b(\()p Fp(SANE)p 1343 1693 28 4 v 31 w(Value)p 1649 1693 +V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(20)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p Fp(SANE)p +1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036 y(4.5)96 +b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(22)136 +2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 b(Constraints)57 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)82 b(23)136 2379 y(4.7)96 b(Action)25 b(V)-10 +b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p +Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(27)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f +(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)136 2722 +y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139 +2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(29)1927 5381 y(5)p eop end +%%Page: 6 7 +TeXDict begin 6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 +y Fs(Pr)l(eface)0 1782 y Fq(The)25 b(SANE)e(standard)28 +b(is)e(being)h(de)n(v)o(eloped)g(by)f(a)f(group)i(of)f(free-softw)o +(are)i(de)n(v)o(elopers.)38 b(The)25 b(process)i(is)f(open)g(to)g(the)0 +1895 y(public)e(and)e(comments)h(as)f(well)g(as)g(suggestions)k(for)c +(impro)o(v)o(ements)i(are)e(welcome.)29 b(Information)24 +b(on)f(ho)n(w)e(to)h(join)h(the)0 2008 y(SANE)e(de)n(v)o(elopment)26 +b(process)f(can)f(be)g(found)g(in)g(Chapter)g(6.)0 2179 +y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d(streamline)j(softw)o +(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c(standard)j +(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f(access)h +(raster)g(scanner)g(hardw)o(are.)30 b(This)22 b(should)i(reduce)g(the)f +(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 2405 y(implementations,)i +(thereby)e(reducing)h(the)e(need)g(for)g(reimplementing)i(similar)e +(code.)0 2756 y Fn(1.1)119 b(About)31 b(This)f(Document)0 +3022 y Fq(This)35 b(document)j(is)d(intended)j(for)d(de)n(v)o(elopers)j +(who)e(are)f(creating)j(either)f(an)e(application)k(that)d(requires)h +(access)g(to)0 3135 y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g +(de)n(v)o(elopers)j(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er) +-5 b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0 +3248 y(implementations)35 b(of)c(SANE)f(components.)55 +b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g +(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o +(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c +(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0 +3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as) +d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i +(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l +(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29 +b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26 +b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i +(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement) +i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o +(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h +(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o +(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7 +b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g +(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o +(e)d(this:)1927 5381 y(6)p eop end +%%Page: 7 8 +TeXDict begin 7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 +y Fs(Intr)l(oduction)0 1782 y Fq(SANE)22 b(is)i(an)g(application)k +(programming)e(interf)o(ace)h(\(API\))c(that)i(pro)o(vides)h +(standardized)i(access)e(to)e(an)o(y)g(raster)i(image)0 +1895 y(scanner)e(hardw)o(are.)30 b(The)22 b(standardized)27 +b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)g(dri)n(v)o(er)g +(for)g(each)g(scanner)i(de)n(vice)e(instead)0 2008 y(of)30 +b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e(application.)52 +b(The)30 b(reduction)i(in)e(the)h(number)g(of)f(required)i(dri)n(v)o +(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 b(sa)n(vings)h(in)d(de)n +(v)o(elopment)j(time.)j(More)23 b(importantly)-6 b(,)25 +b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f(which)h(applications)j +(can)0 2233 y(w)o(ork.)i(As)21 b(such,)h(it)g(will)f(enable)i +(applications)i(that)d(were)g(pre)n(viously)i(unheard)f(of)f(in)f(the)h +(UNIX)e(w)o(orld.)29 b(While)22 b(SANE)0 2346 y(is)27 +b(primarily)i(tar)n(geted)h(at)d(a)g(UNIX)e(en)l(vironment,)31 +b(the)d(standard)h(has)f(been)g(carefully)i(designed)f(to)f(mak)o(e)f +(it)g(possible)0 2459 y(to)c(implement)i(the)f(API)e(on)i(virtually)i +(an)o(y)d(hardw)o(are)i(or)f(operating)i(system.)0 2631 +y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h(Access)f(No)n(w) +f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f(that)g(SANE)e +(is)h(sane)i(in)f(the)g(sense)h(that)0 2744 y(it)g(will)f(allo)n(w)h +(easy)h(implementation)i(of)d(the)g(API)e(while)j(accommodating)i(all)d +(features)h(required)i(by)d(today')-5 b(s)25 b(scanner)0 +2857 y(hardw)o(are)31 b(and)f(applications.)51 b(Speci\002cally)-6 +b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g(to)f(accommodate)i +(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 b(digital)h(still)e(and)g +(video)g(cameras,)h(as)e(well)g(as)h(virtual)h(de)n(vices)g(lik)o(e)f +(image)g(\002le)f(\002lters.)0 3321 y Fn(2.1)119 b(T)-11 +b(erminology)0 3587 y Fq(An)21 b(application)j(that)e(uses)g(the)g +(SANE)d(interf)o(ace)k(is)f(called)g(a)f(SANE)e Fl(fr)l(ontend)p +Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g(implements)h(the)f(SANE)0 +3700 y(interf)o(ace)31 b(is)d(called)i(a)f(SANE)d Fl(bac)n(k)o(end)p +Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k Fq(pro)o(vides)e(some)d +(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 3812 +y(back)o(ends.)1927 5381 y(7)p eop end +%%Page: 8 9 +TeXDict begin 8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 +y Fs(The)51 b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 +b(is)j(de\002ned)g(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 +b(Accessing)32 b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h +(consists)g(of)0 1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 +b(v)n(arious)g(controls)h(of)e(the)h(scanner)g(need)g(to)f(be)g(setup)h +(or)f(queried.)44 b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 +2007 y(more)c(images)g(are)g(acquired.)0 2178 y(Since)33 +b(the)f(de)n(vice)i(controls)g(are)f(widely)g(dif)n(ferent)h(from)e(de) +n(vice)i(to)e(de)n(vice,)k(SANE)30 b(pro)o(vides)k(a)e(generic)i +(interf)o(ace)0 2291 y(that)25 b(mak)o(es)g(it)f(easy)h(for)g(a)f +(frontend)j(to)d(gi)n(v)o(e)h(a)f(user)h(access)g(to)g(all)f(controls)j +(without)e(ha)n(ving)i(to)d(understand)k(each)d(and)0 +2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 b(The)24 +b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h(each)g(de)n +(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p Fq(.)0 +2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n(alue)e +(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j(control) +e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)h(option) +h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g(an)f(inte)o +(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 2801 +y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f(not)f +(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30 +b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f +(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h +(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g +(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22 +b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h +Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e +(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f +(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back) +o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e +(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h +(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o +(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31 +b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h +(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227 +4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h +(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n +(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g +(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o +(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227 +4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e +(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227 +4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k +(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d +(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n +(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f +(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29 +b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o +(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f +(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4 +v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro) +o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h +(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f +(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n +(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i +(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927 +5381 y(8)p eop end +%%Page: 9 10 +TeXDict begin 9 9 bop 427 123 a Fp(#define)52 b(sane_read)e +(be_sane_read)227 310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g +(kind,)i(back)o(end)g Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d +Fp(be)p 2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p +Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i +(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n +(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227 +536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time) +f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136 +724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27 +b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i +(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227 +837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41 +b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e +(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d +(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o +(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30 +b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g +Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f +(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha) +n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got) +e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227 +1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f +(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6 +b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i +(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e +(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p +Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e +(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227 +1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d +(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30 +b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g +(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to) +227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.) +43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f +(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g +(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g +(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h +(that)f(scanner)-5 b(.)0 2479 y + currentpoint currentpoint translate 0.64821 0.64821 scale neg exch +neg exch translate + 0 2479 a 0 2479 a + gsave currentpoint currentpoint translate 270 neg rotate neg exch +neg exch translate + 0 2479 +a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550 +@rwi @setspecial +%%BeginDocument: figs/hierarchy.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: hierarchy.fig +%%Creator: fig2dev Version 3.1 Patchlevel 2 +%%CreationDate: Thu Jan 30 22:02:12 1997 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%Magnification: 1.00 +%%Orientation: Landscape +%%BoundingBox: 0 0 355 722 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-17.0 -17.0 translate + 90 rotate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n 0 612 m 0 0 l 792 0 l 792 612 l cp clip + 0.06000 0.06000 sc +% Polyline +n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr +% Polyline +n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr +15.000 slw +% Polyline +n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +11399 5182 m +gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +8099 5182 m +gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr +% Polyline +n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr +% Polyline +n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr +% Polyline +n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr +% Polyline +n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr +7.500 slw +% Polyline +n 2700 1800 m 1200 3000 l gs col-1 s gr +% Polyline +n 3000 1800 m 3000 3000 l gs col-1 s gr +% Polyline +n 3300 1800 m 4800 3000 l gs col-1 s gr +% Polyline +n 9600 1800 m 9600 2100 l gs col-1 s gr +% Polyline +n 9450 2700 m 8100 4800 l gs col-1 s gr +% Polyline +n 11400 4200 m 11400 4800 l gs col-1 s gr +% Polyline +n 1200 3600 m 1200 4200 l gs col-1 s gr +% Polyline +n 3000 3600 m 3000 4125 l gs col-1 s gr +% Polyline +n 7875 5400 m 7350 5850 l gs col-1 s gr +% Polyline +n 8250 5400 m 8775 5850 l gs col-1 s gr +% Polyline +n 11475 5400 m 11475 5850 l gs col-1 s gr +15.000 slw +% Polyline +n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr +% Polyline +n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr +7.500 slw +% Polyline +n 9750 2700 m 11400 3600 l gs col-1 s gr +% Interp Spline +gs n 4800 3600 m + 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto + 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto + 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto + 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto + 7224.0 624.7 8573.7 446.9 9450 900 curveto + 9524.5 938.5 9562.0 1013.5 9600 1200 curveto + gs col-1 s gr + gr + +/Helvetica ff 270.00 scf sf +1199 3382 m +gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 3382 m +gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +1200 4425 m +gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 4380 m +gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +7350 6165 m +gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +8925 6165 m +gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +11475 6135 m +gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 600 m +gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +9600 630 m +gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +4725 5850 m +gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 1582 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +4799 3382 m +gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 1582 m +gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 2482 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +11399 3982 m +gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs + +%%EndDocument + @endspecial 2958 2479 a + currentpoint grestore moveto + 2958 2479 a 0 2479 a + currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale +neg exch neg exch translate + 0 2479 +a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0 +4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h +(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44 +b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g +(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f +(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0 +5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h +(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i +(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop end +%%Page: 10 11 +TeXDict begin 10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j +(called)e Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p +Fq(.)36 b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i +(whereas)d(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f +(pro)o(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h +(scanners.)51 b(In)30 b(the)g(\002gure,)i(machine)f(B)0 +349 y(pro)o(vides)h(non-local)h(access)f(to)e(its)g(scanners)i(through) +h(the)d(SANE)e(frontend)k(called)g Fp(saned)p Fq(.)45 +b(The)30 b Fp(saned)d Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h +Fp(hp)e Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another) +f(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22 +b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f +(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f +(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i +(called)f Fp(qcam)p Fq(.)0 849 y(Note)f(that)g(a)g(meta)g(back)o(end)i +(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g +(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0 +962 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h +(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g +(frontends)i(that)f(access)g(it.)0 1075 y(The)j(name)g(\223meta)h(back) +o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e +(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0 +1188 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0 +1526 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1782 +y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h +(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f +(represented.)57 b(The)0 1895 y(SANE)34 b(approach)39 +b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation) +j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0 +2008 y(applications)f(and)c(de)n(vices.)59 b(While)34 +b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has) +f(been)g(de\002ned)g(carefully)h(to)0 2121 y(allo)n(w)h(e)o(xtending)i +(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g +(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0 +2234 y(accommodate)26 b(future)e(applications)k(or)23 +b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g +(this)g(standard)h(w)o(as)f(created.)0 2396 y(A)19 b(SANE)f(image)j(is) +f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n +(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0 +2509 y(At)30 b(the)h(intersection)i(of)e(each)g(ro)n(w)f(and)h(column)h +(is)e(a)g(quadratic)j(pix)o(el.)51 b(A)29 b(pix)o(el)i(consists)i(of)d +(one)h(or)g(more)f(sample)0 2621 y(v)n(alues.)40 b(Each)26 +b(sample)i(v)n(alue)g(represents)h(one)e(channel)i(\(e.g.,)e(the)g(red) +g(channel\).)41 b(Each)27 b(sample)g(v)n(alue)h(has)f(a)g(certain)0 +2734 y(bit)f(depth.)38 b(The)26 b(bit)h(depth)g(is)f(\002x)o(ed)g(for)g +(the)h(entire)g(image)g(and)g(can)f(be)g(as)h(small)f(as)g(one)h(bit.) +37 b(V)-10 b(alid)26 b(bit)h(depths)g(are)g(1,)0 2847 +y(8,)h(or)f(16)g(bits)h(per)g(sample.)41 b(If)27 b(a)g(de)n(vice')-5 +b(s)29 b(natural)g(bit)f(depth)g(is)g(something)h(else,)g(it)e(is)g(up) +g(to)h(the)f(dri)n(v)o(er)h(to)g(scale)g(the)0 2960 y(sample)h(v)n +(alues)g(appropriately)j(\(e.g.,)c(a)g(4)g(bit)g(sample)h(could)g(be)f +(scaled)h(by)f(a)g(f)o(actor)h(of)f(four)h(to)f(represent)i(a)d(sample) +0 3073 y(v)n(alue)d(of)g(depth)h(8\).)0 3367 y Fm(3.2.1)99 +b(Image)24 b(T)-7 b(ransmission)0 3591 y Fq(The)26 b(SANE)f(API)g +(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39 +b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0 +3704 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f +(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67 +b(F)o(or)35 b(e)o(xample,)40 b(a)0 3817 y(red/green/blue)34 +b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f +(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0 +3929 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g +(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g +(containing)j(the)e(red)0 4042 y(channel,)25 b(the)f(second)h(the)f +(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0 +4204 y(Conceptually)-6 b(,)34 b(each)d(frame)f(is)g(transmitted)i(a)e +(byte)h(at)f(a)f(time.)48 b(Each)30 b(byte)h(may)e(contain)j(8)e +(sample)h(v)n(alues)g(\(for)f(an)0 4317 y(image)c(bit)h(depth)g(of)f +(1\),)g(one)h(full)f(sample)h(v)n(alue)g(\(for)g(an)f(image)g(bit)g +(depth)i(of)e(8\),)g(or)g(a)f(partial)j(sample)f(v)n(alue)g(\(for)f(an) +0 4430 y(image)k(bit)g(depth)h(of)f(16)g(or)g(bigger\).)49 +b(In)30 b(the)g(latter)h(case,)g(the)g(bytes)g(of)e(each)i(sample)f(v)n +(alue)h(are)f(transmitted)i(in)e(the)0 4543 y(machine')-5 +b(s)33 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)54 b(F)o(or)31 +b(depth)i(1,)g(the)f(leftmost)h(pix)o(el)f(is)f(stored)i(in)f(the)g +(most)g(signi\002cant)h(bit,)h(and)e(the)0 4656 y(rightmost)25 +b(pix)o(el)f(in)g(the)g(least)g(signi\002cant)i(bit.)1357 +4872 y Fr(Back)o(end)c(Implementation)i(Note)227 5019 +y Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h +(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f +(adjusted)227 5132 y(appropriately)32 b(if)c(necessary)-6 +b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i +(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)1905 +5381 y(10)p eop end +%%Page: 11 12 +TeXDict begin 11 11 bop 227 123 a Fq(the)28 b(proxy)g(may)f(inform)g +(the)h(back)o(end)h(of)e(the)g(serv)o(er')-5 b(s)29 b(byte)e(order)-5 +b(.)41 b(The)26 b(back)o(end)j(can)f(then)f(apply)i(the)227 +236 y(adjustment)d(if)d(necessary)-6 b(.)32 b(In)23 b(essence,)i(this)f +(implements)h(a)e(\223recei)n(v)o(er)n(-mak)o(es-right)q(\224)29 +b(approach.)975 1410 y @beginspecial 0 @llx 0 @lly 362 +@urx 182 @ury 2340 @rwi @setspecial +%%BeginDocument: figs/xfer.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: xfer.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:30 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 362 182 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-134.0 370.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +15.000 slw +% Polyline +n 2400 3300 m 8100 3300 l gs col-1 s gr +n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3375 m 2400 3675 l gs col-1 s gr +15.000 slw +n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 3750 m 8100 3750 l gs col-1 s gr +n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3825 m 2400 4125 l gs col-1 s gr +15.000 slw +n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr +15.000 slw +% Polyline +n 2400 4200 m 8100 4200 l gs col-1 s gr +n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 4275 m 2400 4575 l gs col-1 s gr +15.000 slw +n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 4650 m 8100 4650 l gs col-1 s gr +n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1111 1606 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24 +b(order)h(of)e(image)h(data)g(bytes)0 1918 y(The)f(order)i(in)f(which)g +(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e +(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0 +2031 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g +(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e +(right-most)i(column.)30 b(The)0 2144 y(left-to-right,)35 +b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h +(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 2257 +y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g +(e)o(xample\).)0 2429 y(If)d(a)g(frame)h(contains)h(multiple)g +(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f +(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0 +2542 y(illustrates)31 b(this)e(for)g(the)f(case)h(where)g(a)f(frame)h +(contains)h(a)e(complete)i(red/green/blue)j(image)28 +b(with)h(a)f(bit-depth)j(of)d(8.)0 2654 y(F)o(or)f(a)g(bit)h(depth)g +(of)g(1,)g(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g +Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h +(depth)h(1)0 2767 y(frame)24 b(is)f(transmitted)j(in)d(a)g(byte)i +(interlea)n(v)o(ed)h(f)o(ashion.)390 3444 y @beginspecial +0 @llx 0 @lly 521 @urx 93 @ury 3744 @rwi @setspecial +%%BeginDocument: figs/image-data.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: image-data.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:36 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 521 93 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-88.0 120.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +1875 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3225 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +4575 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l + 5850 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +2475 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 600 m +gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +5925 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +7275 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +8625 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l + 9900 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +6525 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 600 m +gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1950 m +gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1950 m +gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +6525 1950 m +gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1950 m +gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1950 m +gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2475 1950 m +gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +10050 1275 m +gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1125 m +gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1148 3640 a(Figure)e(3.3:)29 b(Bit)23 b(and)h(byte)g +(order)h(or)e(image)h(data)0 3952 y(When)30 b(transmitting)i(an)e +(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h +(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 4065 y(represents)e +(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31 +b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f +(frame)g(with)0 4178 y(a)f(type.)30 b(This)23 b(v)o(ersion)i(of)e(the)h +(SANE)d(standard)26 b(supports)g(the)e(follo)n(wing)h(frame)e(types:) +227 4424 y Fp(SANE)p 452 4424 28 4 v 31 w(FRAME)p 758 +4424 V 31 w(GRAY)p Fr(:)44 b Fq(The)24 b(frame)i(contains)h(a)e(single) +i(channel)g(of)f(data)g(that)f(represents)k(sample)d(v)n(al-)427 +4537 y(ues)i(from)g(a)f(spectral)j(band)f(that)f(co)o(v)o(ers)g(the)g +(human)h(visual)g(range.)42 b(The)28 b(image)g(consists)i(of)d(this)427 +4650 y(frame)d(only)-6 b(.)227 4796 y Fp(SANE)p 452 4796 +V 31 w(FRAME)p 758 4796 V 31 w(RGB)p Fr(:)44 b Fq(The)31 +b(frame)h(contains)i(three)f(channels)h(of)d(data)i(that)f(represent)i +(sample)f(v)n(alues)427 4909 y(from)f(the)h(red,)h(green,)h(and)e(blue) +g(spectral)h(bands.)56 b(The)32 b(sample)h(v)n(alues)g(are)f(interlea)n +(v)o(ed)k(in)c(the)427 5022 y(order)25 b(red,)e(green,)i(and)f(blue.)29 +b(The)23 b(image)h(consists)i(of)d(this)h(frame)g(only)-6 +b(.)1905 5381 y(11)p eop end +%%Page: 12 13 +TeXDict begin 12 12 bop 227 123 a Fp(SANE)p 452 123 28 +4 v 31 w(FRAME)p 758 123 V 31 w(RED)p Fr(:)44 b Fq(The)36 +b(frame)h(contains)i(one)f(channel)g(of)f(data)g(that)h(represents)h +(sample)f(v)n(alues)427 236 y(from)j(the)g(red)f(spectral)j(band.)81 +b(The)40 b(complete)i(image)f(consists)h(of)f(three)g(frames:)64 +b Fp(SANE)p 3592 236 V 31 w(-)427 349 y(FRAME)p 707 349 +V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 349 V 31 w(FRAME)p +1480 349 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p 2216 349 +V 31 w(FRAME)p 2522 349 V 30 w(BLUE)p Fq(.)d(The)h(order)j(in)e(which)h +(the)427 462 y(frames)24 b(are)g(transmitted)i(chosen)f(by)f(the)g +(back)o(end.)227 608 y Fp(SANE)p 452 608 V 31 w(FRAME)p +758 608 V 31 w(GREEN)p Fr(:)43 b Fq(The)26 b(frame)g(contains)i(one)e +(channel)i(of)e(data)g(that)h(represents)h(sample)f(v)n(alues)427 +721 y(from)35 b(the)g(green)h(spectral)h(band.)63 b(The)35 +b(complete)h(image)f(consists)i(of)e(three)h(frames:)52 +b Fp(SANE)p 3592 721 V 31 w(-)427 834 y(FRAME)p 707 834 +V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 834 V 31 w(FRAME)p +1480 834 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p 2216 834 +V 31 w(FRAME)p 2522 834 V 30 w(BLUE)p Fq(.)d(The)h(order)j(in)e(which)h +(the)427 946 y(frames)24 b(are)g(transmitted)i(chosen)f(by)f(the)g +(back)o(end.)227 1093 y Fp(SANE)p 452 1093 V 31 w(FRAME)p +758 1093 V 31 w(BLUE)p Fr(:)44 b Fq(The)30 b(frame)i(contains)h(one)f +(channel)i(of)d(data)h(that)g(represents)i(sample)e(v)n(alues)427 +1205 y(from)38 b(the)g(blue)h(spectral)h(band.)72 b(The)38 +b(complete)h(image)f(consists)i(of)e(three)h(frames:)58 +b Fp(SANE)p 3592 1205 V 31 w(-)427 1318 y(FRAME)p 707 +1318 V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 1318 V 31 +w(FRAME)p 1480 1318 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p +2216 1318 V 31 w(FRAME)p 2522 1318 V 30 w(BLUE)p Fq(.)d(The)h(order)j +(in)e(which)h(the)427 1431 y(frames)24 b(are)g(transmitted)i(chosen)f +(by)f(the)g(back)o(end.)0 1678 y(In)i(frames)i(of)e(type)h +Fp(SANE)p 883 1678 V 31 w(FRAME)p 1189 1678 V 31 w(GRAY)p +Fq(,)c(when)k(the)g(bit)f(depth)i(is)e(1)h(there)g(are)g(only)g(tw)o(o) +f(sample)i(v)n(alues)f(possible,)0 1791 y(1)c(represents)k(minimum)c +(intensity)j(\(black\))g(and)e(0)f(represents)j(maximum)e(intensity)i +(\(white\).)k(F)o(or)23 b(all)g(other)i(bit)f(depth)0 +1903 y(and)g(frame)f(type)h(combinations,)h(a)e(sample)h(v)n(alue)g(of) +f(0)f(represents)k(minimum)d(intensity)i(and)f(lar)n(ger)h(v)n(alues)f +(represent)0 2016 y(increasing)i(intensity)-6 b(.)0 2188 +y(The)34 b(combination)j(of)d(bit)g(depth)h(1)f(and)h +Fp(SANE)p 1605 2188 V 30 w(FRAME)p 1910 2188 V 31 w(RGB)d +Fq(\(or)i Fp(SANE)p 2497 2188 V 31 w(FRAME)p 2803 2188 +V 31 w(RED)p Fq(,)d Fp(SANE)p 3273 2188 V 31 w(FRAME)p +3579 2188 V 31 w(GREEN)p Fq(,)0 2301 y Fp(SANE)p 225 +2301 V 31 w(FRAME)p 531 2301 V 30 w(BLUE)p Fq(\))22 b(is)h(rarely)i +(used)f(and)g(may)f(not)h(be)g(supported)i(by)e(e)n(v)o(ery)g +(frontend.)1905 5381 y(12)p eop end +%%Page: 13 14 +TeXDict begin 13 13 bop 0 801 a Fo(Chapter)44 b(4)0 1271 +y Fs(The)51 b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 +1520 y(Interface)e(\(API\))0 2021 y Fq(This)27 b(Section)h(de\002nes)h +(v)o(ersion)f(1)f(of)h(the)f(SANE)e(application)31 b(programmer)e +(interf)o(ace)g(\(API\).)d(An)o(y)h(SANE)e(frontend)0 +2134 y(must)e(depend)h(on)f(the)g(interf)o(ace)i(de\002ned)f(in)f(this) +g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o(y)-6 +b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0 +2247 y(its)31 b(functionality)k(in)c(accordance)j(with)d(this)h +(speci\002cation.)54 b(The)31 b(interf)o(ace)i(as)e(documented)j(here)d +(is)g(declared)j(as)d(a)0 2359 y(C)h(callable)i(interf)o(ace)h(in)e(a)f +(\002le)g(called)i Fp(sane/sane.h)p Fq(.)51 b(This)32 +b(\002le)g(should)j(normally)f(be)f(included)i(via)e(a)f(C)g(pre-)0 +2472 y(processor)26 b(directi)n(v)o(e)f(of)f(the)g(form:)109 +2708 y Fp(#include)51 b()0 3055 y Fn(4.1)119 +b(V)-12 b(ersion)30 b(Contr)n(ol)0 3317 y Fq(The)22 b(SANE)d(standard) +25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28 +b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e +(made)h(that)0 3430 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d +(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e +(major)g(v)o(ersion)h(number)0 3543 y(must)k(be)g(increased.)51 +b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30 +b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g +(of)0 3656 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g +(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h +(compatiblity)h(by)0 3769 y(allo)n(wing)26 b(major)f(numbers)h(that)g +(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o +(vided)h(the)e(frontend)i(really)f(can)0 3882 y(cope)i(with)f(the)g +(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o +(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o +(ersion)0 3995 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i +(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o +(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4108 +y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f +(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n +(ferent)g(names.)0 4276 y(SANE)i(v)o(ersion)k(control)g(also)f +(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n +(vision.)48 b(While)30 b(control)h(of)e(these)0 4389 +y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o +(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28 +b(The)20 b(minor)h(v)o(ersion)0 4502 y(is)26 b(incremented)i(with)e +(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38 +b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n +(uild)g(of)f(a)0 4615 y(back)o(end.)0 4783 y(The)d(SANE)e(API)h(pro)o +(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o +(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4 +v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29 +b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d +(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905 +5381 y(13)p eop end +%%Page: 14 15 +TeXDict begin 14 14 bop 227 123 a Fp(SANE)p 452 123 28 +4 v 31 w(VERSION)p 868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p +Fl(min)p Fp(,)p Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 +b(macro)g(can)h(be)f(used)g(to)g(b)n(uild)i(a)d(monotonically)427 +236 y(increasing)i(v)o(ersion)e(code.)64 b(A)34 b(SANE)f(v)o(ersion)j +(code)g(consists)h(of)e(the)g(SANE)d(standard)38 b(major)427 +349 y(v)o(ersion)25 b(number)f(\()p Fl(maj)p Fq(\),)f(the)h(minor)f(v)o +(ersion)i(number)f Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g +(of)e(a)g(back)o(end)427 462 y(\()p Fl(bld)p Fq(\).)39 +b(The)27 b(major)g(and)g(minor)g(v)o(ersion)h(numbers)g(must)f(be)f(in) +h(the)g(range)h(0.)14 b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 +574 y(re)n(vision)f(must)d(be)h(in)f(the)h(range)h(0.)14 +b(.)g(.)g(65535.)427 704 y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic) +i(in)e(the)h(sense)g(that)f(it)g(is)g(possible)i(to)e(apply)i +(relational)g(operators)427 817 y(\(e.g.,)21 b(equality)j(or)d +(less-than)j(test\))e(directly)h(on)e(the)h(v)o(ersion)h(code)f(rather) +g(than)h(indi)n(vidually)h(on)e(the)427 930 y(three)j(components)h(of)d +(the)h(v)o(ersion)h(code.)427 1059 y(Note)34 b(that)g(the)g(major)f(v)o +(ersion)i(number)g(alone)f(determines)i(whether)e(a)f(frontend/back)o +(end)39 b(pair)427 1172 y(is)31 b(compatible.)51 b(The)30 +b(minor)h(v)o(ersion)h(and)f(the)g(b)n(uild)h(re)n(vision)g(are)f(used) +g(for)g(informational)i(and)427 1285 y(b)n(ug-\002xing)26 +b(purposes)g(only)-6 b(.)227 1431 y Fp(SANE)p 452 1431 +V 31 w(VERSION)p 868 1431 V 30 w(MAJOR\()p Fl(vc)p Fp(\))p +Fr(:)43 b Fq(This)32 b(macro)h(returns)h(the)f(major)g(v)o(ersion)h +(number)f(component)i(of)427 1544 y(the)24 b(v)o(ersion)h(code)f +(passed)i(in)d(ar)n(gument)i Fl(vc)p Fq(.)227 1690 y +Fp(SANE)p 452 1690 V 31 w(VERSION)p 868 1690 V 30 w(MINOR\()p +Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)g(returns)h(the)g(minor)f +(v)o(ersion)h(number)g(component)h(of)427 1803 y(the)24 +b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i Fl(vc)p +Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p 868 +1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18 +b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d +(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j +Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0 +2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23 +b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f +(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o +(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59 +b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52 +b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31 +w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g +(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f +(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c +Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n +(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f +Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068 +y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g +Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15 +b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j +Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in) +e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j +Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d +Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24 +b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e +(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i +Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33 +b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i +(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25 +b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p +Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o +(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j +(mapping.)1905 5381 y(14)p eop end +%%Page: 15 16 +TeXDict begin 15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 +b(T)-7 b(ype)0 356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 +b Fq(is)j(used)h(for)g(v)n(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g +(the)h(tw)o(o)e(truth)i(v)n(alues)h Fp(SANE)p 2934 356 +V 31 w(FALSE)20 b Fq(and)j Fp(SANE)p 3633 356 V 31 w(TRUE)p +Fq(.)0 469 y(The)d(former)h(v)n(alue)g(is)g(de\002ned)g(to)f(be)h(0,)f +(whereas)i(the)e(latter)i(is)e(1.)2097 436 y Fg(1)2162 +469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)h(are)e(gi)n(v)o +(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 b(SANE_FALSE)322 +b(0)227 828 y(#define)52 b(SANE_TRUE)377 b(1)227 941 +y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 y Fq(Note)34 +b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)g(of)g +Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e(le)o +(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 b(in)g(place)g(of)g +(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 b(for)h(clarity)-6 +b(,)27 b(it)e(is)h(recommended)h(to)f(use)g Fp(SANE_Bool)20 +b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 1413 y(v)n(ariable)g(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(boolean)h(object.)0 1721 y Fm(4.2.3)99 +b(Integer)26 b(T)-7 b(ype)0 1954 y Fp(SANE)p 225 1954 +V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h(that)f(can)g(tak)o +(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h Fk(\000)p +Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e Fj(2)3011 +1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 b(Its)25 +b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0 +2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f +(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays) +f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672 +y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27 +b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f +Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0 +2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0 +3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326 +y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n +(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in) +f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p +Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e +Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27 +b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6 +b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103 +b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0 +4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p +940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22 +b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29 +b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f +(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p +Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26 +b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p +Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g +(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5 +b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24 +b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17 +b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36 +b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros) +h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g +(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p +0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19 +b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g +(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905 +5381 y Fq(15)p eop end +%%Page: 16 17 +TeXDict begin 16 16 bop 227 123 a Fp(SANE)p 452 123 28 +4 v 31 w(FIX\()p Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 +b(the)g(lar)n(gest)h(SANE)c(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f +(smaller)h(than)g(the)f(double)427 236 y(v)n(alue)d Fl(d)p +Fq(.)45 b(No)28 b(range)i(checking)h(is)e(performed.)47 +b(If)29 b(the)g(v)n(alue)h(of)f Fl(d)f Fq(is)h(out)h(of)e(range,)k(the) +d(result)h(is)427 349 y(unde\002ned.)227 495 y Fp(SANE)p +452 495 V 31 w(UNFIX\()p Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g +(nearest)g(double)h(machine)f(number)g(that)g(corresponds)i(to)d(\002x) +o(ed-)427 608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 +y(SANE)j(does)j Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o +(o)e(e)o(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n +(alues)g(of)g Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 +y(range\):)227 1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48 +b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48 +b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i +(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6 +b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0 +1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw) +o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0 +2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29 +b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o +(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g +(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d +Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48 +b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x) +o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27 +b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f +(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0 +2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50 +b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to) +f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o +(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227 +3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23 +b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695 +V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f +(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27 +b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f +Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52 +b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e +(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h +Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d +Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f +(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23 +b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773 +y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26 +b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i +(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905 +5381 y(16)p eop end +%%Page: 17 18 +TeXDict begin 17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 +b(Handle)f(T)-7 b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e +(pro)o(vided)i(through)g(an)e(opaque)i(type)f(called)h +Fp(SANE)p 2560 356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 +b(C)g(declaration)32 b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g +(belo)n(w)-6 b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0 +961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n +(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e +(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p +Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f +(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n +(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0 +1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f +(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether) +f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57 +b(If)31 b(an)h(operation)j(completes)e(successfully)-6 +b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56 +b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f +(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30 +b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0 +1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23 +b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p +2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f +(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385 +2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p +1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p +3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113 +v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p +1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p +2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6 +b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660 +2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p +1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25 +b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435 +2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627 +V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083 +2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661 +V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31 +w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p +1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n +(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V +435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021 +2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083 +2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p +3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966 +28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000 +4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n +(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113 +V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p +1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p +2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514 +3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4 +v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31 +w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100 +w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226 +V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31 +w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p +1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er) +e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p +660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161 +3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083 +3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514 +3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4 +v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31 +w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100 +w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435 +3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643 +V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4 +113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f +(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519 +3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0 +4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7 +b(ype)0 4497 y Fq(Each)27 b(SANE)d(de)n(vice)k(is)f(represented)j(by)c +(a)h(structure)i(of)e(type)g Fp(SANE)p 2300 4497 28 4 +v 31 w(Device)p Fq(.)35 b(The)26 b(C)g(declaration)k(of)d(this)g(type)g +(is)0 4610 y(gi)n(v)o(en)d(belo)n(w)-6 b(.)227 4856 y +Fp(typedef)52 b(struct)336 4969 y({)445 5082 y(SANE_String_Cons)o(t)c +(name;)1905 5381 y Fq(17)p eop end +%%Page: 18 19 +TeXDict begin 18 18 bop 445 123 a Fp(SANE_String_Cons)o(t)48 +b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445 +349 y(SANE_String_Cons)o(t)g(type;)336 462 y(})227 574 +y(SANE_Device;)0 821 y Fq(The)24 b(structure)i(pro)o(vides)g(the)f +(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p +Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0 +934 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019 +934 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h +(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39 +b(The)25 b(only)0 1047 y(constraints)30 b(are)d(that)g(the)h(name)e(is) +h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o +(end)i(and)e(that)h(the)f(name)g(is)g(a)0 1160 y(le)o(gal)c(SANE)d(te)o +(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique) +j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30 +b(It)22 b(is)0 1272 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k) +o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32 +b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0 +1385 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g +(names.)0 1557 y(The)e(remaining)i(members)f(in)g(the)g(de)n(vice)g +(structure)i(pro)o(vide)f(additional)i(information)f(on)d(the)h(de)n +(vice)h(corresponding)0 1670 y(to)31 b(the)g(unique)i(name.)52 +b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f +Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e +(that)g(gi)n(v)o(e)0 1783 y(information)g(on)e(the)g(v)o(endor)h +(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n +(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0 +1896 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g +(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g +(arises\):)p 284 2018 1563 4 v 282 2131 4 113 v 773 2097 +a Fr(V)-9 b(endor)23 b(Strings)p 1845 2131 V 284 2135 +1563 4 v 284 2151 V 282 2264 4 113 v 334 2230 a Fp(AGFA)697 +b(Minolta)p 1845 2264 V 282 2377 V 334 2343 a(Abaton)587 +b(Mitsubishi)p 1845 2377 V 282 2490 V 334 2456 a(Acer)697 +b(Mustek)p 1845 2490 V 282 2603 V 334 2569 a(Apple)642 +b(NEC)p 1845 2603 V 282 2716 V 334 2682 a(Artec)g(Nikon)p +1845 2716 V 282 2829 V 334 2795 a(Avision)532 b(Plustek)p +1845 2829 V 282 2942 V 334 2908 a(CANON)642 b(Polaroid)p +1845 2942 V 282 3054 V 334 3021 a(Connectix)422 b(Relisys)p +1845 3054 V 282 3167 V 334 3134 a(Epson)642 b(Ricoh)p +1845 3167 V 282 3280 V 334 3246 a(Fujitsu)532 b(Sharp)p +1845 3280 V 282 3393 V 334 3359 a(Hewlett-Packar)o(d)93 +b(Siemens)p 1845 3393 V 282 3506 V 334 3472 a(IBM)752 +b(Tamarack)p 1845 3506 V 282 3619 V 334 3585 a(Kodak)642 +b(UMAX)p 1845 3619 V 282 3732 V 334 3698 a(Logitech)477 +b(Noname)p 1845 3732 V 282 3845 V 334 3811 a(Microtek)p +282 3958 V 1845 3958 V 284 3961 1563 4 v 2153 2018 1464 +4 v 2151 2131 4 113 v 2639 2097 a Fr(T)-7 b(ype)23 b(Strings)p +3615 2131 V 2153 2135 1464 4 v 2153 2151 V 2151 2264 +4 113 v 2203 2230 a Fp(film)53 b(scanner)p 3615 2264 +V 2151 2377 V 2203 2343 a(flatbed)e(scanner)p 3615 2377 +V 2151 2490 V 2203 2456 a(frame)h(grabber)p 3615 2490 +V 2151 2603 V 2203 2569 a(handheld)f(scanner)p 3615 2603 +V 2151 2716 V 2203 2682 a(multi-function)d(peripheral)p +3615 2716 V 2151 2829 V 2203 2795 a(sheetfed)j(scanner)p +3615 2829 V 2151 2942 V 2203 2908 a(still)h(camera)p +3615 2942 V 2151 3054 V 2203 3021 a(video)g(camera)p +3615 3054 V 2151 3167 V 2203 3134 a(virtual)f(device)p +3615 3167 V 2153 3171 1464 4 v 1053 4114 a Fq(T)-7 b(able)24 +b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0 +4427 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26 +b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f +(no)g(physical)i(v)o(endor)f(associated.)0 4539 y(Also,)c(there)h(are)f +(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o +(endor)h(speci\002c)g(and)f(therefore)i(completely)0 +4652 y(under)c(control)g(of)e(the)h(respecti)n(v)o(e)i(back)o(ends.) +1905 5381 y(18)p eop end +%%Page: 19 20 +TeXDict begin 19 19 bop 0 123 a Fm(4.2.9)99 b(Option)25 +b(Descriptor)g(T)-7 b(ype)0 356 y Fq(Option)23 b(descriptors)j(are)d +(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h(and)f(po)n(werful)h +(type)f(in)g(the)f(SANE)f(standard.)30 b(Options)0 469 +y(are)h(used)g(to)f(control)j(virtually)g(all)d(aspects)i(of)f(de)n +(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n(wer)f(of)h(the)g +(SANE)d(API)h(stems)0 582 y(from)22 b(the)h(f)o(act)g(that)g(most)g(de) +n(vice)h(controls)g(are)f(completely)i(described)g(by)d(their)i +(respecti)n(v)o(e)g(option)g(descriptor)-5 b(.)31 b(Thus,)0 +695 y(a)21 b(frontend)i(can)e(control)i(a)e(scanner)i(abstractly)-6 +b(,)24 b(without)e(requiring)i(kno)n(wledge)f(as)e(to)g(what)g(the)g +(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 807 y(option)27 +b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 b(a)d(scanner)i(can)f(describe)h +(its)e(controls)j(without)e(requiring)i(kno)n(wledge)f(of)e(ho)n(w)f +(the)i(frontend)0 920 y(operates.)31 b(The)23 b(C)f(declaration)27 +b(of)c(the)h Fp(SANE)p 1485 920 28 4 v 31 w(Option)p +1846 920 V 30 w(Descriptor)18 b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n +(w)-6 b(.)227 1167 y Fp(typedef)52 b(struct)336 1280 +y({)445 1393 y(SANE_String_Cons)o(t)c(name;)445 1505 +y(SANE_String_Cons)o(t)g(title;)445 1618 y(SANE_String_Cons)o(t)g +(desc;)445 1731 y(SANE_Value_Type)g(type;)445 1844 y(SANE_Unit)j(unit;) +445 1957 y(SANE_Int)g(size;)445 2070 y(SANE_Int)g(cap;)445 +2183 y(SANE_Constraint_)o(Ty)o(pe)d(constraint_type)o(;)445 +2296 y(union)555 2409 y({)664 2522 y(const)k(SANE_String_Con)o(st)c +(*string_list;)664 2635 y(const)k(SANE_Word)e(*word_list;)664 +2747 y(const)i(SANE_Range)e(*range;)555 2860 y(})445 +2973 y(constraint;)336 3086 y(})227 3199 y(SANE_Option_Des)o(cri)o(pt)o +(or)o(;)0 3504 y Fr(Option)23 b(Name)0 3737 y Fq(Member)k +Fp(name)e Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e +(option.)40 b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o +(en)i(de)n(vice)0 3850 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h +(dif)n(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g +(unique\).)55 b(The)31 b(option)i(name)f(must)0 3962 +y(consist)e(of)d(lo)n(wer)n(-case)j(ASCII)c(letters)k(\()p +Fp(a)p Fq(\226)p Fp(z)p Fq(\),)e(digits)h(\()p Fp(0)p +Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i(dash)f(character)i(\()p +Fp(-)p Fq(\))d(only)-6 b(.)43 b(The)27 b(\002rst)h(character)0 +4075 y(must)c(be)f(a)g(lo)n(wer)n(-case)j(ASCII)c(character)j(\(i.e.,)e +(not)h(a)f(digit)i(or)e(a)g(dash\).)0 4380 y Fr(Option)g(T)n(itle)0 +4613 y Fq(Member)e Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g +(can)g(be)f(used)h(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 +b(This)21 b(should)i(typically)0 4726 y(be)h(a)f(short)h(\(one)g(or)g +(tw)o(o-w)o(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h +(function)i(of)d(the)h(option.)1905 5381 y(19)p eop end +%%Page: 20 21 +TeXDict begin 20 20 bop 0 123 a Fr(Option)23 b(Description)0 +356 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e +(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to) +g(describe)i(the)e(option.)35 b(It)24 b(is)0 469 y(the)g +(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h +(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e +(this)0 582 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i +(breaks.)0 886 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0 +1119 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the) +g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h +Fp(SANE)p 3217 1119 28 4 v 31 w(Value)p 3523 1119 V 31 +w(Type)c Fq(are)0 1232 y(described)26 b(in)e(T)-7 b(able)23 +b(4.3.)p 115 1336 3670 4 v 113 1449 4 113 v 433 1415 +a Fr(Symbol)p 1042 1449 V 368 w(Code)p 1344 1449 V 1044 +w(Description)p 3783 1449 V 115 1453 3670 4 v 115 1469 +V 113 1582 4 113 v 165 1548 a Fp(SANE)p 390 1548 28 4 +v 31 w(TYPE)p 641 1548 V 31 w(BOOL)p 1042 1582 4 113 +v 207 w Fq(0)p 1344 1582 V 256 w(Option)h(v)n(alue)h(is)e(of)h(type)g +Fp(SANE_Bool)p Fq(.)p 3783 1582 V 113 1695 V 165 1661 +a Fp(SANE)p 390 1661 28 4 v 31 w(TYPE)p 641 1661 V 31 +w(INT)p 1042 1695 4 113 v 262 w Fq(1)p 1344 1695 V 256 +w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Int)p +Fq(.)p 3783 1695 V 113 1808 V 165 1774 a Fp(SANE)p 390 +1774 28 4 v 31 w(TYPE)p 641 1774 V 31 w(FIXED)p 1042 +1808 4 113 v 152 w Fq(2)p 1344 1808 V 256 w(Option)g(v)n(alue)h(is)e +(of)h(type)g Fp(SANE_Fixed)p Fq(.)p 3783 1808 V 113 1921 +V 165 1887 a Fp(SANE)p 390 1887 28 4 v 31 w(TYPE)p 641 +1887 V 31 w(STRING)p 1042 1921 4 113 v 97 w Fq(3)p 1344 +1921 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p +Fq(.)p 3783 1921 V 113 2485 4 565 v 165 2000 a Fp(SANE)p +390 2000 28 4 v 31 w(TYPE)p 641 2000 V 31 w(BUTTON)p +1042 2485 4 565 v 97 w Fq(4)p 1344 2485 V 256 w(An)31 +b(option)h(of)g(this)f(type)h(has)g(no)f(v)n(alue.)53 +b(Instead,)35 b(setting)e(an)e(option)1395 2113 y(of)j(this)h(type)g +(has)g(an)f(option-speci\002c)k(side-ef)n(fect.)63 b(F)o(or)33 +b(e)o(xample,)38 b(a)1395 2226 y(b)n(utton-typed)k(option)d(could)g(be) +f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j(a)1395 +2339 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g(to)f(the) +h(tell)f(an)h(automatic)h(doc-)1395 2451 y(ument)24 b(feeder)h(to)e +(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5 +b(.)p 3783 2485 V 113 3163 4 678 v 165 2564 a Fp(SANE)p +390 2564 28 4 v 31 w(TYPE)p 641 2564 V 31 w(GROUP)p 1042 +3163 4 678 v 152 w Fq(5)p 1344 3163 V 256 w(An)28 b(option)i(of)e(this) +h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e +(group)1395 2677 y(logically)35 b(related)e(options.)56 +b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395 +2790 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j +(\(or)d(up)g(to)g(the)1395 2903 y(end)d(of)f(the)g(option)i(list,)g(if) +e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395 +3016 y(group)27 b(options,)h(only)e(members)g Fp(title)d +Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395 +3129 y(option)g(descriptor)-5 b(.)p 3783 3163 V 115 3166 +3670 4 v 966 3319 a(T)e(able)24 b(4.3:)29 b(Option)24 +b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354 +3319 28 4 v 31 w(Value)p 2660 3319 V 30 w(Type)p Fq(\))0 +3783 y Fr(Option)f(V)-8 b(alue)22 b(Unit)0 4016 y Fq(Member)f +Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h(unit)f(of)f(the)h +(option)h(v)n(alue)f(is.)27 b(The)20 b(possible)j(v)n(alues)e(for)g +(type)g Fp(SANE)p 3765 4016 V 31 w(U-)0 4129 y(nit)e +Fq(are)j(described)i(in)d(T)-7 b(able)22 b(4.4.)27 b(Note)22 +b(that)g(the)g(speci\002ed)g(unit)g(is)g(what)f(the)h(SANE)d(back)o +(end)k(e)o(xpects.)30 b(It)21 b(is)g(entirely)0 4242 +y(up)26 b(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f +(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h +(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 4355 y(millimeters.)37 +b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j +(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i +(can)0 4468 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f +(\(e.g.,)f(inches)i(or)f(centimeters\).)0 4772 y Fr(Option)f(V)-8 +b(alue)22 b(Size)0 5005 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j +(the)g(size)g(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 +b(This)26 b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0 +5118 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v) +n(alue:)1905 5381 y(20)p eop end +%%Page: 21 22 +TeXDict begin 21 21 bop 499 35 2903 4 v 497 148 4 113 +v 953 114 a Fr(Symbol)p 1698 148 V 1698 148 V 504 w(Code)p +2000 148 V 2000 148 V 525 w(Description)p 3400 148 V +499 151 2903 4 v 499 168 V 497 281 4 113 v 548 247 a +Fp(SANE)p 773 247 28 4 v 31 w(UNIT)p 1024 247 V 31 w(NONE)p +1698 281 4 113 v 480 w Fq(0)p 2000 281 V 256 w(V)-10 +b(alue)24 b(is)f(unit-less)j(\(e.g.,)d(page)i(count\).)p +3400 281 V 497 394 V 548 360 a Fp(SANE)p 773 360 28 4 +v 31 w(UNIT)p 1024 360 V 31 w(PIXEL)p 1698 394 4 113 +v 425 w Fq(1)p 2000 394 V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g +(of)g(pix)o(els.)p 3400 394 V 497 506 V 548 473 a Fp(SANE)p +773 473 28 4 v 31 w(UNIT)p 1024 473 V 31 w(BIT)p 1698 +506 4 113 v 535 w Fq(2)p 2000 506 V 256 w(V)-10 b(alue)24 +b(is)f(in)h(number)g(of)g(bits.)p 3400 506 V 497 619 +V 548 585 a Fp(SANE)p 773 585 28 4 v 31 w(UNIT)p 1024 +585 V 31 w(MM)p 1698 619 4 113 v 590 w Fq(3)p 2000 619 +V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p 3400 +619 V 497 732 V 548 698 a Fp(SANE)p 773 698 28 4 v 31 +w(UNIT)p 1024 698 V 31 w(DPI)p 1698 732 4 113 v 535 w +Fq(4)p 2000 732 V 256 w(V)-10 b(alue)24 b(is)f(a)h(resolution)i(in)d +(dots/inch.)p 3400 732 V 497 845 V 548 811 a Fp(SANE)p +773 811 28 4 v 31 w(UNIT)p 1024 811 V 31 w(PERCENT)p +1698 845 4 113 v 315 w Fq(5)p 2000 845 V 256 w(V)-10 +b(alue)24 b(is)f(a)h(percentage.)p 3400 845 V 497 958 +V 548 924 a Fp(SANE)p 773 924 28 4 v 31 w(UNIT)p 1024 +924 V 31 w(MICROSECOND)p 1698 958 4 113 v 95 w Fq(6)p +2000 958 V 256 w(V)-10 b(alue)24 b(is)f(time)h(in)f Fh(\026)p +Fq(-seconds.)p 3400 958 V 499 961 2903 4 v 1215 1115 +a(T)-7 b(able)24 b(4.4:)29 b(Physical)24 b(Units)g(\()p +Fp(SANE)p 2410 1115 28 4 v 31 w(Unit)p Fq(\))227 1491 +y Fp(SANE)p 452 1491 V 31 w(TYPE)p 703 1491 V 31 w(STRING)p +Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g(size)h(of)f(the)g +(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e(string)427 +1604 y(size)c(calcuations,)i(the)d(terminating)i Fp(NUL)19 +b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g(the)g +(string.)29 b(Note)427 1717 y(that)24 b(the)g(terminating)i +Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e +(string)i(option)g(v)n(alues.)227 1863 y Fp(SANE)p 452 +1863 V 31 w(TYPE)p 703 1863 V 31 w(INT)p Fr(,)c Fp(SANE)p +1163 1863 V 31 w(TYPE)p 1414 1863 V 31 w(FIXED)p Fr(:)43 +b Fq(The)31 b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f +(multiple)h(of)e(the)427 1976 y(size)24 b(of)g(a)f Fp(SANE_Word)p +Fq(.)h(The)f(option)i(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 +2180 y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p +2289 2180 V 31 w(Word)p Fj(\))o Fh(:)227 2401 y Fp(SANE)p +452 2401 V 31 w(TYPE)p 703 2401 V 31 w(BOOL)p Fr(:)44 +b Fq(The)23 b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p +2486 2401 V 28 w(Word\))p Fq(.)227 2547 y Fp(SANE)p 452 +2547 V 31 w(TYPE)p 703 2547 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p +1327 2547 V 31 w(TYPE)p 1578 2547 V 31 w(GROUP)p Fr(:)43 +b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 2852 y +Fr(Option)f(Capabilities)0 3085 y Fq(Member)h Fp(cap)d +Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31 +b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n +(v)o(e)0 3198 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f +(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i +(the)f(follo)n(wing)h(to)e(macros)h(to)0 3311 y(test)c(certain)h +(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227 +3557 y Fp(SANE)p 452 3557 V 31 w(OPTION)p 813 3557 V +30 w(IS)p 953 3557 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p +Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553 +3557 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427 +3670 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i +(acti)n(v)o(e.)227 3816 y Fp(SANE)p 452 3816 V 31 w(OPTION)p +813 3816 V 30 w(IS)p 953 3816 V 32 w(SETTABLE\()p Fl(cap)p +Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p +2663 3816 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427 +3929 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g +Fq(is)f(softw)o(are)i(settable.)0 4308 y Fr(Option)e(V)-8 +b(alue)22 b(Constraints)0 4541 y Fq(It)k(is)g(often)h(useful)g(to)f +(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37 +b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0 +4654 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n +(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921 +4654 V 28 w(type)e Fq(indicates)k(what)e(con-)0 4767 +y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30 +b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h +(the)f(option)i(are)e(described)j(by)d(one)0 4880 y(of)i(the)g(union)h +(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n +(alues)f(of)f(type)h Fp(SANE)p 3078 4880 V 31 w(Constraint)p +3659 4880 V 28 w(Type)0 4993 y Fq(and)f(the)g(interpretation)j(of)d +(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7 +b(able)23 b(4.6.)1905 5381 y(21)p eop end +%%Page: 22 23 +TeXDict begin 22 22 bop 36 572 3828 4 v 34 685 4 113 +v 452 651 a Fr(Symbol)p 1160 685 V 466 w(Code)p 1461 +685 V 1026 w(Description)p 3862 685 V 36 688 3828 4 v +36 705 V 34 931 4 226 v 86 784 a Fp(SANE)p 311 784 28 +4 v 31 w(CAP)p 507 784 V 31 w(SOFT)p 758 784 V 31 w(SELECT)p +1160 931 4 226 v 254 w Fq(1)p 1461 931 V 100 w(The)20 +b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(a)g(call)g(to)g +Fp(sane)p 3155 784 28 4 v 31 w(control)p 3571 784 V 30 +w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862 931 4 226 v 34 +1495 4 565 v 86 1010 a Fp(SANE)p 311 1010 28 4 v 31 w(CAP)p +507 1010 V 31 w(HARD)p 758 1010 V 31 w(SELECT)p 1160 +1495 4 565 v 254 w Fq(2)p 1461 1495 V 100 w(The)28 b(option)j(v)n(alue) +f(can)f(be)h(set)f(by)g(user)n(-interv)o(ention)34 b(\(e.g.,)c(by)f +(\003ip-)1513 1123 y(ping)35 b(a)f(switch\).)63 b(The)34 +b(user)n(-interf)o(ace)39 b(should)e(prompt)e(the)g(user)g(to)1513 +1236 y(e)o(x)o(ecute)25 b(the)g(appropriate)i(action)f(to)e(set)g(such) +h(an)g(option.)32 b(This)24 b(capa-)1513 1349 y(bility)33 +b(is)f(mutually)i(e)o(xclusi)n(v)o(e)g(with)e(SANE)p +2990 1349 28 4 v 31 w(CAP)p 3199 1349 V 31 w(SOFT)p 3454 +1349 V 31 w(SELECT)1513 1462 y(\(either)25 b(one)f(of)f(them)h(can)g +(be)f(set,)h(b)n(ut)g(not)g(both)g(simultaneously\).)p +3862 1495 4 565 v 34 2286 4 791 v 86 1574 a Fp(SANE)p +311 1574 28 4 v 31 w(CAP)p 507 1574 V 31 w(SOFT)p 758 +1574 V 31 w(DETECT)p 1160 2286 4 791 v 254 w Fq(4)p 1461 +2286 V 100 w(The)43 b(option)h(v)n(alue)g(can)g(be)f(detected)i(by)f +(softw)o(are.)88 b(If)43 b Fp(SANE)p 3733 1574 28 4 v +31 w(-)1513 1687 y(CAP)p 1683 1687 V 31 w(SOFT)p 1934 +1687 V 31 w(SELECT)f Fq(is)j(set,)50 b(this)c(capability)i +Fl(must)e Fq(be)g(set.)93 b(If)1513 1800 y Fp(SANE)p +1738 1800 V 31 w(CAP)p 1934 1800 V 31 w(HARD)p 2185 1800 +V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)j(may)c(or)h(may) +1513 1913 y(not)d(be)g(set.)42 b(If)28 b(this)g(capability)j(is)d(set)g +(b)n(ut)g(neither)i Fp(SANE)p 3428 1913 V 31 w(CAP)p +3624 1913 V 31 w(SO-)1513 2026 y(FT)p 1628 2026 V 32 +w(SELECT)22 b Fq(nor)27 b Fp(SANE)p 2379 2026 V 31 w(CAP)p +2575 2026 V 31 w(HARD)p 2826 2026 V 31 w(SELECT)c Fq(are,)j(then)h +(there)g(is)1513 2139 y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 +b(That)25 b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 +2252 y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 +b(.)p 3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p +311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p +1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22 +b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not) +h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g +(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513 +2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g +(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f +(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34 +3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p +507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p +1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d +(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929 +y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f +(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d +(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513 +3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p +2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of) +1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099 +3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862 +3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311 +3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160 +3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e +(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently) +1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5 +b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513 +3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V +34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31 +w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v +349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h +(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513 +3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6 +b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946 +y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d +(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g +(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513 +4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n +(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f +(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828 +4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24 +b(Capabilities)1905 5381 y(22)p eop end +%%Page: 23 24 +TeXDict begin 23 23 bop 21 102 3859 4 v 19 215 4 113 +v 628 181 a Fr(Symbol)p 1526 215 V 1526 215 V 657 w(Code)p +1828 215 V 1828 215 V 850 w(Description)p 3877 215 V +21 219 3859 4 v 21 235 V 19 461 4 226 v 71 314 a Fp(SANE)p +296 314 28 4 v 31 w(CONSTRAINT)p 877 314 V 28 w(NONE)p +1526 461 4 226 v 614 w Fq(0)p 1828 461 V 100 w(The)29 +b(v)n(alue)g(is)g(unconstrained.)49 b(The)28 b(option)j(can)e(tak)o(e)g +(an)o(y)1879 427 y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g +(option')-5 b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 +v 71 540 a Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p +877 540 V 28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p +1828 3094 V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o +(ger)h(and)f(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6 +b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879 +766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30 +b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o +(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h +Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25 +b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107 +1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518 +y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325 +1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879 +2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e +(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n +(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41 +b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e +Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g +(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6 +b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d +(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51 +b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h +Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g +Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879 +2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e +Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27 +b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n +(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d +Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71 +3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877 +3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224 +4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d +(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879 +3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28 +b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399 +y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35 +b(descriptor)h(member)1879 3512 y Fp(constraint.word)p +2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o +(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40 +b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33 +b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28 +b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g +(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879 +3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j +(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n +(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o +(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303 +a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303 +V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565 +v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e +(applicable)i(to)e(string-v)n(alued)k(options)1879 4415 +y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e +(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i +(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641 +28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e +Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the) +e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p +3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23 +b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905 +5381 y(23)p eop end +%%Page: 24 25 +TeXDict begin 24 24 bop 0 123 a Fn(4.3)119 b(Operations)0 +392 y Fm(4.3.1)99 b Fc(sane)p 545 392 30 4 v 35 w(init)0 +625 y Fq(This)35 b(function)h(must)f(be)g(called)h(before)g(an)o(y)f +(other)g(SANE)d(function)37 b(can)e(be)g(called.)63 b(The)35 +b(beha)n(vior)i(of)d(a)h(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j +(if)d(this)h(function)i(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g +(status)h(code)f(returned)i(by)d Fp(sane)p 3561 738 28 +4 v 31 w(init)e Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p +767 851 V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion) +h(code)g(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h +(pointed)h(to)0 964 y(by)24 b Fp(version)p 504 964 V +29 w(code)p Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p +Fq(,)e(no)j(v)o(ersion)i(code)e(is)g(returned.)31 b(Ar)n(gument)25 +b Fp(authorize)19 b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a) +g(function)i(that)e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i +(requires)g(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0 +1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h +(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int) +h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o +(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28 +b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i +(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041 +y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967 +2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f +Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i +(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f +(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0 +2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h +(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d +(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37 +b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40 +b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64 +b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j +(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0 +2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g +(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911 +y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing) +h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o +(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN) +157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o +(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,) +500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE) +o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o +(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed) +h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26 +b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0 +4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35 +b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d +(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g +(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b +Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g +(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p +421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i +Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p +2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6 +b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f +(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38 +b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0 +4646 y(NUL)c(terminated.)1905 5381 y(24)p eop end +%%Page: 25 26 +TeXDict begin 25 25 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p +545 123 30 4 v 35 w(exit)0 355 y Fq(This)26 b(function)i(must)e(be)g +(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38 +b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h +(handles)0 468 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f +(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g +(through)g(a)d(call)h(to)g Fp(sane)p 3656 468 28 4 v +31 w(clo-)0 581 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d +(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f +(this)g(function\).)48 b(After)29 b(this)h(function)0 +694 y(returns,)36 b(no)c(function)i(other)f(than)g Fp(sane)p +1396 694 V 31 w(init\(\))28 b Fq(may)k(be)g(called)h(\(re)o(gardless)h +(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0 807 y +Fp(sane)p 225 807 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f +(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e +(being)g(released)i(properly)-6 b(.)227 1052 y Fp(void)53 +b(sane_exit)d(\(void\);)0 1359 y Fm(4.3.3)99 b Fc(sane)p +545 1359 30 4 v 35 w(get)p 760 1359 V 35 w(devices)0 +1592 y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g +(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30 +b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6 +b(,)0 1705 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h +Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f +Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p +3635 1705 28 4 v 29 w(list)p Fq(.)0 1818 y(The)27 b(returned)i(list)f +(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g +(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0 +1931 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p +1056 1931 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25 +b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0 +2044 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41 +b(If)27 b(ar)n(gument)h Fp(local)p 1899 2044 V 31 w(only)c +Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n +(vices)0 2156 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE) +d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n +(vice)g(list)g(includes)i(all)e(remote)0 2269 y(de)n(vices)e(that)f +(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227 +2514 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device) +d(***)54 b(device_list,)1864 2627 y(SANE_Bool)c(local_only\);)0 +2872 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g +Fp(SANE)p 1242 2872 V 31 w(STATUS)p 1603 2872 V 30 w(NO)p +1743 2872 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)1357 3142 y Fr(Back)o(end)f +(Implementation)i(Note)227 3292 y Fq(SANE)h(does)k(not)f(require)h +(that)f(this)h(function)g(is)f(called)h(before)g(a)e +Fp(sane)p 2646 3292 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227 +3405 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o +(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f +(unnecessary)j(and)227 3518 y(undesirable)27 b(to)d(call)g(this)g +(function)h(\002rst.)0 3825 y Fm(4.3.4)99 b Fc(sane)p +545 3825 30 4 v 35 w(open)0 4058 y Fq(This)26 b(function)h(is)f(used)h +(to)e(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36 +b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0 +4171 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40 +b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33 +b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e +Fp(*h)p Fq(.)0 4284 y(As)22 b(a)h(special)h(case,)g(specifying)i(a)c +(zero-length)k(string)f(as)d(the)i(de)n(vice)g(requests)h(opening)g +(the)e(\002rst)g(a)n(v)n(ailable)i(de)n(vice)f(\(if)0 +4397 y(there)g(is)g(such)g(a)f(de)n(vice\).)227 4642 +y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k +(SANE_Handle)d(*)55 b(h\);)0 4887 y Fq(This)23 b(function)j(may)d(f)o +(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +5132 y Fp(SANE)p 452 5132 28 4 v 31 w(STATUS)p 813 5132 +V 30 w(DEVICE)p 1173 5132 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 +b(de)n(vice)i(is)e(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i +(else\).)1905 5381 y(25)p eop end +%%Page: 26 27 +TeXDict begin 26 26 bop 227 123 a Fp(SANE)p 452 123 28 +4 v 31 w(STATUS)p 813 123 V 30 w(INVAL)p Fr(:)44 b Fq(The)23 +b(de)n(vice)h(name)g(is)f(not)h(v)n(alid.)227 269 y Fp(SANE)p +452 269 V 31 w(STATUS)p 813 269 V 30 w(IO)p 953 269 V +32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occured)g(while)f +(communicating)i(with)e(the)f(de)n(vice.)227 415 y Fp(SANE)p +452 415 V 31 w(STATUS)p 813 415 V 30 w(NO)p 953 415 V +32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 561 y Fp(SANE)p 452 +561 V 31 w(STATUS)p 813 561 V 30 w(ACCESS)p 1173 561 +V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h(has)f +(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 674 +y(or)24 b(in)l(v)n(alid)h(authentication.)0 982 y Fm(4.3.5)99 +b Fc(sane)p 545 982 30 4 v 35 w(close)0 1215 y Fq(This)32 +b(function)h(terminates)h(the)e(association)j(between)e(the)f(de)n +(vice)h(handle)g(passed)g(in)f(ar)n(gument)h Fp(h)e Fq(and)h(the)g(de)n +(vice)0 1328 y(it)h(represents.)59 b(If)33 b(the)g(de)n(vice)h(is)f +(presently)j(acti)n(v)o(e,)f(a)e(call)g(to)g Fp(sane)p +2326 1328 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j(\002rst.)57 +b(After)33 b(this)0 1441 y(function)26 b(returns,)f(handle)g +Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 1712 +y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 2020 +y Fm(4.3.6)99 b Fc(sane)p 545 2020 30 4 v 35 w(get)p +760 2020 V 35 w(option)p 1155 2020 V 35 w(descriptor)0 +2253 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f +(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h +(descriptor)g(for)f(option)0 2366 y(number)i Fp(n)e Fq(of)h(the)h(de)n +(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36 +b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0 +2479 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g +(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de) +n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2592 y(includes)22 +b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i +(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p +Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 2705 +y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h +(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227 +2976 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48 +b(*)445 3089 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3397 y Fm(4.3.7)99 +b Fc(sane)p 545 3397 V 35 w(control)p 1000 3397 V 34 +w(option)0 3630 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g +(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e +Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 3743 +y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f +(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h +Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 3855 +y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6 +b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through) +g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 3968 y(is)21 b(a)f(pointer)j(to)e +(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29 +b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f +Fq(must)h(be)g(big)g(enough)0 4081 y(to)26 b(hold)g(the)g(entire)h +(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d +Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39 +b(The)0 4194 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h +(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e +(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4307 y Fp(v)33 +b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h +(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d +(\002rst)f Fp(NUL)0 4420 y Fq(terminator)c(in)e(the)g(string.)44 +b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p +Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o +(vide)i(details)g(on)e(ho)n(w)0 4533 y(well)23 b(the)h(request)h(has)f +(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d +(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227 +4779 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h +(h,)k(SANE_Int)e(n,)2027 4892 y(SANE_Action)f(a,)j(void)g(*v,)2027 +5005 y(SANE_Int)e(*)j(i\);)1905 5381 y Fq(26)p eop end +%%Page: 27 28 +TeXDict begin 27 27 bop 185 35 3531 4 v 183 148 4 113 +v 628 114 a Fr(Symbol)p 1363 148 V 1363 148 V 493 w(Code)p +1664 148 V 1664 148 V 850 w(Description)p 3714 148 V +185 151 3531 4 v 185 168 V 183 281 4 113 v 234 247 a +Fp(SANE)p 459 247 28 4 v 31 w(ACTION)p 820 247 V 30 w(GET)p +1015 247 V 32 w(VALUE)p 1363 281 4 113 v 254 w Fq(0)p +1664 281 V 100 w(Get)23 b(current)i(option)g(v)n(alue.)p +3714 281 V 183 619 4 339 v 234 360 a Fp(SANE)p 459 360 +28 4 v 31 w(ACTION)p 820 360 V 30 w(SET)p 1015 360 V +32 w(VALUE)p 1363 619 4 339 v 254 w Fq(1)p 1664 619 V +100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g +(passed)h(through)g(ar)n(-)1716 473 y(gument)21 b Fp(v)d +Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue) +1716 585 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p +3714 619 V 183 1184 4 565 v 234 698 a Fp(SANE)p 459 698 +28 4 v 31 w(ACTION)p 820 698 V 30 w(SET)p 1015 698 V +32 w(AUTO)p 1363 1184 4 565 v 309 w Fq(2)p 1664 1184 +V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28 +b(or)f(de)n(vice)g(will)g(au-)1716 811 y(tomatically)39 +b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38 +b(mode)1716 924 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o +(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1037 y(v)n(alue)22 +b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h +Fp(v)e Fq(is)h(completely)1716 1150 y(ignored)j(in)f(this)g(case)g(and) +g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1184 V 185 1187 3531 +4 v 1168 1341 a(T)-7 b(able)24 b(4.7:)29 b(Action)24 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 1341 28 4 v +31 w(Action)p Fq(\))0 1714 y(The)d(w)o(ay)h(the)f(option)j(is)d(af)n +(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d(controlled)k(by)c +(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 +1827 y Fp(SANE)p 225 1827 V 31 w(Action)p Fq(.)k(The)e(possible)j(v)n +(alues)f(and)f(their)g(meaning)h(is)e(described)j(in)e(T)-7 +b(able)23 b(4.7.)0 1998 y(After)k(setting)h(a)e(v)n(alue)h(via)g(an)g +(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o +Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0 +2111 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e +Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h +(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0 +2224 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g +(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2396 y(This)g(function)j(may) +d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +2642 y Fp(SANE)p 452 2642 V 31 w(STATUS)p 813 2642 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h +(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427 +2755 y(option)e(number)-5 b(.)227 2901 y Fp(SANE)p 452 +2901 V 31 w(STATUS)p 813 2901 V 30 w(INVAL)p Fr(:)44 +b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227 +3047 y Fp(SANE)p 452 3047 V 31 w(STATUS)p 813 3047 V +30 w(IO)p 953 3047 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +3193 y Fp(SANE)p 452 3193 V 31 w(STATUS)p 813 3193 V +30 w(NO)p 953 3193 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3339 +y Fp(SANE)p 452 3339 V 31 w(STATUS)p 813 3339 V 30 w(ACCESS)p +1173 3339 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h +(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427 +3452 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3760 +y Fm(4.3.8)99 b Fc(sane)p 545 3760 30 4 v 35 w(get)p +760 3760 V 35 w(parameters)0 3993 y Fq(This)28 b(function)i(is)e(used)h +(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44 +b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0 +4106 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h +(started)h(\()p Fp(sane)p 2070 4106 28 4 v 31 w(start\(\))19 +b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0 +4219 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6 +b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates) +e(of)g(what)f(the)g(parameters)0 4332 y(will)23 b(be)g(when)g +Fp(sane)p 716 4332 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32 +b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i +(started)g(allo)n(ws,)0 4445 y(for)c(e)o(xample,)h(to)e(get)h(an)g +(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27 +b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0 +4558 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f +(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer) +j Fp(p)c Fq(to)i(a)g(parameter)0 4671 y(structure.)k(The)23 +b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n +(w)-6 b(.)227 4942 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e +(\(SANE_Handle)h(h,)2027 5055 y(SANE_Parameters)f(*)54 +b(p\);)1905 5381 y Fq(27)p eop end +%%Page: 28 29 +TeXDict begin 28 28 bop 103 967 3695 4 v 101 1080 4 113 +v 628 1046 a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 +w(Code)p 1746 1080 V 1746 1080 V 850 w(Description)p +3796 1080 V 103 1084 3695 4 v 103 1100 V 101 2455 4 1355 +v 153 1179 a Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 +1179 V 31 w(INEXACT)p 1444 2455 4 1355 v 613 w Fq(1)p +1746 2455 V 100 w(This)21 b(v)n(alue)g(is)f(returned)j(when)e(setting)h +(an)e(option)i(v)n(alue)g(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n +(alue)g(being)h(selected)h(that)e(does)h(not)f(e)o(xactly)1797 +1405 y(match)f(the)f(requested)j(v)n(alue.)40 b(F)o(or)26 +b(e)o(xample,)i(if)f(a)g(scanner)1797 1518 y(can)g(adjust)g(the)f +(resolution)j(in)d(increments)i(of)e(30dpi)h(only)-6 +b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i(may)e +(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d(300dpi.)47 +b(When)30 b(this)f(happens,)j(the)d(bitset)1797 1857 +y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49 +b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f +(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797 +2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32 +b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31 +b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28 +b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e +(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h +(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455 +V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4 +v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30 +w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133 +V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n +(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f +(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797 +2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g +Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j +(should)e(reload)g(all)f(options.)1797 2986 y(This)36 +b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one) +1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923 +4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p +628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444 +3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g +(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797 +3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p +2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797 +3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f +(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26 +b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if) +1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30 +b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33 +b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797 +3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4 +791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29 +b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option) +1905 5381 y(28)p eop end +%%Page: 29 30 +TeXDict begin 29 29 bop 0 123 a Fq(The)32 b(scan)g(parameters)i(are)f +(returned)h(in)e(a)f(structure)k(of)d(type)g Fp(SANE)p +2314 123 28 4 v 31 w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k +(of)d(this)0 236 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 423 y Fp(typedef)52 b(struct)336 536 y({)445 +649 y(SANE_Frame)e(format;)445 762 y(SANE_Bool)h(last_frame;)445 +874 y(SANE_Int)g(lines;)445 987 y(SANE_Int)g(depth;)445 +1100 y(SANE_Int)g(pixels_per_line;)445 1213 y(SANE_Int)g +(bytes_per_line;)336 1326 y(})227 1439 y(SANE_Parameters)o(;)0 +1626 y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f +(the)g(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 +b(possible)i(v)n(alues)f(for)f(type)0 1739 y Fp(SANE)p +225 1739 V 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7 +b(able)28 b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e +(described)i(in)f(more)f(detail)h(in)f(Sec-)0 1852 y(tion)d(3.2.)p +574 1940 2752 4 v 572 2053 4 113 v 892 2019 a Fr(Symbol)p +1501 2053 V 1501 2053 V 368 w(Code)p 1803 2053 V 1803 +2053 V 585 w(Description)p 3324 2053 V 574 2056 2752 +4 v 574 2073 V 572 2186 4 113 v 624 2152 a Fp(SANE)p +849 2152 28 4 v 31 w(FRAME)p 1155 2152 V 30 w(GRAY)p +1501 2186 4 113 v 309 w Fq(0)p 1803 2186 V 100 w(Band)g(co)o(v)o(ering) +h(human)f(visual)h(range.)p 3324 2186 V 572 2299 V 624 +2265 a Fp(SANE)p 849 2265 28 4 v 31 w(FRAME)p 1155 2265 +V 30 w(RGB)p 1501 2299 4 113 v 364 w Fq(1)p 1803 2299 +V 100 w(Pix)o(el-interlea)n(v)o(ed)i(red/green/blue)h(bands.)p +3324 2299 V 572 2412 V 624 2378 a Fp(SANE)p 849 2378 +28 4 v 31 w(FRAME)p 1155 2378 V 30 w(RED)p 1501 2412 +4 113 v 364 w Fq(2)p 1803 2412 V 100 w(Red)23 b(band)i(of)e(a)g +(red/green/blue)28 b(image.)p 3324 2412 V 572 2524 V +624 2491 a Fp(SANE)p 849 2491 28 4 v 31 w(FRAME)p 1155 +2491 V 30 w(GREEN)p 1501 2524 4 113 v 254 w Fq(3)p 1803 +2524 V 100 w(Green)c(band)g(of)g(a)f(red/green/blue)28 +b(image.)p 3324 2524 V 572 2637 V 624 2604 a Fp(SANE)p +849 2604 28 4 v 31 w(FRAME)p 1155 2604 V 30 w(BLUE)p +1501 2637 4 113 v 309 w Fq(4)p 1803 2637 V 100 w(Blue)c(band)g(of)g(a)f +(red/green/blue)k(image.)p 3324 2637 V 574 2641 2752 +4 v 1194 2794 a(T)-7 b(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p +Fp(SANE)p 2377 2794 28 4 v 31 w(Frame)p Fq(\))0 3145 +y(Member)f Fp(last)p 554 3145 V 31 w(frame)d Fq(is)j(set)g(to)g +Fp(SANE)p 1395 3145 V 31 w(TRUE)e Fq(if)h(and)i(only)g(if)f(the)g +(frame)g(that)h(is)f(currently)i(being)f(acquired)i(\(or)d(the)0 +3258 y(frame)k(that)h(will)f(be)g(acquired)i(ne)o(xt)f(if)e(there)i(is) +f(no)h(current)g(frame\))g(is)f(the)g(last)h(frame)f(of)g(a)g(multi)g +(frame)g(image)h(\(e.g.,)0 3370 y(the)d(current)h(frame)f(is)f(the)h +(blue)g(component)i(of)d(a)g(red,)h(green,)g(blue)h(image\).)0 +3523 y(Member)33 b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h +(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)57 +b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 3636 +y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)h +(frontend)h(should)g(call)f Fp(sane)p 2572 3636 V 31 +w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0 +3749 y Fp(SANE)p 225 3749 V 31 w(STATUS)p 586 3749 V +30 w(EOF)p Fq(.)0 3902 y(Member)24 b Fp(bytes)p 611 3902 +V 30 w(per)p 806 3902 V 32 w(line)c Fq(speci\002es)25 +b(the)f(number)h(of)e(bytes)i(that)f(comprise)h(one)f(scan)g(line.)0 +4054 y(Member)g Fp(depth)c Fq(speci\002es)25 b(the)f(number)g(of)g +(bits)g(per)g(sample.)0 4207 y(Member)g Fp(pixels)p 666 +4207 V 30 w(per)p 861 4207 V 31 w(line)d Fq(speci\002es)k(the)f(number) +g(of)g(pix)o(els)g(that)g(comprise)h(one)f(scan)g(line.)0 +4359 y(Assume)k Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the) +h(frame,)g(then)h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g +(by)g(member)f Fp(depth)p Fq(\))e(and)0 4472 y(the)e(number)i(of)e(pix) +o(els)h(per)f(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member) +h Fp(pixels)p 2416 4472 V 30 w(per)p 2611 4472 V 31 w(line)p +Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 +4585 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h +Fp(bytes)p 1675 4585 V 31 w(per)p 1871 4585 V 31 w(line)p +Fq(\))d(as)j(follo)n(ws:)1214 4804 y Fh(c)i(>)p Fj(=)1445 +4660 y Fb(\()1554 4747 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p +Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 4860 +y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h +Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g +Fj(1)0 5019 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g +(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by) +f(the)g(right)g(side)g(of)0 5132 y(this)c(equation.)31 +b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f +(such)i(\223padded\224)h(image)e(formats.)1905 5381 y(29)p +eop end +%%Page: 30 31 +TeXDict begin 30 30 bop 0 123 a Fm(4.3.9)99 b Fc(sane)p +545 123 30 4 v 35 w(start)0 356 y Fq(This)23 b(function)j(initiates)g +(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i +(by)c(handle)i Fp(h)p Fq(.)227 602 y Fp(SANE_Status)50 +b(sane_start)g(\(SANE_Handle)f(h\);)0 848 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h +(status)g(codes.)227 1095 y Fp(SANE)p 452 1095 28 4 v +31 w(STATUS)p 813 1095 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 +b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g +Fp(sane)p 3297 1095 V 31 w(cancel)p Fq(.)227 1241 y Fp(SANE)p +452 1241 V 31 w(STATUS)p 813 1241 V 30 w(DEVICE)p 1173 +1241 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6 +b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5 +b(.)227 1387 y Fp(SANE)p 452 1387 V 31 w(STATUS)p 813 +1387 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g +(jammed.)227 1533 y Fp(SANE)p 452 1533 V 31 w(STATUS)p +813 1533 V 30 w(NO)p 953 1533 V 32 w(DOCS)p Fr(:)44 b +Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +1679 y Fp(SANE)p 452 1679 V 31 w(STATUS)p 813 1679 V +30 w(COVER)p 1118 1679 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 1825 y Fp(SANE)p +452 1825 V 31 w(STATUS)p 813 1825 V 30 w(IO)p 953 1825 +V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 1971 y Fp(SANE)p +452 1971 V 31 w(STATUS)p 813 1971 V 30 w(NO)p 953 1971 +V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 2117 y Fp(SANE)p +452 2117 V 31 w(STATUS)p 813 2117 V 30 w(INVAL)p Fr(:)44 +b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with)e(the)h(current)h +(set)f(of)f(options.)34 b(The)24 b(fron-)427 2230 y(tend)19 +b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c(if)g +Fp(SANE)p 2316 2230 V 31 w(INFO)p 2567 2230 V 31 w(RELOAD)p +2928 2230 V 30 w(OPTIONS)c Fq(had)19 b(been)427 2343 +y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p 1492 +2343 V 30 w(control)p 1907 2343 V 30 w(option\(\))p Fq(,)20 +b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may)427 +2456 y(ha)n(v)o(e)d(changed.)0 2764 y Fm(4.3.10)99 b +Fc(sane)p 595 2764 30 4 v 35 w(read)0 2997 y Fq(This)19 +b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n +(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20 +b Fp(buf)e Fq(is)h(a)g(pointer)0 3110 y(to)27 b(a)g(memory)g(area)h +(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41 +b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f +Fp(*len)p Fq(.)37 b(A)0 3223 y(back)o(end)c(must)e(set)g(this)g(to)g +(zero)g(when)g(a)f(status)i(other)g(than)g Fp(SANE)p +2281 3223 28 4 v 30 w(STATUS)p 2641 3223 V 30 w(GOOD)d +Fq(is)h(returned.)53 b(When)31 b(the)g(call)0 3336 y(succeeds,)26 +b(the)d(number)i(of)e(bytes)i(returned)h(can)d(be)h(an)o(ywhere)h(in)e +(the)h(range)h(from)e(0)g(to)h Fp(maxlen)c Fq(bytes.)227 +3582 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f(h,)54 +b(SANE_Byte)c(*)55 b(buf,)1482 3695 y(SANE_Int)c(maxlen,)g(SANE_Int)g +(*)j(len\);)0 3941 y Fq(If)30 b(this)i(function)h(is)d(called)i(when)f +(no)g(data)g(is)g(a)n(v)n(ailable,)j(one)e(of)e(tw)o(o)h(things)h(may)e +(happen,)k(depending)g(on)d(the)g(I/O)0 4054 y(mode)24 +b(that)g(is)f(in)h(ef)n(fect)g(for)g(handle)h Fp(h)p +Fq(.)114 4300 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i +(I/O)e(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i +(until)f(at)f(least)h(one)g(data)f(byte)h(is)227 4413 +y(a)n(v)n(ailable)h(\(or)e(until)g(some)g(error)g(occurs\).)114 +4601 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c +(mode,)k(the)d(call)g(returns)h(immediately)g(with)e(status)i +Fp(SANE)p 3656 4601 V 31 w(STA-)227 4714 y(TUS)p 397 +4714 V 32 w(GOOD)21 b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0 +4960 y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via) +g(a)f(call)h(to)f Fp(sane)p 2024 4960 V 31 w(set)p 2220 +4960 V 31 w(io)p 2361 4960 V 32 w(mode\(\))p Fq(.)0 5132 +y(This)g(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n +(wing)h(status)g(codes.)1905 5381 y(30)p eop end +%%Page: 31 32 +TeXDict begin 31 31 bop 227 123 a Fp(SANE)p 452 123 28 +4 v 31 w(STATUS)p 813 123 V 30 w(CANCELLED)p Fr(:)42 +b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to) +g Fp(sane)p 3297 123 V 31 w(cancel)p Fq(.)227 265 y Fp(SANE)p +452 265 V 31 w(STATUS)p 813 265 V 30 w(EOF)p Fr(:)45 +b Fq(No)22 b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h +(frame.)227 407 y Fp(SANE)p 452 407 V 31 w(STATUS)p 813 +407 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g +(jammed.)227 549 y Fp(SANE)p 452 549 V 31 w(STATUS)p +813 549 V 30 w(NO)p 953 549 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 +b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +691 y Fp(SANE)p 452 691 V 31 w(STATUS)p 813 691 V 30 +w(COVER)p 1118 691 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 833 y Fp(SANE)p +452 833 V 31 w(STATUS)p 813 833 V 30 w(IO)p 953 833 V +32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 976 y Fp(SANE)p +452 976 V 31 w(STATUS)p 813 976 V 30 w(NO)p 953 976 V +32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 1118 y Fp(SANE)p +452 1118 V 31 w(STATUS)p 813 1118 V 30 w(ACCESS)p 1173 +1118 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h +(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 +1231 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1532 +y Fm(4.3.11)99 b Fc(sane)p 595 1532 30 4 v 35 w(cancel)0 +1760 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f +(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g +(operation)g(of)e(the)0 1873 y(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)227 2105 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);) +0 2336 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h +(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i +(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 2449 +y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f +(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j +(asynchronously)i(\(e.g.,)0 2562 y(from)37 b(within)g(a)f(signal)j +(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f +(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h +Fq(imply)0 2675 y(that)g(the)f(currently)i(pending)g(operation)h(has)d +(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e +(cancellation)i(has)d(been)0 2788 y Fl(initiated)p Fq(.)68 +b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d +(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0 +2901 y Fp(SANE)p 225 2901 28 4 v 31 w(STATUS)p 586 2901 +V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j +(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0 +3014 y(this)i(implies)h(that)f(a)f(frontend)i(must)f +Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g +(cancelled)i(operation)g(has)e(returned.)0 3315 y Fm(4.3.12)99 +b Fc(sane)p 595 3315 30 4 v 35 w(set)p 810 3315 V 35 +w(io)p 965 3315 V 35 w(mode)0 3543 y Fq(This)21 b(function)j(is)e(used) +g(to)f(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p +Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d +(non-blocking.)0 3656 y(If)27 b(ar)n(gument)j Fp(m)c +Fq(is)i Fp(SANE)p 850 3656 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g(is)f +(set)h(to)g(non-blocking)j(mode,)e(otherwise)g(it')-5 +b(s)28 b(set)g(to)f(blocking)j(mode.)0 3769 y(This)23 +b(function)j(can)e(be)g(called)g(only)h(after)f(a)f(call)h(to)g +Fp(sane)p 1917 3769 V 30 w(start\(\))c Fq(has)k(been)g(performed.)227 +4001 y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 +b(SANE_Bool)c(m\);)0 4232 y Fq(By)33 b(def)o(ault,)38 +b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60 +b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0 +4345 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f +(status)i(v)n(alue)f Fp(SANE)p 2107 4345 V 31 w(STATUS)p +2468 4345 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39 +b(Blocking)0 4458 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o +(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i +Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 4458 V 31 w(FALSE)d +Fq(is)0 4571 y(guaranteed)e(to)c(complete)i(successfully)-6 +b(.)0 4738 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f +(the)h(follo)n(wing)h(status)g(codes:)227 4970 y Fp(SANE)p +452 4970 V 31 w(STATUS)p 813 4970 V 30 w(INVAL)p Fr(:)44 +b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227 +5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(the)f(requested)i(I/O)d(mode.)1905 5381 y(31)p +eop end +%%Page: 32 33 +TeXDict begin 32 32 bop 0 123 a Fm(4.3.13)99 b Fc(sane)p +595 123 30 4 v 35 w(get)p 810 123 V 35 w(select)p 1205 +123 V 34 w(fd)0 353 y Fq(This)25 b(function)j(is)e(used)g(to)g(obtain)h +(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d(handle)h +Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 466 +y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h(a)f +(call)h(to)f Fp(sane)p 1850 466 28 4 v 31 w(read\(\))d +Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29 +b(If)21 b(the)h(call)0 579 y(completes)j(successfully)-6 +b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d +Fp(*fd)p Fq(.)227 817 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 1054 y Fq(This)37 +b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g +Fp(sane)p 2056 1054 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed) +h(and)f(the)g(returned)0 1167 y(\002le-descriptor)j(is)c(guaranteed)k +(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h +(image)f(acquisition)j(\(i.e.,)g(un-)0 1280 y(til)e Fp(sane)p +339 1280 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 1280 +V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h +Fp(sane)p 2810 1280 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0 +1393 y Fp(SANE)p 225 1393 V 31 w(STATUS)p 586 1393 V +30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i +(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the) +0 1506 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p +962 1506 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h +Fp(SANE)p 2202 1506 V 31 w(STATUS)p 2563 1506 V 30 w(EOF)p +Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 1619 +y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f +(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p +3167 1619 V 31 w(read\(\))p Fq(.)0 1788 y(A)30 b(back)o(end)k(may)e +(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31 +b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0 +1901 y Fp(SANE)p 225 1901 V 31 w(STATUS)p 586 1901 V +30 w(UNSUPPORTED)p Fq(.)0 2070 y(Note)25 b(that)h(the)g(only)g +(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c +(a)g(host)i(operating-system)i(dependent)0 2183 y(test)23 +b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h +(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18 +b Fq(or)23 b Fp(poll\(\))0 2295 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f +(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l +(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0 +2408 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals) +f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g +(until)g(a)f(call)g(to)0 2521 y Fp(sane)p 225 2521 V +31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i +(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this) +g(operation)i(is)d(strongly)0 2634 y(encouraged)27 b(as)c(it)g(permits) +i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g +(acquisition)j(is)c(in)h(progress.)0 2803 y(This)f(function)j(may)d(f)o +(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227 +3041 y Fp(SANE)p 452 3041 V 31 w(STATUS)p 813 3041 V +30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.) +227 3185 y Fp(SANE)p 452 3185 V 31 w(STATUS)p 813 3185 +V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)0 3489 y Fm(4.3.14)99 b +Fc(sane)p 595 3489 30 4 v 35 w(strstatus)0 3719 y Fq(This)28 +b(function)i(can)f(be)f(used)h(to)f(translate)i(a)e(SANE)e(status)j +(code)g(into)g(a)f(printable)i(string.)44 b(The)28 b(returned)i(string) +g(is)e(a)0 3832 y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g +(complete)h(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f +(\(full-stop\).)32 b(The)22 b(function)j(is)0 3945 y(guaranteed)k(to)c +(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g +(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this) +g(function)h(is)0 4058 y(performed.)227 4295 y Fp(const)53 +b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g +(status\);)0 4643 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0 +4906 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i +(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b +Fp(sane)p 2797 4906 28 4 v 31 w(init\(\))17 b Fq(and)22 +b Fp(sane)p 3547 4906 V 31 w(exit\(\))0 5019 y Fq(initialize)j(and)d(e) +o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31 +b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f +(initialization)j(and)d(before)0 5132 y(e)o(xiting)i(the)f(back)o(end.) +1905 5381 y(32)p eop end +%%Page: 33 34 +TeXDict begin 33 33 bop 536 2582 a @beginspecial 0 @llx +0 @lly 601 @urx 542 @ury 3060 @rhi @setspecial +%%BeginDocument: figs/flow.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: flow.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Tue Dec 3 22:09:10 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 601 542 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-161.0 577.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr +% Polyline +n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr +% Polyline +n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr +% Polyline +n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 6600 m +gs 1 -1 sc (image acquisition) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 3825 m +gs 1 -1 sc (device setup) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 7515 m +gs 1 -1 sc (- go back to) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5775 7515 m +gs 1 -1 sc (sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +7275 7515 m +gs 1 -1 sc (if more frames desired) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 3300 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 5100 m +gs 1 -1 sc (- sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 4500 m +gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 4080 m +gs 1 -1 sc (sane_control_option\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 3600 m +gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 5700 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 6900 m +gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6000 m +gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6450 m +gs 1 -1 sc (sane_read\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 8100 m +gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 1200 m +gs 1 -1 sc (- sane_init\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 9300 m +gs 1 -1 sc (- sane_exit\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +3600 1800 m +gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 2700 m +gs 1 -1 sc (- sane_open\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 8700 m +gs 1 -1 sc (- sane_close\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4800 2175 m +gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23 +b(\003o)n(w)0 3154 y(Function)k Fp(sane)p 573 3154 28 +4 v 31 w(get)p 769 3154 V 31 w(devices\(\))21 b Fq(can)26 +b(be)g(called)h(an)o(y)e(time)h(after)g Fp(sane)p 2572 +3154 V 31 w(init\(\))c Fq(has)k(been)h(called.)36 b(It)26 +b(returns)0 3267 y(the)32 b(list)f(of)h(the)f(de)n(vices)i(that)f(are)g +(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 b(This)31 +b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0 +3380 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f +(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n +(ferent)h(calls.)30 b(It)21 b(should)j(be)0 3493 y(noted)i(that)f(this) +g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g +(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of) +0 3606 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36 +b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f +(ability)h(for)f(a)f(user)i(to)e(directly)0 3719 y(select)g(a)e +(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g +(function.)0 3890 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e +(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352 +3890 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h +(at)0 4003 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o +(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e +(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 4116 y(at)e(an)o(y)h(gi)n(v)o +(en)g(time.)0 4288 y(An)f(opened)i(de)n(vice)g(can)f(be)f(setup)i +(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f +(functions)j Fp(sane)p 3460 4288 V 30 w(get)p 3655 4288 +V 32 w(opt-)0 4401 y(ion)p 170 4401 V 31 w(descriptor\(\))k +Fq(and)38 b Fp(sane)p 1280 4401 V 31 w(control)p 1696 +4401 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n +(vice,)42 b(obtaining)e(option)0 4514 y(descriptors)d(and)e(setting)h +(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f +(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0 +4626 y(read)g(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o +(ginning)h(and)f(then)g(b)n(uild)h(a)d(dialog)j(\(either)g(graphical)g +(or)e(a)g(command-)0 4739 y(line)27 b(oriented)i(option)g(list\))e +(that)g(allo)n(ws)g(to)g(control)i(the)e(a)n(v)n(ailable)i(options.)40 +b(It)27 b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0 +4852 y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29 +b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f +(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0 +4965 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary) +h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34 +b(While)24 b(setting)i(up)0 5078 y(the)i(de)n(vice,)h(it)e(is)g(also)h +(admissible)h(to)e(call)h Fp(sane)p 1655 5078 V 31 w(get)p +1851 5078 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i +(of)e(what)g(the)h(image)1905 5381 y(33)p eop end +%%Page: 34 35 +TeXDict begin 34 34 bop 0 123 a Fq(parameters)26 b(will)d(look)h(lik)o +(e)g(once)h(image)f(acquisition)i(be)o(gins.)0 294 y(The)36 +b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e +(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p +3186 294 28 4 v 31 w(set)p 3382 294 V 31 w(io)p 3523 +294 V 32 w(mode\(\))p Fq(.)0 407 y(De)n(vices)30 b(are)f(required)i(to) +e(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g +(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0 520 +y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d +(such)h(as)e(UNIX.)0 692 y(After)g(the)g(de)n(vice)g(is)g(setup)h +(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f +(a)f(call)h(to)g Fp(sane)p 3077 692 V 30 w(start\(\))p +Fq(.)i(The)d(back-)0 805 y(end)33 b(calculates)h(the)f(e)o(xact)f +(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g +(to)f Fp(sane)p 3023 805 V 31 w(get)p 3219 805 V 31 w(parameters\(\))0 +918 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h +(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i +(starts)f(at)f(this)0 1031 y(point)41 b(or)e(during)i(the)e(\002rst)h +(call)f(to)h Fp(sane)p 1450 1031 V 31 w(read\(\))35 b +Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking) +44 b(I/O)0 1144 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e +(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h +Fp(sane)p 2949 1144 V 31 w(set)p 3145 1144 V 31 w(io)p +3286 1144 V 32 w(mode\(\))c Fq(and/or)0 1256 y Fp(sane)p +225 1256 V 31 w(get)p 421 1256 V 31 w(select)p 782 1256 +V 30 w(fd\(\))c Fq(at)i(this)h(point.)30 b(Either)24 +b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f(the)h(back)o(end)h +(does)g(not)e(support)0 1369 y(the)h(requested)i(operation.)0 +1541 y(Image)g(data)h(is)f(collected)j(by)d(repeatedly)j(calling)e +Fp(sane)p 1886 1541 V 31 w(read\(\))p Fq(.)33 b(Ev)o(entually)-6 +b(,)28 b(this)f(function)h(will)e(return)h(an)f(end-)0 +1654 y(of-\002le)32 b(status)h(\()p Fp(SANE)p 746 1654 +V 31 w(STATUS)p 1107 1654 V 30 w(EOF)p Fq(\).)d(This)i(indicates)i(the) +e(end)g(of)g(the)g(current)h(frame.)54 b(If)32 b(the)g(frontend)i(e)o +(xpects)0 1767 y(additional)j(frames)e(\(e.g.,)i(the)d(indi)n(vidual)j +(channels)g(in)d(of)h(a)f(red/green/blue)k(image)d(or)f(multiple)i +(images\),)i(it)c(can)0 1880 y(call)24 b Fp(sane)p 379 +1880 V 31 w(start\(\))c Fq(again.)30 b(Once)24 b(all)g(desired)h +(frames)f(ha)n(v)o(e)h(been)f(acquired,)i(function)g +Fp(sane)p 3238 1880 V 31 w(cancel\(\))19 b Fq(must)0 +1993 y(be)33 b(called.)60 b(This)33 b(operation)i(can)f(also)g(be)f +(called)i(at)e(an)o(y)g(other)i(time)e(to)g(cancel)i(a)e(pending)i +(operation.)60 b(Note)34 b(that)0 2106 y Fp(sane)p 225 +2106 V 31 w(cancel\(\))19 b Fq(must)24 b(be)f(called)i(e)n(v)o(en)f(if) +f(the)h(last)g(read)g(operation)i(returned)g Fp(SANE)p +2906 2106 V 31 w(STATUS)p 3267 2106 V 30 w(EOF)p Fq(.)0 +2277 y(When)33 b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h +(should)g(be)e(closed)i(by)e(a)g(call)h(to)f Fp(sane)p +2875 2277 V 31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 +b(before)0 2390 y(e)o(xiting)e(the)f(application,)37 +b(function)d Fp(sane)p 1443 2390 V 31 w(exit\(\))29 b +Fq(must)j(be)g(called.)55 b(It)31 b(is)h(important)i(not)e(to)g(for)n +(get)h(to)f(call)h(this)0 2503 y(function)26 b(since)e(otherwise)h +(some)f(resources)i(\(e.g.,)d(temporary)i(\002les)f(or)f(locks\))i(may) +e(remain)i(unclaimed.)0 2854 y Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31 +b(Options)0 3120 y Fq(While)c(most)f(back)o(end)j(options)f(are)f +(completely)i(self-describing,)i(there)c(are)g(a)f(cases)h(where)g(a)f +(user)h(interf)o(ace)i(might)0 3233 y(w)o(ant)24 b(to)g(special-case)k +(the)c(handling)j(of)d(certain)i(options.)32 b(F)o(or)24 +b(e)o(xample,)h(the)f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g +(four)0 3346 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e +(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33 +b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 3459 y(w)o(ould)25 +b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g +(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will) +d(w)o(ant)h(to)0 3572 y(present)g(to)f(the)g(user)g(a)f(pre)n(vie)n(w)i +(\(lo)n(w-resolution)i(scan\))d(of)g(the)g(scanner)h(surf)o(ace)h(and)e +(let)g(the)g(user)g(pick)g(the)g(scan)h(area)0 3685 y(by)h(dragging)j +(a)c(rectangle)k(into)e(the)f(desired)i(position.)39 +b(F)o(or)25 b(this)i(reason,)h(the)e(SANE)e(API)h(speci\002es)i(a)f +(small)g(number)0 3797 y(of)d(option)j(names)e(that)g(ha)n(v)o(e)g +(well-de\002ned)h(meanings.)0 4105 y Fm(4.5.1)99 b(Option)25 +b(Number)h(Count)0 4338 y Fq(Option)e(number)h(0)e(has)h(an)f(empty)h +(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g(this)g(option) +h(is)e(of)g(type)i Fp(SANE)p 3306 4338 V 30 w(TYPE)p +3556 4338 V 31 w(INT)d Fq(and)0 4451 y(it)29 b(speci\002es)i(the)e +(total)h(number)g(of)g(options)h(a)n(v)n(ailable)g(for)f(a)f(gi)n(v)o +(en)g(de)n(vice)i(\(the)f(count)g(includes)i(option)e(number)h(0\).)0 +4564 y(This)23 b(means)h(that)f(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g +(counting)j(the)d(number)h(of)f(options)i(a)n(v)n(ailable:)32 +b(a)22 b(frontend)k(can)d(either)i(c)o(ycle)0 4677 y(through)h(all)d +(option)i(numbers)g(starting)h(at)d(one)h(until)h Fp(sane)p +1963 4677 V 31 w(get)p 2159 4677 V 31 w(option)p 2520 +4677 V 30 w(descriptor\(\))17 b Fq(returns)25 b Fp(NULL)p +Fq(,)c(or)j(a)0 4790 y(frontend)i(can)e(directly)h(read)f(out)g(the)g +(v)n(alue)g(of)g(option)h(number)f(0.)1905 5381 y(34)p +eop end +%%Page: 35 36 +TeXDict begin 35 35 bop 0 123 a Fm(4.5.2)99 b(Scan)26 +b(Resolution)e(Option)0 354 y Fq(Option)29 b Fp(resolution)24 +b Fq(is)k(used)i(to)e(select)i(the)f(resolution)i(at)e(which)g(an)g +(image)g(should)h(be)e(acquired.)47 b(The)28 b(type)h(of)0 +467 y(this)24 b(option)h(is)f(either)g Fp(SANE)p 947 +467 28 4 v 31 w(TYPE)p 1198 467 V 31 w(INT)d Fq(or)j +Fp(SANE)p 1734 467 V 31 w(TYPE)p 1985 467 V 31 w(FIXED)p +Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 2966 467 V 30 w(UNIT)p +3216 467 V 31 w(DPI)e Fq(\(dots/inch\).)0 637 y(This)k(option)i(is)e +(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 750 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +1056 y Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0 +1287 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f +(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g +(acquisition)j(should)0 1400 y(be)e(optimized)i(for)e(speed,)i(rather)g +(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41 +b(When)27 b(set)g(to)g Fp(SANE)p 3003 1400 V 31 w(TRUE)p +Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 1513 y(in)e(ef)n(fect,)g(when)g(set) +g(to)g Fp(SANE)p 1012 1513 V 31 w(FALSE)d Fq(image)j(acquisition)j +(should)f(proceed)f(in)f(normal)h(quality)g(mode.)33 +b(The)25 b(setting)0 1626 y(of)c(this)h(option)h Fl(must)f(not)h +Fq(af)n(fect)g(an)o(y)e(other)i(option.)29 b(That)22 +b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f(concerned,)i +(the)e(pre)n(vie)n(w)0 1739 y(mode)i(is)g(completely)i(side)e(ef)n +(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g +(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0 +1852 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f +(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e +(free)h(to)f(o)o(v)o(erride)0 1964 y(the)j Fp(resolution)21 +b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h +(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice) +g(to)f(the)0 2077 y(frontend)g(where)n(v)o(er)e(possible.)0 +2247 y(This)i(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2360 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2666 y Fm(4.5.4)99 +b(Scan)26 b(Ar)n(ea)f(Options)0 2897 y Fq(The)d(four)i(most)e +(important)j(well-kno)n(wn)f(options)g(are)f(the)g(ones)h(that)f +(de\002ne)g(the)g(scan)h(area.)29 b(The)22 b(scan)i(area)f(is)f +(de\002ned)0 3010 y(by)h(tw)o(o)f(points)j(\(x/y)e(coordinate)j +(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e(the)g(bottom-right)j +(corners.)k(This)23 b(is)f(illustrated)0 3123 y(in)28 +b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e(the)h +(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e(the)h +(scan)g(surf)o(ace)h(as)0 3236 y(seen)25 b(by)g(the)g(sensor)h(\(which) +f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i(surf)o(ace)g +(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 b(this)h(reason,)0 +3349 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i(for)e(which)g(the) +g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f(simultaneously)k(the)c +Fl(smallest)0 3462 y Fq(and)f(the)f(bottom-right)k(corner)d(is)g(the)f +(corner)i(for)f(which)f(the)h(abscissa)h(and)f(ordinate)i(v)n(alues)e +(are)g(simulatenously)j(the)0 3575 y Fl(lar)m(g)o(est)p +Fq(.)h(If)22 b(this)i(coordinate)h(system)f(is)f(not)g(natural)h(for)f +(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g(the)g(job)g(of)f(the)h(back)o +(end)i(to)e(perform)h(the)0 3688 y(necessary)i(con)l(v)o(ersions.)0 +3858 y(The)d(names)h(of)g(the)f(four)i(options)g(that)f(de\002ne)g(the) +g(scan)g(area)g(are)g(gi)n(v)o(en)g(in)f(the)h(table)h(belo)n(w:)1200 +4093 y Fr(Name)100 b(Description)1200 4206 y Fp(tl-x)107 +b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue)1200 +4319 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n +(alue)1200 4432 y Fp(br-x)107 b Fq(Bottom-right)25 b +Fh(x)e Fq(coordinate)j(v)n(alue)1200 4545 y Fp(br-y)107 +b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0 +4777 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e +(follo)n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g +(options:)136 5019 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h +(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p +2091 5019 V 31 w(UNIT)p 2342 5019 V 31 w(PIXEL)p Fq(\))20 +b(or)k(millimeters)h(\()p Fp(SANE)p 3484 5019 V 31 w(UNIT)p +3735 5019 V 31 w(MM)p Fq(\))227 5132 y(to)f(these)g(options.)31 +b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h(identical.) +1905 5381 y(35)p eop end +%%Page: 36 37 +TeXDict begin 36 36 bop 1125 1562 a @beginspecial 0 @llx +0 @lly 221 @urx 205 @ury 1836 @rhi @setspecial +%%BeginDocument: figs/area.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: area.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Wed Dec 4 19:19:37 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 221 205 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-59.0 231.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% Polyline +n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr +/Helvetica findfont 180.00 scalefont setfont +2550 2302 m +gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +7.500 slw +% Polyline +n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr +n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr +n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3375 3150 m +gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1500 m +gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2700 1050 m +gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1050 3600 m +gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +4425 525 m +gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1080 585 m +gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 1725 1650 m 1725 1800 l gs col-1 s gr +% Polyline +n 1650 1725 m 1800 1725 l gs col-1 s gr +% Polyline +n 3375 2700 m 3375 2850 l gs col-1 s gr +% Polyline +n 3300 2775 m 3450 2775 l gs col-1 s gr +15.000 slw +% Polyline +n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23 +b(area)h(options)136 2134 y Fk(\017)46 b Fq(Whene)n(v)o(er)25 +b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h +(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136 +2322 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g +(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h +(options)h(ha)n(v)o(e)f(range)227 2435 y(constraints)i(associated.)51 +b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f +(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 2548 +y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f +(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o +(ace)g(size.)136 2735 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o +(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i +(missing.)1905 5381 y(36)p eop end +%%Page: 37 38 +TeXDict begin 37 37 bop 0 804 a Fo(Chapter)44 b(5)0 1278 +y Fs(Netw)n(ork)51 b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o +(ace)k(has)f(been)g(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f +(access)f(to)f(image)h(acquisition)i(de)n(vices.)30 b(In)22 +b(particu-)0 1895 y(lar)l(,)f(most)e(SANE)f(implementations)23 +b(are)c(e)o(xpected)j(to)e(support)h(a)e(netw)o(ork)i(back)o(end)h +(\(net)e(client\))i(and)e(a)f(corresponding)0 2008 y(netw)o(ork)k +(daemon)f(\(net)g(serv)o(er\))h(that)f(allo)n(ws)g(accessing)i(image)e +(acquisition)j(de)n(vices)e(through)h(a)d(netw)o(ork)h(connection.)0 +2120 y(Netw)o(ork)i(access)h(is)e(useful)i(in)f(se)n(v)o(eral)g +(situations:)136 2367 y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j +(controlled)h(access)f(to)e(resources)j(that)e(are)f(inaccessible)k(to) +c(a)g(re)o(gular)h(user)-5 b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user) +227 2480 y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host) +h(where)g(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 +b(the)f(netw)o(ork)i(protocol,)h(it)d(is)227 2593 y(possible)h(to)d +(allo)n(w)h(certain)h(users)g(to)e(access)i(scanners)h(without)e(gi)n +(ving)h(them)f(full)g(access)g(to)g(the)g(system.)227 +2743 y(Controlling)34 b(access)e(through)h(the)e(netw)o(ork)h(daemon)g +(can)g(be)e(useful)j(e)n(v)o(en)e(in)g(the)g(local)h(case:)45 +b(for)31 b(e)o(xample,)227 2856 y(certain)d(back)o(ends)g(may)d +(require)j(root)e(pri)n(vile)o(ges)i(to)e(access)h(a)e(de)n(vice.)37 +b(Rather)27 b(than)f(installing)i(each)f(frontend)227 +2969 y(as)36 b(setuid-root,)43 b(a)36 b(system)h(administrator)i(could) +e(instead)h(install)g(the)f(SANE)d(netw)o(ork)j(daemon)g(as)g(setuid-) +227 3082 y(root.)47 b(This)30 b(enables)h(re)o(gular)g(users)f(to)f +(access)i(the)f(pri)n(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e +(daemon)k(\(which,)227 3195 y(presumably)-6 b(,)24 b(supports)f(a)d +(more)h(\002ne-grained)i(access)f(control)h(mechanism)f(than)f(the)g +(simple)h(setuid)g(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h +(bene\002t)g(that)g(the)f(system)h(administrator)i(only)e(needs)g(to)f +(trust)h(the)f(SANE)e(daemon,)k(not)227 3420 y(each)25 +b(and)f(e)n(v)o(ery)g(frontend)h(that)f(may)g(need)g(access)h(to)e(the) +h(pri)n(vile)o(ged)i(de)n(vice.)136 3608 y Fk(\017)46 +b Fq(Netw)o(ork)24 b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j +(of)c(the)i(a)n(v)n(ailable)h(image)e(acquisition)j(de)n(vices.)31 +b(F)o(or)22 b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o +(ork)h(en)l(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto) +g(an)o(y)f(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 +3834 y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y) +h(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h +(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19 +b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e +(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws) +227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices) +h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44 +b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24 +b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g +(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i +(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g +(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740 +y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i +(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114 +4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client) +h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o +(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(37)p +eop end +%%Page: 38 39 +TeXDict begin 38 38 bop 114 123 a Fq(3.)45 b(Other)22 +b(operations,)i(such)e(as)f(setting)h(or)f(inquiring)j(the)d(v)n(alue)h +(of)f(an)g(option)i(are)e(less)h(performance)h(critical)g(since)227 +236 y(the)o(y)h(typically)i(require)f(e)o(xplicit)g(user)g(action.)114 +423 y(4.)45 b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h +(and)f(easy)h(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and) +e(an)o(y)227 536 y(programming)26 b(language.)0 783 y(The)32 +b(SANE)e(protocol)k(can)f(be)f(run)h(across)h(an)o(y)e(transport)j +(protocol)g(that)e(pro)o(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 +b(.)57 b(While)0 896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c) +i(transport)h(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d +(will)h(be)h(among)g(the)g(most)0 1008 y(commonly)25 +b(used)f(protocols.)0 1360 y Fn(5.1)119 b(Data)30 b(T)-9 +b(ype)30 b(Encoding)0 1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 +b(Data)h(T)-7 b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h +(types)f(of)g(the)g(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:) +0 2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44 +b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28 +b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h +(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n +(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44 +b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30 +b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c +(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).) +0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29 +b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10 +b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227 +2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g +(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h +(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43 +b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g +Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37 +b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227 +3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e +Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6 +b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43 +b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40 +b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f +(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g +(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d +(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227 +3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o +(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues) +g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f +(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g +(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47 +b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0 +4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378 +y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C) +e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e +(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737 +y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w) +o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g +(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28 +b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g +(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f +(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h +(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(38)p eop +end +%%Page: 39 40 +TeXDict begin 39 39 bop 0 123 a Fa(array)p Fr(:)48 b +Fq(An)28 b(array)i(is)e(encoded)j(by)e(a)g(w)o(ord)f(that)i(indicates)h +(the)e(length)h(of)f(the)g(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h +(of)f(the)227 236 y(elements)j(in)e(the)g(array)-6 b(.)50 +b(The)29 b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h +(are)f(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0 +525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by) +e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g +(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j +(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b +Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e +(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i +(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30 +b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j +(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g +(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25 +b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e +(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f +(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g +(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of) +d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518 +y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h +(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h +(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h +(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g +(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\)) +f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h +(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back) +o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0 +2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p +545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838 +y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e +(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20 +b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0 +2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g +(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g +(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744 +3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p +1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52 +b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p +1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52 +b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32 +b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35 +b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36 +b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687 +y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39 +b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i +(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v) +o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h +(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0 +3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f +(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e +(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o +(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g +(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31 +w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h +(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59 +b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26 +b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e +Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h +(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n +(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o +(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5 +b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o +(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0 +4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g +(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748 +y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28 +b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw) +o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g +(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n +(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p +0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19 +b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak) +g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5 +b(.)1905 5381 y Fq(39)p eop end +%%Page: 40 41 +TeXDict begin 40 40 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p +545 123 30 4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 +V 35 w(DEVICES)0 356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(list)g(of)f(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.) +1055 596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y +Fp(void)196 b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 +822 y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 +822 V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d +(the)h(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6 +b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344 +V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has) +g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p +2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0 +1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f +Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765 +y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p +760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open) +i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760 +2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p +985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V +30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071 +2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577 +y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y +Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k +(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0 +2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099 +V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has) +e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d +Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23 +b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31 +b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j +(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p +Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g +(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0 +3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g +(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0 +3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p +760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077 +4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p +1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252 +4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d +Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h +(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905 +5381 y(40)p eop end +%%Page: 41 42 +TeXDict begin 41 41 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p +545 123 30 4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 +V 35 w(OPTION)p 1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(obtain)i Fl(all)f Fq(the)g(option)h +(descriptors)h(for)e(a)f(remote)h(SANE)e(de)n(vice.)706 +592 y Fr(r)n(equest:)635 b(r)n(eply:)706 705 y Fp(SANE)p +931 705 28 4 v 31 w(Word)52 b(handle)97 b(Option)p 1991 +705 V 30 w(Descriptor)p 2571 705 V 28 w(Array)53 b(odesc)0 +940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 b(identi\002es)f(the)e +(remote)i(de)n(vice)f(whose)g(option)h(descriptors)i(should)e(be)f +(obtained.)0 1110 y(In)29 b(the)h(reply)-6 b(,)32 b(the)d +Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h(to)f(return)i(the)f(array)g(of) +f(option)i(descriptors.)50 b(The)29 b(option)h(descriptor)0 +1223 y(array)24 b(has)g(the)g(follo)n(wing)h(structure:)227 +1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)o(rra)o(y)336 +1579 y({)445 1692 y(SANE_Word)f(num_options;)445 1805 +y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 1918 +y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 4 v +35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V 34 w(OPTION)0 +2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i(\(inquire,)h(set,) +d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i(option)g(of)e(a)g +(remote)i(SANE)c(de)n(vice.)815 2694 y Fr(r)n(equest:)832 +b(r)n(eply:)815 2807 y Fp(SANE)p 1040 2807 28 4 v 31 +w(Word)52 b(handle)294 b(SANE)p 2187 2807 V 31 w(Status)51 +b(status)815 2920 y(SANE)p 1040 2920 V 31 w(Word)h(option)294 +b(SANE)p 2187 2920 V 31 w(Word)52 b(info)815 3033 y(SANE)p +1040 3033 V 31 w(Word)g(action)294 b(SANE)p 2187 3033 +V 31 w(Word)52 b(value)p 2765 3033 V 31 w(type)815 3146 +y(SANE)p 1040 3146 V 31 w(Word)g(value)p 1618 3146 V +31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 b(value)p +2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 3259 V 31 +w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 b(*value)815 +3371 y(void)g(*value)545 b(SANE)p 2187 3371 V 31 w(String)51 +b(*resource)0 3606 y Fq(The)21 b Fp(handle)e Fq(ar)n(gument)k +(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f(option)i(should)f +(be)f(controlled.)31 b(Ar)n(gument)23 b Fp(option)0 3719 +y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)g(option)h(that)g +(should)h(be)e(controlled.)60 b(Ar)n(gument)34 b Fp(action)c +Fq(speci\002es)k(what)f(action)0 3832 y(should)40 b(be)f(tak)o(en)g +(\(get,)k(set,)f(or)d(set)g(automatic\).)75 b(Ar)n(gument)40 +b Fp(value)p 2430 3832 V 30 w(type)c Fq(speci\002es)k(the)f(type)g(of)g +(the)g(option)0 3945 y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g +Fp(SANE)p 1080 3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p +Fq(,)d Fp(SANE)p 1855 3945 V 31 w(TYPE)p 2106 3945 V +31 w(INT)p Fq(,)h Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 +3945 V 31 w(FIXED)p Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p +3656 3945 V 31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p +437 4058 V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28 +b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g +(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f +(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n +(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c +Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31 +b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h +Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32 +b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v) +o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37 +b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g +(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f +(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o +(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622 +y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24 +b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g +(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call) +0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p +Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned) +h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f +(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26 +b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36 +b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f +Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p +Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h +(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(41)p +eop end +%%Page: 42 43 +TeXDict begin 42 42 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f +(information)i(on)d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h +(to)f(satisfy)i(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0 +236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f +(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946 +236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V +31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h +(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28 +b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462 +y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply) +i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i +(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28 +b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that) +f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0 +687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545 +995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V +35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886 +1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p +1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061 +1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061 +1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b +Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e +(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0 +2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40 +b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g +(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j +Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g +(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750 +30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).) +940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y +Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p +2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p +2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116 +3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891 +3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913 +y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g +(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h +(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23 +b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19 +b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e +(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33 +b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g +(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section) +g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d +(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31 +b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0 +4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073 +4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28 +b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n +(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27 +b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data) +g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0 +4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g +(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5 +b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g +(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50 +b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.) +0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence) +j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted) +j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j +(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f +(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905 +5381 y(42)p eop end +%%Page: 43 44 +TeXDict begin 43 43 bop 0 123 a Fq(the)24 b(length.)31 +b(Except)25 b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same) +g(format)g(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 +28 4 v 31 w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 +b(may)d(contain)j(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e +(zero)i(is)f(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n +(alue)e(of)0 349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i +(the)f(end)g(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f +(recei)n(ving)i(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p +Fq(,)18 b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g +(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35 +b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36 +b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33 +b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742 +y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g +(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j +(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i +(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o +(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0 +968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31 +b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6 +b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v) +o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i +(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0 +1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j +(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i +(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h +(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609 +30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f +(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635 +b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30 +w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53 +b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f +(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0 +2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p +810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h +(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854 +b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31 +w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53 +b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967 +3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006 +y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g +(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31 +b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string) +h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24 +b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j +(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17 +b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j +(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0 +4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512 +y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o +(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n +(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g +(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo) +n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0 +4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g +(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i +(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22 +b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e +(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0 +5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905 +5381 y(43)p eop end +%%Page: 44 45 +TeXDict begin 44 44 bop 0 123 a Fq(In)20 b(the)h(reply)-6 +b(,)22 b Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 +b(Note)20 b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.) +30 b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h +(will)f(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization) +j(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0 +349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26 +b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f +(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f +(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31 +w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p +Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v +35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g +(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5 +b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i +(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h +(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o +(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y +Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e +Fq(call)j(will)f(be)h(closed.)1905 5381 y(44)p eop end +%%Page: 45 46 +TeXDict begin 45 45 bop 0 804 a Fo(Chapter)44 b(6)0 1278 +y Fs(Contact)51 b(Inf)-5 b(ormation)0 1782 y Fq(The)25 +b(SANE)e(standard)28 b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e +(a)h(mailing)g(list.)35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e +(the)h(Internet)0 1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o +(e)g(the)g(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo) +n(wing)h(address.)227 2141 y Fp(sane-devel-requ)o(est)o(@m)o(os)o(ta)o +(ng)o(.co)o(m)0 2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g +(with)g(the)h(body)h(\223)p Fp(subscribe)51 b(sane-devel)p +Fq(\224)18 b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 +y(A)e(complete)j(list)e(of)g(commands)i(supported)h(can)d(be)h +(obtained)h(by)e(sending)j(a)c(mail)i(with)f(a)f(subject)j(of)e(\223)p +Fp(help)p Fq(\224)f(to)h(the)0 2672 y(abo)o(v)o(e)g(address.)31 +b(The)23 b(mailing)h(list)g(is)g(archi)n(v)o(ed)h(and)f(a)n(v)n +(ailable)h(through)h(the)e(SANE)d(home)j(page)g(at)f(URL:)227 +2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o(an)o(e/)1905 +5381 y Fq(45)p eop end +%%Page: 46 47 +TeXDict begin 46 46 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6 +b(,)24 b(37)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6 +b(,)24 b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0 +1713 y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021 +y(enumeration)i(types,)f(36)0 2217 y(image)f(data)g(format,)g(8)0 +2413 y(mailing)h(list,)e(43)0 2609 y(netw)o(ork)i(authorization,)i(41)0 +2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031 +y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031 +V 36 w(Array)-6 b(,)23 b(39)0 3227 y(passw)o(ord,)i(22)0 +3340 y(pointer)l(,)g(36)0 3453 y(pre)n(vie)n(w)f(mode,)f(33)0 +3649 y(resolution)j(option,)f(33)0 3845 y(SANE)p 244 +3845 V 31 w(Action,)f(25)0 3957 y(SANE)p 244 3957 V 31 +w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12 +b(ALUE,)20 b(25)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p +616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21 +b(25)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616 +4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(25)0 +4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296 +V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0 +4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(36)0 4635 +y(sane)p 165 4635 V 34 w(cancel,)h(29)0 4748 y(SANE)p +244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19 +b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V +32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p +244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19 +b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V +32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095 +1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h +(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125 +V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095 +1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p +2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p +2339 1351 V 31 w(Char)l(,)k(14,)f(36)2095 1463 y(sane)p +2260 1463 V 35 w(close,)h(24)2095 1576 y(SANE)p 2339 +1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095 +1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689 +V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31 +w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V +31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915 +V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095 +2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028 +V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095 +2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V +35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p +2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339 +2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480 +V 35 w(e)o(xit,)f(23)2095 2593 y(SANE)p 2339 2593 V 31 +w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V +31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095 +2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32 +w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095 +3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(27)2095 3157 +y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(27) +2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270 +V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(27)2095 3383 y(SANE)p +2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(27)2095 +3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31 +w(RED,)f(10,)h(27)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p +2685 3609 V 31 w(RGB,)f(9,)h(27)2095 3722 y(sane)p 2260 +3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095 +3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p +2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p +2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(25)2095 +4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p +2643 4060 V 35 w(fd,)d(30)2095 4173 y(SANE)p 2339 4173 +V 31 w(Handle,)h(15,)g(36)2095 4286 y(SANE)p 2339 4286 +V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(26)2095 +4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32 +w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(26,)i(28)2095 +4512 y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32 +w(RELO)m(AD)p 2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(26)2095 +4625 y(sane)p 2260 4625 V 35 w(init,)j(22)2095 4738 y(SANE)p +2339 4738 V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851 +V 31 w(NET)p 2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(41)2095 +4964 y(SANE)p 2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(41)2095 +5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(38)1905 +5381 y(46)p eop end +%%Page: 47 48 +TeXDict begin 47 47 bop 0 123 a Fq(SANE)p 244 123 28 +4 v 31 w(NET)p 453 123 V 32 w(CONTR)l(OL)p 913 123 V +30 w(OPTION,)21 b(39)0 236 y(SANE)p 244 236 V 31 w(NET)p +453 236 V 32 w(EXIT)-7 b(,)21 b(42)0 349 y(SANE)p 244 +349 V 31 w(NET)p 453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(38)0 +462 y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p +663 462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(39)0 +574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p +663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(40)0 687 y(SANE)p +244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(37)0 +800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(38)0 +913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8 +b(AR)j(T)e(,)19 b(40)0 1026 y(sane)p 165 1026 V 34 w(open,)24 +b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139 +V 34 w(Descriptor)l(,)i(17)0 1252 y(SANE)p 244 1252 V +31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21 +b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365 +V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0 +1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(27)0 +1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p +165 1704 V 34 w(read,)g(28)0 1817 y(sane)p 165 1817 V +34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0 +1929 y(sane)p 165 1929 V 34 w(start,)g(28)0 2042 y(SANE)p +244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155 +V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p +975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268 +V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19 +b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p +603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21 +b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p +603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21 +b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p +603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720 +V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15,)i(22)0 +2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833 +V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31 +w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32 +w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8 +b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171 +y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V +30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p +244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p +765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397 +V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5 +b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24 +b(14,)f(36)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496 +3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34 +w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21 +b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962 +V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p +504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244 +4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301 +y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10 +b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504 +4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526 +V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p +244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V +31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p +493 4865 V 32 w(BIT)-7 b(,)22 b(19)0 4978 y(SANE)p 244 +4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(19)0 5091 y(SANE)p +244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(19)2095 +123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(19)2095 +236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(19)2095 +349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7 +b(,)20 b(19)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p +2588 462 V 32 w(PIXEL,)h(19)2095 574 y(SANE)p 2339 574 +V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(18)2095 +687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31 +w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p +2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913 +V 31 w(W)-7 b(ord,)24 b(12,)f(36)2095 1026 y(scan)i(area)f(options,)h +(33)2095 1139 y(scan)g(resolution,)h(33)2095 1252 y(structure,)g(37) +2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095 +1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(37)2095 +1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095 +2374 y(well-kno)n(wn)h(options,)g(32)1905 5381 y(47)p +eop end +%%Trailer + +userdict /end-hook known{end-hook}if +%%EOF diff --git a/sane2/0.05/sane2-0.05.dvi.gz b/sane2/0.05/sane2-0.05.dvi.gz new file mode 100644 index 0000000000000000000000000000000000000000..fb684eb3a09d470684134fdb9317a9e303d1cd88 GIT binary patch literal 220572 zcmeFa34EMYxj&xHq%A_ru7Yf3QBrKuCh0~IHBD0*X_JzqK-tP9Gf9R{X2L9O!=fS} zf+Tc0G7MBqk+Lc16_qPNuc#NH7@(D_vRoDZ2nc$AsCBuB!2kPwo^#&!oykl{pjGd^ z;q%e9$@`vj-e=#>Uwo4;-E{w&pxX)8Hff0@nGiE^y_!u9*QTzv1kV8$n?fz z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Base1Encoding ReEncodeFont}37 +99.6264 /Courier rf +%DVIPSBitmapFont: Fd cmtt10 10.95 13 +/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F +A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F +A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65 +D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800 +A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69 +D78 D<90390FF803C0D97FFF13E048B512C74814 +F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C +91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900 +3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F +E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380 +253A7BB830>83 D +87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813 +03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00 +3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7 +13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F +90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712 +7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13 +07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0 +252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0 +91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339 +7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0 +4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C +14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01 +FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111 +D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC +4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F +9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC +03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48 +15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A +5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A +485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E +%EndDVIPSBitmapFont +/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37 +1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25 +3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35 +74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1 +49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1 +66.4176 /Times-Roman rf +%DVIPSBitmapFont: Fh cmmi10 10.95 16 +/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA +1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0 +EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC +EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F +F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED +3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC +17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F +C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED +01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F +F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC +07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB +FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72 +7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F +E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE +4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D +90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9 +FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0 +1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01 +1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8 +A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A +D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0 +387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848 +14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13 +074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F +5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0 +EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000 +157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0 +38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F +FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807 +031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13 +1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2 +ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7 +2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F +001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B +137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E +13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00 +1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0 +C648C9FC2A3B7EA72D>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmr8 8 3 +/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23 +>49 DII E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fj cmr10 10.95 12 +/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201 +5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E +123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB +01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12 +007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6 +14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12 +1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9 +FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC +EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713 +800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015 +C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F +90C7FCEB07F8243F7CBC2D>53 DI< +1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814 +1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301 +5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16 +7BA147>61 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fk cmsy10 10.95 5 +/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4 +EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100 +DI E +%EndDVIPSBitmapFont +/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25 +25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24 +90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33 +39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66 +55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50 +50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50 +99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53 +66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120 +86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86 +11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43 +119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76 +3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13 +172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 1[55 55 55 55 55 55 55 55 +1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}85 +90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45 +66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 +40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61 +1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51 +1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45 +30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81 +90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45 +51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 +40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61 +66 66 61 66 1[45 4[30 45 45 45 45 45 45 45 45 45 4[23 +2[30 30 40[{TeXBase1Encoding ReEncodeFont}56 90.9091 +/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115 +103 115 172 57 115 1[57 115 103 69 92 115 92 115 103 +12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149 +23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559 +/Times-Bold rf /Ft 134[50 23[44 19[89 24[50 1[50 50 50 +3[25 44[{TeXBase1Encoding ReEncodeFont}8 99.6264 /Times-Roman +rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76 +86 76 86 76 10[124 2[96 4[124 8[105 3[124 11[86 2[86 +1[86 48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188 +/Times-Roman rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%BeginPaperSize: a4 +a4 +%%EndPaperSize + +%%EndSetup +%%Page: 1 1 +1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44 +b(2.0)f(proposal)i(0.05)e(-)g(rauch/beck)1672 2698 y +Ft(May)24 b(14,)h(2002)p eop +%%Page: 1 2 +1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430 +b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26 +b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 +b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91 +b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647 +y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Image)24 +b(T)m(ransmission)85 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(10)0 3251 y Fr(4)91 b(The)23 +b(SANE)e(A)n(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639 +b(14)136 3422 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(14)136 3593 y(4.2)96 +b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)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(.)82 b(17)345 4619 y(4.2.6)110 +b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(18)345 4790 +y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(18)345 4961 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7 +b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(18)345 5132 y(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7 +b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(20)1927 5381 y(1)p eop +%%Page: 2 3 +2 2 bop 345 123 a Fq(4.2.10)65 b(Internationlizatio)q(n)84 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(24)136 284 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(26)345 446 y(4.3.1)110 b Fp(sane)p 861 +446 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 608 +y(4.3.2)110 b Fp(sane)p 861 608 V 31 w(exit)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 769 y(4.3.3)110 b Fp(sane)p 861 769 +V 31 w(get)p 1057 769 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 931 y(4.3.4)110 +b Fp(sane)p 861 931 V 31 w(open)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(28)345 1092 y(4.3.5)110 b Fp(sane)p 861 1092 V 31 w(close)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(28)345 1254 y(4.3.6)110 b Fp(sane)p +861 1254 V 31 w(get)p 1057 1254 V 32 w(option)p 1419 +1254 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(28)345 1415 y(4.3.7)110 b Fp(sane)p 861 1415 V 31 w(control)p +1277 1415 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(29)345 1577 y(4.3.8)110 b Fp(sane)p +861 1577 V 31 w(get)p 1057 1577 V 32 w(parameters)25 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(31)345 1739 y(4.3.9)110 b Fp(sane)p 861 1739 V 31 w(start)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(34)345 1900 y(4.3.10)65 b Fp(sane)p +861 1900 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(35)345 2062 +y(4.3.11)65 b Fp(sane)p 861 2062 V 31 w(cancel)33 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(36)345 2223 y(4.3.12)65 b Fp(sane)p 861 2223 +V 31 w(set)p 1057 2223 V 32 w(io)p 1199 2223 V 31 w(mode)78 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2385 y(4.3.13)65 b Fp(sane)p 861 2385 V 31 w(get)p +1057 2385 V 32 w(select)p 1419 2385 V 30 w(fd)37 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2546 y(4.3.14)65 b Fp(sane)p 861 2546 V 31 w(strstatus)73 +b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(37)136 2708 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2870 y(4.5)96 +b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3031 y(4.5.1)110 b(Option)25 b(Number)e(Count)70 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3193 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3354 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(42)345 3516 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(42)345 3677 y(4.5.5)110 b(Depth)24 b(option)71 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(43)345 3839 y(4.5.6)110 b(Gamma)23 +b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(43)345 4001 y(4.5.7)110 b(Scan)24 +b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4162 y(4.5.8)110 b(Scan)24 +b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4324 y(4.5.9)110 b(Threshold)43 +b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4485 y(4.5.10)65 b(Analog)25 +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 +b(49)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(50)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24 +b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 638 y(5.1.2)110 b(T)-7 +b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)136 809 y(5.2)96 +b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 981 y(5.2.1)110 +b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(51)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153 +V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62 +b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(52)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p +1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 1496 y(5.2.4)110 +b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(52)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667 +V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p +1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(53)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p +1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 +2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057 +2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345 2182 +y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182 +V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(54)345 2354 y(5.2.9)110 b Fp(SANE)p +861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(55)345 +2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057 +2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(55)345 2697 y(5.2.11)65 b Fp(SANE)p +861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46 +b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(56)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871 +b(57)1927 5381 y Fq(3)p eop +%%Page: 4 5 +4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349 +y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45 +b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data) +g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g +(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(11)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 2119 y(4.2)96 +b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(42)1927 5381 y(4)p eop +%%Page: 5 6 +5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349 +y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(18)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i +(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(19)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 +b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31 +w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p +Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(22)136 2036 +y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 +b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)136 2379 y(4.7)96 b(Action)25 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p +Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f +(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722 +y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139 +2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(32)1927 5381 y(5)p eop +%%Page: 6 7 +6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0 +1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g +(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38 +b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e +(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i +(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0 +2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g +(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d +(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c +(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f +(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22 +b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 +2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g +(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119 +b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d +(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f +(an)e(application)k(that)d(requires)h(access)g(to)0 3135 +y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j +(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5 +b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0 +3248 y(implementations)35 b(of)c(SANE)f(components.)55 +b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g +(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o +(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c +(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0 +3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as) +d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i +(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l +(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29 +b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26 +b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i +(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement) +i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o +(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h +(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o +(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7 +b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g +(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o +(e)d(this:)1927 5381 y(6)p eop +%%Page: 7 8 +7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0 +1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace) +h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g +(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22 +b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one) +g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0 +2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e +(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f +(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 +b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23 +b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f +(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21 +b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n +(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29 +b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g +(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i +(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the) +f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i +(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h +(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f +(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0 +2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e +(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5 +b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51 +b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g +(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 +b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h +(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0 +3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21 +b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g +(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g +(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f +(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k +Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 +3812 y(back)o(ends.)1927 5381 y(7)p eop +%%Page: 8 9 +8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51 +b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g +(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32 +b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0 +1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e +(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44 +b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g +(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f +(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30 +b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25 +b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f +(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d +(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 +b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h +(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p +Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n +(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j +(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an) +h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g +(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 +2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f +(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30 +b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f +(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h +(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g +(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22 +b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h +Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e +(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f +(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back) +o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e +(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h +(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o +(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31 +b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h +(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227 +4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h +(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n +(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g +(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o +(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227 +4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e +(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227 +4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k +(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d +(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n +(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f +(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29 +b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o +(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f +(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4 +v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro) +o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h +(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f +(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n +(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i +(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927 +5381 y(8)p eop +%%Page: 9 10 +9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227 +310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g +Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p +2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p +Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i +(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n +(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227 +536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time) +f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136 +724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27 +b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i +(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227 +837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41 +b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e +(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d +(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o +(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30 +b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g +Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f +(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha) +n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got) +e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227 +1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f +(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6 +b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i +(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e +(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p +Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e +(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227 +1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d +(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30 +b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g +(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to) +227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.) +43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f +(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g +(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g +(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h +(that)f(scanner)-5 b(.)0 2479 y + currentpoint currentpoint translate 0.64821 0.64821 scale neg exch +neg exch translate + 0 2479 a 0 2479 a + gsave currentpoint currentpoint translate 270 neg rotate neg exch +neg exch translate + 0 2479 +a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550 +@rwi @setspecial +%%BeginDocument: figs/hierarchy.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: hierarchy.fig +%%Creator: fig2dev Version 3.1 Patchlevel 2 +%%CreationDate: Thu Jan 30 22:02:12 1997 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%Magnification: 1.00 +%%Orientation: Landscape +%%BoundingBox: 0 0 355 722 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-17.0 -17.0 translate + 90 rotate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n 0 612 m 0 0 l 792 0 l 792 612 l cp clip + 0.06000 0.06000 sc +% Polyline +n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr +% Polyline +n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr +15.000 slw +% Polyline +n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +11399 5182 m +gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +8099 5182 m +gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr +% Polyline +n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr +% Polyline +n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr +% Polyline +n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr +% Polyline +n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr +7.500 slw +% Polyline +n 2700 1800 m 1200 3000 l gs col-1 s gr +% Polyline +n 3000 1800 m 3000 3000 l gs col-1 s gr +% Polyline +n 3300 1800 m 4800 3000 l gs col-1 s gr +% Polyline +n 9600 1800 m 9600 2100 l gs col-1 s gr +% Polyline +n 9450 2700 m 8100 4800 l gs col-1 s gr +% Polyline +n 11400 4200 m 11400 4800 l gs col-1 s gr +% Polyline +n 1200 3600 m 1200 4200 l gs col-1 s gr +% Polyline +n 3000 3600 m 3000 4125 l gs col-1 s gr +% Polyline +n 7875 5400 m 7350 5850 l gs col-1 s gr +% Polyline +n 8250 5400 m 8775 5850 l gs col-1 s gr +% Polyline +n 11475 5400 m 11475 5850 l gs col-1 s gr +15.000 slw +% Polyline +n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr +% Polyline +n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr +7.500 slw +% Polyline +n 9750 2700 m 11400 3600 l gs col-1 s gr +% Interp Spline +gs n 4800 3600 m + 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto + 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto + 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto + 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto + 7224.0 624.7 8573.7 446.9 9450 900 curveto + 9524.5 938.5 9562.0 1013.5 9600 1200 curveto + gs col-1 s gr + gr + +/Helvetica ff 270.00 scf sf +1199 3382 m +gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 3382 m +gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +1200 4425 m +gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 4380 m +gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +7350 6165 m +gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +8925 6165 m +gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +11475 6135 m +gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 600 m +gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +9600 630 m +gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +4725 5850 m +gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 1582 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +4799 3382 m +gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 1582 m +gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 2482 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +11399 3982 m +gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs + +%%EndDocument + @endspecial 2958 2479 a + currentpoint grestore moveto + 2958 2479 a 0 2479 a + currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale +neg exch neg exch translate + 0 2479 +a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0 +4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h +(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44 +b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g +(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f +(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0 +5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h +(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i +(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop +%%Page: 10 11 +10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e +Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36 +b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d +(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o +(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51 +b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h +(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e +(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d +Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e +Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f +(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22 +b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f +(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f +(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i +(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i +(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g +(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0 +972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h +(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g +(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back) +o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e +(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0 +1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0 +1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815 +y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h +(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f +(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39 +b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation) +j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0 +2041 y(applications)f(and)c(de)n(vices.)59 b(While)34 +b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has) +f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i +(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g +(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0 +2266 y(accommodate)26 b(future)e(applications)k(or)23 +b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g +(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is) +f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n +(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0 +2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g +(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21 +b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)27 +b(v)n(alues.)38 b(Each)26 b(sample)i(v)n(alue)f(represents)i(one)d +(channel)j(\(e.g.,)d(the)h(red)f(channel\).)40 b(Each)26 +b(sample)h(v)n(alue)g(has)g(a)0 2777 y(certain)f(bit)f(depth.)33 +b(The)24 b(bit)h(depth)h(is)e(\002x)o(ed)g(for)h(the)g(entire)h(image)f +(and)g(can)g(be)f(as)h(small)g(as)f(one)h(bit.)32 b(V)-10 +b(alid)25 b(bit)g(depths)0 2890 y(are)f(1,)f(8,)g(or)h(16)g(bits)g(per) +h(sample.)30 b(If)23 b(a)h(de)n(vice')-5 b(s)25 b(natural)h(bit)e +(depth)h(is)e(something)j(else,)e(it)g(is)f(up)h(to)g(the)g(dri)n(v)o +(er)h(to)e(scale)0 3003 y(the)e(sample)h(v)n(alues)h(appropriately)i +(\(e.g.,)c(a)f(4)h(bit)g(sample)h(could)h(be)e(scaled)h(by)f(a)g(f)o +(actor)h(of)f(four)h(to)f(represent)j(a)c(sample)0 3116 +y(v)n(alue)k(of)g(depth)h(8\).)0 3423 y Fm(3.2.1)99 b(Image)24 +b(T)-7 b(ransmission)0 3656 y Fq(The)26 b(SANE)f(API)g(transmits)j(an)f +(image)g(as)f(a)h(sequence)i(of)d(frames.)39 b(Each)27 +b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0 +3769 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f +(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67 +b(F)o(or)35 b(e)o(xample,)40 b(a)0 3882 y(red/green/blue)34 +b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f +(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0 +3995 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g +(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g +(containing)j(the)e(red)0 4108 y(channel,)25 b(the)f(second)h(the)f +(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0 +4128 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 4128 a 0 4128 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 4128 a 152 x Fq(There)g(are)f(tw)o(o)h(dif)n +(ferent)h(types)g(of)e(transmission:)32 b(pix)o(el)24 +b(oriented)i(data)e(or)g(arbitary)h(data.)2991 4280 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + +2991 4280 a 2991 4280 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 2991 4280 a 2991 4280 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 2991 +4280 a 0 4451 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h +(oriented)i(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48 +b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 4564 +y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f +(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f +(8\),)h(or)f(a)g(partial)h(sam-)0 4677 y(ple)j(v)n(alue)g(\(for)f(an)h +(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31 +b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g +(are)0 4790 y(transmitted)26 b(in)d(the)h(machine')-5 +b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 5036 +y Fr(Back)o(end)22 b(Implementation)i(Note)1905 5381 +y Fq(10)p eop +%%Page: 11 12 +11 11 bop 227 123 a Fq(A)21 b(netw)o(ork-based)26 b(meta)d(back)o(end)h +(will)e(ha)n(v)o(e)h(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g +(image)g(data)g(is)f(adjusted)227 236 y(appropriately)32 +b(if)c(necessary)-6 b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g +(meta)g(back)o(end)i(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 +b(,)227 349 y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e +(the)g(serv)o(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 +b(The)26 b(back)o(end)j(can)f(then)f(apply)i(the)227 +462 y(adjustment)d(if)d(necessary)-6 b(.)32 b(In)23 b(essence,)i(this)f +(implements)h(a)e(\223recei)n(v)o(er)n(-mak)o(es-right)q(\224)29 +b(approach.)975 1614 y @beginspecial 0 @llx 0 @lly 362 +@urx 182 @ury 2340 @rwi @setspecial +%%BeginDocument: figs/xfer.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: xfer.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:30 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 362 182 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-134.0 370.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +15.000 slw +% Polyline +n 2400 3300 m 8100 3300 l gs col-1 s gr +n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3375 m 2400 3675 l gs col-1 s gr +15.000 slw +n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 3750 m 8100 3750 l gs col-1 s gr +n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3825 m 2400 4125 l gs col-1 s gr +15.000 slw +n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr +15.000 slw +% Polyline +n 2400 4200 m 8100 4200 l gs col-1 s gr +n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 4275 m 2400 4575 l gs col-1 s gr +15.000 slw +n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 4650 m 8100 4650 l gs col-1 s gr +n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1111 1810 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24 +b(order)h(of)e(image)h(data)g(bytes)0 2115 y(The)f(order)i(in)f(which)g +(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e +(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0 +2228 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g +(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e +(right-most)i(column.)30 b(The)0 2341 y(left-to-right,)35 +b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h +(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 2454 +y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g +(e)o(xample\).)0 2618 y(If)d(a)g(frame)h(contains)h(multiple)g +(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f +(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0 +2731 y(illustrates)31 b(this)e(for)g(the)f(case)h(where)g(a)f(frame)h +(contains)h(a)e(complete)i(red/green/blue)j(image)28 +b(with)h(a)f(bit-depth)j(of)d(8.)0 2844 y(F)o(or)f(a)g(bit)h(depth)g +(of)g(1,)g(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g +Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h +(depth)h(1)0 2957 y(frame)24 b(is)f(transmitted)j(in)d(a)g(byte)i +(interlea)n(v)o(ed)h(f)o(ashion.)390 3627 y @beginspecial +0 @llx 0 @lly 521 @urx 93 @ury 3744 @rwi @setspecial +%%BeginDocument: figs/image-data.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: image-data.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:36 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 521 93 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-88.0 120.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +1875 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3225 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +4575 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l + 5850 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +2475 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 600 m +gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +5925 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +7275 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +8625 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l + 9900 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +6525 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 600 m +gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1950 m +gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1950 m +gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +6525 1950 m +gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1950 m +gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1950 m +gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2475 1950 m +gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +10050 1275 m +gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1125 m +gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1148 3823 a(Figure)e(3.3:)29 b(Bit)23 b(and)h(byte)g +(order)h(of)e(image)h(data)0 4129 y(When)30 b(transmitting)i(an)e +(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h +(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 4242 y(represents)e +(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31 +b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f +(frame)g(with)0 4355 y(a)f(type)h(and)g(a)f(format)i(descriptor)-5 +b(.)0 4519 y(It)23 b(also)h(is)f(possible)j(to)d(transmit)h(arbitary)i +(\(not)e(necessaryly)i(pix)o(el)e(oriented\))i(data.)j(This)23 +b(e.g.)29 b(allo)n(ws)23 b(transmission)j(of)0 4632 y(compressed)g +(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 4796 +y(This)g(v)o(ersion)i(of)f(the)g(SANE)d(standard)k(supports)h(the)e +(follo)n(wing)h(frame)f(types:)0 4891 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 4891 a 0 4891 +a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 4891 a 227 5019 a Fp(SANE)p 452 5019 28 4 v 31 w(FRAME)p +758 5019 V 31 w(RAW)p Fr(:)44 b Fq(The)21 b(frame)h(contains)i(one)e +(or)g(more)f(channels)j(of)e(data)g(in)g(a)f(channel-interlea)n(v)o(ed) +427 5132 y(format,)43 b(that)c(represents)j(sample)d(v)n(alues)h(from)f +(a)f(property)j(of)e(the)g(indi)n(vidual)i(pix)o(els)f(that)f(is)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 5151 a 1905 +5381 a Fq(11)p eop +%%Page: 12 13 +12 12 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 32 a 427 123 a Fq(subject)29 +b(to)d(further)i(description)i(in)c(the)h Fp(formatdesc)21 +b Fq(member)27 b(of)g(the)f Fp(SANE)p 3101 123 28 4 v +31 w(Parameters)427 236 y Fq(structured)d(type.)28 b(The)20 +b(complete)i(image)e(may)g(consist)i(of)e(se)n(v)o(eral)h(channels,)i +(the)e(number)g(of)f(chan-)427 349 y(nels)h(is)g(de\002ned)g(by)g +(member)g Fp(channels)p 1835 349 V 29 w(per)p 2029 349 +V 31 w(image)d Fq(of)i Fp(SANE)p 2668 349 V 31 w(Parameters)p +Fq(.)i(The)f(image)427 462 y(may)g(be)h(transmitted)h(in)f(an)f +(arbitary)i(number)f(of)g(frames)g(which)f(can)h(be)f(determined)j(by)d +(w)o(atching)427 574 y(the)27 b Fp(last)p 789 574 V 30 +w(frame)c Fq(\003ag)j(in)g(said)h(type)f(\(or)h(by)f(counting)i(the)e +(channels\).)39 b(Note:)34 b(This)26 b(frame)g(type)427 +687 y(replaces)g(all)d(frame)h(types)h(of)e(the)h(SANE)d(standard)26 +b(v)o(ersion)f(1.)227 830 y Fp(SANE)p 452 830 V 31 w(FRAME)p +758 830 V 31 w(MIME)p Fr(:)44 b Fq(The)30 b(frame)h(contains)j +(arbitrary)f(data)f(of)f(the)g(MIME)f(\(see)h(RFC)f(1521/1522\))427 +943 y(type)h(that)g(is)f(gi)n(v)o(en)g(in)g(the)g Fp(formatdesc)25 +b Fq(member)30 b(of)g(the)h Fp(SANE)p 2709 943 V 30 w(Parameters)25 +b Fq(structured)427 1056 y(type.)44 b(As)27 b(such,)j(it)e(is)g +(assumed)i(to)e(be)g(incomprehensible)33 b(to)28 b(the)h(frontend,)i(e) +o(xcept)e(for)g(selected)427 1168 y(types)j(the)e(frontend)i(is)e +(speci\002cally)j(capable)f(of)e(handling)j(internally)-6 +b(.)51 b(The)30 b(frontend)i(is)e(free)h(to)427 1281 +y(ignore)c(those)e(frames,)h(or)f(emplo)o(y)g(an)o(y)g(appropriate)j +(means)e(to)e(otherwise)j(handle)f(this)g(data)f(\(lik)o(e)427 +1394 y(sa)n(ving)h(them)d(to)h(disk)g(or)f(spa)o(wning)i(an)f(e)o +(xternal)h(vie)n(wer\).)273 1537 y(The)i(follo)n(wing)j(frame)e(types)h +(are)f(part)h(of)f(the)g(SANE)e(standard)k(v)o(ersion)g(1.)41 +b(Back)o(ends)30 b(that)f(claim)f(to)427 1650 y(be)f(conform)h(to)f +(the)g(SANE)e(standard)k(v)o(ersion)f(2)e(are)h(not)h(allo)n(wed)f(to)g +(use)g(these)h(frame)f(types.)40 b(A)427 1762 y(frontend)27 +b(can)d(decide)i(to)e(support)i(v)o(ersion)g(1)e(back)o(ends)i(and)f(v) +o(ersion)h(2)d(back)o(ends.)34 b(It)24 b(is)g(desirable)427 +1875 y(to)30 b(create)i(a)d(meta)i(back)o(end)h(with)e(a)g(frontend)i +(part)f(conform)g(to)f(the)h(SANE)c(standard)33 b(v)o(ersion)e(1)427 +1988 y(and)f(a)f(back)o(end)i(part)f(conform)g(to)g(the)f(SANE)e +(standard)k(v)o(ersion)g(2)e(\(so)g(all)h(v)o(ersion)g(2)f(frontends) +427 2101 y(can)h(connect)i(to)e(v)o(ersion)h(1)e(back)o(ends\).)50 +b(A)29 b(v)o(ersion)i(1)e(back)o(end)j(does)f(use)f(the)g(follo)n(wing) +h(frame)427 2214 y(types:)427 2363 y Fp(SANE)p 652 2363 +V 31 w(FRAME)p 958 2363 V 31 w(GRAY)p Fr(:)44 b Fq(This)19 +b(is)h(a)g(frame)g(type)h(from)e(SANE)f(standard)k(v)o(ersion)f(1.)28 +b(Back)o(ends)21 b(that)597 2476 y(claim)g(to)g(be)g(conform)h(to)f +(the)g(SANE)e(standard)k(v)o(ersion)f(2)f(are)g(not)g(allo)n(wed)h(to)f +(use)g(this)h(frame)597 2589 y(type.)30 b(The)23 b(frame)h(contains)i +(a)d(single)i(channel)h(of)e(data)g(that)g(represents)j(sample)d(v)n +(alues)h(from)597 2702 y(a)f(spectral)i(band)f(that)g(co)o(v)o(ers)g +(the)f(human)h(visual)h(range.)31 b(The)24 b(image)h(consists)h(of)e +(this)h(frame)597 2814 y(only)-6 b(.)427 2942 y Fp(SANE)p +652 2942 V 31 w(FRAME)p 958 2942 V 31 w(RGB)p Fr(:)44 +b Fq(This)25 b(is)f(a)h(frame)g(type)h(from)e(SANE)f(standard)k(v)o +(ersion)f(1.)33 b(Back)o(ends)26 b(that)597 3055 y(claim)21 +b(to)g(be)g(conform)h(to)f(the)g(SANE)e(standard)k(v)o(ersion)f(2)f +(are)g(not)g(allo)n(wed)h(to)f(use)g(this)h(frame)597 +3168 y(type.)29 b(The)20 b(frame)h(contains)i(three)f(channels)h(of)e +(data)h(that)f(represent)i(sample)f(v)n(alues)g(from)f(the)597 +3281 y(red,)31 b(green,)h(and)e(blue)g(spectral)h(bands.)48 +b(The)29 b(sample)h(v)n(alues)h(are)e(interlea)n(v)o(ed)k(in)c(the)h +(order)597 3394 y(red,)24 b(green,)g(and)g(blue.)30 b(The)23 +b(image)h(consists)h(of)f(this)g(frame)g(only)-6 b(.)427 +3521 y Fp(SANE)p 652 3521 V 31 w(FRAME)p 958 3521 V 31 +w(RED)p Fr(:)44 b Fq(This)25 b(is)f(a)h(frame)g(type)h(from)e(SANE)f +(standard)k(v)o(ersion)f(1.)33 b(Back)o(ends)26 b(that)597 +3634 y(claim)21 b(to)g(be)g(conform)h(to)f(the)g(SANE)e(standard)k(v)o +(ersion)f(2)f(are)g(not)g(allo)n(wed)h(to)f(use)g(this)h(frame)597 +3747 y(type.)33 b(The)24 b(frame)h(contains)i(one)e(channel)i(of)e +(data)g(that)g(represents)j(sample)d(v)n(alues)h(from)f(the)597 +3860 y(red)d(spectral)h(band.)29 b(The)21 b(complete)i(image)f +(consists)i(of)d(three)h(frames:)29 b Fp(SANE)p 3155 +3860 V 31 w(FRAME)p 3461 3860 V 30 w(RED)p Fq(,)597 3973 +y Fp(SANE)p 822 3973 V 31 w(FRAME)p 1128 3973 V 31 w(GREEN)p +Fq(,)19 b(and)24 b Fp(SANE)p 1850 3973 V 31 w(FRAME)p +2156 3973 V 30 w(BLUE)p Fq(.)c(The)j(order)h(in)f(which)g(the)g(frames) +h(are)597 4086 y(transmitted)i(chosen)f(by)f(the)g(back)o(end.)427 +4214 y Fp(SANE)p 652 4214 V 31 w(FRAME)p 958 4214 V 31 +w(GREEN)p Fr(:)43 b Fq(This)29 b(is)g(a)g(frame)g(type)h(from)f(SANE)e +(standard)k(v)o(ersion)g(1.)45 b(Back)o(ends)597 4326 +y(that)29 b(claim)f(to)g(be)h(conform)g(to)f(the)h(SANE)c(standard)31 +b(v)o(ersion)e(2)f(should)i(not)e(use)h(this)g(frame)597 +4439 y(type.)62 b(The)34 b(frame)h(contains)h(one)f(channel)h(of)e +(data)h(that)g(represents)i(sample)e(v)n(alues)h(from)597 +4552 y(the)i(green)h(spectral)h(band.)72 b(The)37 b(complete)j(image)e +(consists)i(of)d(three)i(frames:)58 b Fp(SANE)p 3592 +4552 V 31 w(-)597 4665 y(FRAME)p 877 4665 V 31 w(RED)p +Fq(,)23 b Fp(SANE)p 1339 4665 V 31 w(FRAME)p 1645 4665 +V 31 w(GREEN)p Fq(,)g(and)j Fp(SANE)p 2373 4665 V 31 +w(FRAME)p 2679 4665 V 30 w(BLUE)p Fq(.)e(The)h(order)j(in)e(which)597 +4778 y(the)e(frames)g(are)g(transmitted)i(chosen)f(by)f(the)f(back)o +(end.)427 4906 y Fp(SANE)p 652 4906 V 31 w(FRAME)p 958 +4906 V 31 w(BLUE)p Fr(:)44 b Fq(This)19 b(is)h(a)g(frame)g(type)h(from) +e(SANE)f(standard)k(v)o(ersion)f(1.)28 b(Back)o(ends)21 +b(that)597 5019 y(claim)26 b(to)f(be)g(conform)i(to)e(the)h(SANE)d +(standard)k(v)o(ersion)g(2)e(should)i(not)e(use)h(this)g(frame)f(type.) +597 5132 y(The)i(frame)g(contains)i(one)f(channel)h(of)e(data)g(that)h +(represents)i(sample)e(v)n(alues)g(from)f(the)g(blue)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 5151 a 1905 +5381 a Fq(12)p eop +%%Page: 13 14 +13 13 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 32 a 597 123 a Fq(spectral)36 +b(band.)59 b(The)34 b(complete)h(image)f(consists)h(of)f(three)g +(frames:)50 b Fp(SANE)p 3155 123 28 4 v 31 w(FRAME)p +3461 123 V 30 w(RED)p Fq(,)597 236 y Fp(SANE)p 822 236 +V 31 w(FRAME)p 1128 236 V 31 w(GREEN)p Fq(,)19 b(and)24 +b Fp(SANE)p 1850 236 V 31 w(FRAME)p 2156 236 V 30 w(BLUE)p +Fq(.)c(The)j(order)h(in)f(which)g(the)g(frames)h(are)597 +349 y(transmitted)i(chosen)f(by)f(the)g(back)o(end.)0 +393 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 393 a 0 393 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 393 a 0 393 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 393 a 227 x Fq(When)i(the)h +(bit)f(depth)i(is)e(1)f(there)i(are)g(only)g(tw)o(o)e(sample)i(v)n +(alues)h(possible,)g(1)e(represents)j(minimum)d(intensity)j(\(black\))0 +733 y(and)19 b(0)g(represents)i(maximum)e(intensity)i(\(white\).)28 +b(F)o(or)18 b(all)h(other)h(bit)f(depths)i(a)d(sample)i(v)n(alue)f(of)g +(0)g(represents)i(minimum)0 846 y(intensity)26 b(and)e(lar)n(ger)h(v)n +(alues)g(represent)h(increasing)g(intensity)-6 b(.)1905 +5381 y(13)p eop +%%Page: 14 15 +14 14 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51 +b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512 +y(Interface)e(\(API\))0 1879 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 1879 a 0 1879 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 1879 +a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f +(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y) +h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i +(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o +(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0 +2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h +(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e +(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d +(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33 +b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0 +2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109 +2682 y Fp(#include)51 b()0 2748 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 2748 +a 0 2748 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 2748 a 0 2748 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 2748 a 333 x Fn(4.1)119 +b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard) +25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28 +b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e +(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d +(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e +(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51 +b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30 +b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g +(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g +(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h +(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g +(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o +(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g +(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o +(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o +(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i +(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o +(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129 +y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f +(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n +(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f +(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n +(vision.)48 b(While)30 b(control)h(of)e(these)0 4406 +y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o +(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28 +b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e +(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38 +b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n +(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o +(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o +(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4 +v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29 +b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d +(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905 +5381 y(14)p eop +%%Page: 15 16 +15 15 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p +868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p +Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g +(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e +(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g +(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p +Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f +Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o +(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g +(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14 +b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d +(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704 +y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g +(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427 +817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e +(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the) +427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427 +1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f +(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427 +1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f +(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and) +427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227 +1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V +30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h +(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427 +1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p +868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 +b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of) +427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p +868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18 +b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d +(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j +Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0 +2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23 +b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f +(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o +(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59 +b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52 +b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31 +w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g +(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f +(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c +Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n +(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f +Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068 +y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g +Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15 +b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j +Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in) +e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j +Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d +Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24 +b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e +(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i +Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33 +b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i +(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25 +b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p +Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o +(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j +(mapping.)1905 5381 y(15)p eop +%%Page: 16 17 +16 16 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0 +356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n +(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v) +n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j +Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g +(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097 +436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type) +h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 +b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377 +b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 +y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias) +g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e +(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 +b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 +b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g +Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 +1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0 +1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y +Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h +(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h +Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e +Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 +b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0 +2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f +(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays) +f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672 +y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27 +b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f +Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0 +2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0 +3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326 +y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n +(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in) +f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p +Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e +Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27 +b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6 +b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103 +b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0 +4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p +940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22 +b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29 +b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f +(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p +Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26 +b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p +Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g +(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5 +b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24 +b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17 +b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36 +b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros) +h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g +(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p +0 4901 1560 4 v 105 4957 a Ff(1)134 4988 y Fe(This)19 +b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g +(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905 +5381 y Fq(16)p eop +%%Page: 17 18 +17 17 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p +Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c +(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f +(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking) +h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f +Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427 +349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p +Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine) +f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427 +608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j +Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o +(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g +Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227 +1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48 +b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48 +b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i +(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6 +b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0 +1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw) +o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0 +2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29 +b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o +(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g +(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d +Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48 +b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x) +o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27 +b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f +(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0 +2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50 +b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to) +f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o +(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227 +3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23 +b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695 +V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f +(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27 +b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f +Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52 +b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e +(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h +Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d +Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f +(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23 +b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773 +y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26 +b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i +(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905 +5381 y(17)p eop +%%Page: 18 19 +18 18 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7 +b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i +(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560 +356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32 +b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6 +b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0 +961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n +(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e +(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p +Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f +(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n +(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0 +1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f +(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether) +f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57 +b(If)31 b(an)h(operation)j(completes)e(successfully)-6 +b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56 +b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f +(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30 +b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0 +1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23 +b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p +2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f +(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385 +2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p +1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p +3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113 +v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p +1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p +2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6 +b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660 +2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p +1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25 +b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435 +2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627 +V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083 +2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661 +V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31 +w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p +1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n +(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V +435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021 +2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083 +2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p +3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966 +28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000 +4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n +(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113 +V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p +1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p +2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514 +3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4 +v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31 +w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100 +w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226 +V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31 +w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p +1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er) +e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p +660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161 +3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083 +3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514 +3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4 +v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31 +w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100 +w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435 +3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643 +V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4 +113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f +(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519 +3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0 +4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7 +b(ype)0 4346 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 4346 a 0 4346 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 4346 a 151 x Fq(Each)27 +b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type) +g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26 +b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n +(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969 +y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + +0 5096 a 0 5096 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 5096 a 0 5096 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 5096 a 1905 5381 +a Fq(18)p eop +%%Page: 19 20 +19 19 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 32 a 445 123 a Fp(SANE_String_Cons)o +(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445 +349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g +(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g +(device_location)o(;)445 687 y(SANE_String_Cons)o(t)g(comment;)445 +800 y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 +913 y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1026 +y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445 +1139 y(SANE_Int)g(reserved_int;)336 1252 y(})227 1365 +y(SANE_Device;)0 1420 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 1420 a 0 1420 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 1420 a 0 +1420 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 1420 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f +(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p +Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0 +1678 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019 +1678 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h +(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39 +b(The)25 b(only)0 1791 y(constraints)30 b(are)d(that)g(the)h(name)e(is) +h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o +(end)i(and)e(that)h(the)f(name)g(is)g(a)0 1904 y(le)o(gal)c(SANE)d(te)o +(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique) +j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30 +b(It)22 b(is)0 2017 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k) +o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32 +b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0 +2130 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g +(names.)0 2287 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n +(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h +(de)n(vice)g(corresponding)0 2400 y(to)31 b(the)g(unique)i(name.)52 +b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f +Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e +(that)g(gi)n(v)o(e)0 2513 y(information)g(on)e(the)g(v)o(endor)h +(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n +(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0 +2626 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g +(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g +(arises\):)p 320 2736 1454 4 v 318 2849 4 113 v 755 2815 +a Fr(V)-9 b(endor)22 b(Strings)p 1772 2849 V 320 2852 +1454 4 v 320 2869 V 318 2982 4 113 v 370 2948 a Fp(AGFA)698 +b(Microtek)p 1772 2982 V 318 3094 V 370 3061 a(Abaton)588 +b(Minolta)p 1772 3094 V 318 3207 V 370 3173 a(Acer)698 +b(Mustek)p 1772 3207 V 318 3320 V 370 3286 a(Apple)643 +b(NEC)p 1772 3320 V 318 3433 V 370 3399 a(Artec)g(Nikon)p +1772 3433 V 318 3546 V 370 3512 a(Avision)533 b(Plustek)p +1772 3546 V 318 3659 V 370 3625 a(CANON)643 b(Polaroid)p +1772 3659 V 318 3772 V 370 3738 a(Connectix)423 b(Ricoh)p +1772 3772 V 318 3885 V 370 3851 a(Epson)643 b(Sharp)p +1772 3885 V 318 3998 V 370 3964 a(Fujitsu)533 b(Siemens)p +1772 3998 V 318 4111 V 370 4077 a(Hewlett-Packard)93 +b(Tamarack)p 1772 4111 V 318 4224 V 370 4190 a(IBM)753 +b(UMAX)p 1772 4224 V 318 4336 V 370 4303 a(Kodak)643 +b(Noname)p 1772 4336 V 318 4449 V 370 4415 a(Logitech)p +1772 4449 V 320 4453 1454 4 v 2117 2736 1464 4 v 2115 +2849 4 113 v 2603 2815 a Fr(T)-7 b(ype)23 b(Strings)p +3578 2849 V 2117 2852 1464 4 v 2117 2869 V 2115 2982 +4 113 v 2166 2948 a Fp(film)53 b(scanner)p 3578 2982 +V 2115 3094 V 2166 3061 a(flatbed)f(scanner)p 3578 3094 +V 2115 3207 V 2166 3173 a(frame)h(grabber)p 3578 3207 +V 2115 3320 V 2166 3286 a(handheld)e(scanner)p 3578 3320 +V 2115 3433 V 2166 3399 a(multi-function)e(peripheral)p +3578 3433 V 2115 3546 V 2166 3512 a(sheetfed)i(scanner)p +3578 3546 V 2115 3659 V 2166 3625 a(still)i(camera)p +3578 3659 V 2115 3772 V 2166 3738 a(video)g(camera)p +3578 3772 V 2115 3885 V 2166 3851 a(virtual)f(device)p +3578 3885 V 2117 3888 1464 4 v 1053 4606 a Fq(T)-7 b(able)24 +b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0 +4906 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26 +b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f +(no)g(physical)i(v)o(endor)f(associated.)0 5019 y(Also,)c(there)h(are)f +(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o +(endor)h(speci\002c)g(and)f(therefore)i(completely)0 +5132 y(under)c(control)g(of)e(the)h(respecti)n(v)o(e)i(back)o(ends.)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 5151 a 0 5151 a + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 5151 a 0 +5151 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(19)p +eop +%%Page: 20 21 +20 20 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 32 a 91 x Fq(The)32 +b(back)o(end)i(has)f(to)f(set)g(up)h(the)f(string)i Fp(email)p +1677 123 28 4 v 30 w(backend)p 2092 123 V 30 w(author)28 +b Fq(with)k(the)h(email)f(address)i(of)e(the)h(back)o(end)0 +236 y(author)25 b(or)e(a)h(contact)h(person.)0 399 y(The)d(back)o(end)j +(should)g(\002ll)d(the)h(string)h Fp(device)p 1572 399 +V 30 w(location)18 b Fq(with)23 b(a)f(te)o(xt)h(that)h(describes)h +(where)e(a)g(user)g(can)g(\002nd)g(this)0 512 y(de)n(vice,)h(the)g(te)o +(xt)g(should)h(be)f(read)g(from)f(the)h(back)o(end)i(con\002g)e +(\002le.)0 675 y(The)33 b(string)h Fp(comment)c Fq(can)j(be)g(used)h +(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user)l(,)k(the)c(te)o(xt) +h(should)h(be)e(read)h(from)f(the)0 788 y(back)o(end)26 +b(con\002g)e(\002le.)0 951 y(The)f(string)i Fp(reserved)p +839 951 V 29 w(string)20 b Fq(is)j(planed)i(for)f(future)h(use,)f(the)f +(back)o(end)j(has)e(to)g(set)f(this)h(string)h(to)f(\224\224.)0 +1115 y(W)l(ith)i(member)f Fp(backend)p 915 1115 V 30 +w(version)p 1330 1115 V 29 w(code)e Fq(a)i(frontend)j(can)e(\002nd)f +(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is)g(connected)0 +1227 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0 +1391 y(The)30 b(member)h Fp(backend)p 889 1391 V 29 w(capability)p +1468 1391 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g +(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0 +1504 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f +(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f +(de\002ned)i(when)f(there)g(is)0 1617 y(the)f(need)g(for)g(it.)k(The)23 +b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g +(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 1780 y(The)d(member)h +Fp(reserved)p 926 1780 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g +(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g +(inte)o(ger)h(to)e(0.)3900 1780 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 3900 1780 a 3900 1780 +a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 3900 1780 a 3900 1780 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 3900 1780 a 0 2076 a Fm(4.2.9)99 +b(Option)25 b(Descriptor)g(T)-7 b(ype)0 2300 y Fq(Option)23 +b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h +(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30 +b(Options)0 2413 y(are)h(used)g(to)f(control)j(virtually)g(all)d +(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n +(wer)f(of)h(the)g(SANE)d(API)h(stems)0 2526 y(from)22 +b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f +(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g +(descriptor)-5 b(.)31 b(Thus,)0 2639 y(a)21 b(frontend)i(can)e(control) +i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n +(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 +2752 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 +b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i +(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 2865 y(operates.)31 +b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p +1485 2865 28 4 v 31 w(Option)p 1846 2865 V 30 w(Descriptor)18 +b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 +3085 y Fp(typedef)52 b(struct)336 3198 y({)445 3311 y(SANE_String_Cons) +o(t)c(name;)445 3424 y(SANE_String_Cons)o(t)g(title;)445 +3537 y(SANE_String_Cons)o(t)g(desc;)445 3650 y(SANE_Value_Type)g(type;) +445 3763 y(SANE_Unit)j(unit;)445 3876 y(SANE_Int)g(size;)445 +3988 y(SANE_Int)g(cap;)445 4101 y(SANE_Constraint_)o(Ty)o(pe)d +(constraint_type)o(;)445 4214 y(union)555 4327 y({)664 +4440 y(const)k(SANE_String_Con)o(st)c(*string_list;)664 +4553 y(const)k(SANE_Word)e(*word_list;)664 4666 y(const)i(SANE_Range)e +(*range;)555 4779 y(})445 4892 y(constraint;)336 5005 +y(})227 5118 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)1905 +5381 y Fq(20)p eop +%%Page: 21 22 +21 21 bop 0 123 a Fr(Option)23 b(Name)0 356 y Fq(Member)k +Fp(name)e Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e +(option.)40 b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o +(en)i(de)n(vice)0 469 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h +(dif)n(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g +(unique\).)55 b(The)31 b(option)i(name)f(must)0 582 y(consist)e(of)d +(lo)n(wer)n(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p +Fp(z)p Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p +Fq(\),)f(or)f(the)i(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 +b(.)43 b(The)27 b(\002rst)h(character)0 695 y(must)c(be)f(a)g(lo)n(wer) +n(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g +(dash\).)0 999 y Fr(Option)g(T)n(itle)0 1232 y Fq(Member)e +Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h +(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21 +b(should)i(typically)0 1345 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o +(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i +(of)d(the)h(option.)0 1650 y Fr(Option)f(Description)0 +1883 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e +(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to) +g(describe)i(the)e(option.)35 b(It)24 b(is)0 1996 y(the)g +(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h +(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e +(this)0 2108 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i +(breaks.)0 2413 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0 +2646 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the) +g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h +Fp(SANE)p 3217 2646 28 4 v 31 w(Value)p 3523 2646 V 31 +w(Type)c Fq(are)0 2759 y(described)26 b(in)e(T)-7 b(able)23 +b(4.3.)p 115 2863 3670 4 v 113 2976 4 113 v 433 2942 +a Fr(Symbol)p 1042 2976 V 368 w(Code)p 1344 2976 V 1044 +w(Description)p 3783 2976 V 115 2979 3670 4 v 115 2996 +V 113 3109 4 113 v 165 3075 a Fp(SANE)p 390 3075 28 4 +v 31 w(TYPE)p 641 3075 V 31 w(BOOL)p 1042 3109 4 113 +v 207 w Fq(0)p 1344 3109 V 256 w(Option)h(v)n(alue)h(is)e(of)h(type)g +Fp(SANE_Bool)p Fq(.)p 3783 3109 V 113 3222 V 165 3188 +a Fp(SANE)p 390 3188 28 4 v 31 w(TYPE)p 641 3188 V 31 +w(INT)p 1042 3222 4 113 v 262 w Fq(1)p 1344 3222 V 256 +w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Int)p +Fq(.)p 3783 3222 V 113 3335 V 165 3301 a Fp(SANE)p 390 +3301 28 4 v 31 w(TYPE)p 641 3301 V 31 w(FIXED)p 1042 +3335 4 113 v 152 w Fq(2)p 1344 3335 V 256 w(Option)g(v)n(alue)h(is)e +(of)h(type)g Fp(SANE_Fixed)p Fq(.)p 3783 3335 V 113 3448 +V 165 3414 a Fp(SANE)p 390 3414 28 4 v 31 w(TYPE)p 641 +3414 V 31 w(STRING)p 1042 3448 4 113 v 97 w Fq(3)p 1344 +3448 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p +Fq(.)p 3783 3448 V 113 4012 4 565 v 165 3527 a Fp(SANE)p +390 3527 28 4 v 31 w(TYPE)p 641 3527 V 31 w(BUTTON)p +1042 4012 4 565 v 97 w Fq(4)p 1344 4012 V 256 w(An)31 +b(option)h(of)g(this)f(type)h(has)g(no)f(v)n(alue.)53 +b(Instead,)35 b(setting)e(an)e(option)1395 3640 y(of)j(this)h(type)g +(has)g(an)f(option-speci\002c)k(side-ef)n(fect.)63 b(F)o(or)33 +b(e)o(xample,)38 b(a)1395 3752 y(b)n(utton-typed)k(option)d(could)g(be) +f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j(a)1395 +3865 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g(to)f(the) +h(tell)f(an)h(automatic)h(doc-)1395 3978 y(ument)24 b(feeder)h(to)e +(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5 +b(.)p 3783 4012 V 113 4690 4 678 v 165 4091 a Fp(SANE)p +390 4091 28 4 v 31 w(TYPE)p 641 4091 V 31 w(GROUP)p 1042 +4690 4 678 v 152 w Fq(5)p 1344 4690 V 256 w(An)28 b(option)i(of)e(this) +h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e +(group)1395 4204 y(logically)35 b(related)e(options.)56 +b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395 +4317 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j +(\(or)d(up)g(to)g(the)1395 4430 y(end)d(of)f(the)g(option)i(list,)g(if) +e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395 +4543 y(group)27 b(options,)h(only)e(members)g Fp(title)d +Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395 +4656 y(option)g(descriptor)-5 b(.)p 3783 4690 V 115 4693 +3670 4 v 966 4846 a(T)e(able)24 b(4.3:)29 b(Option)24 +b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354 +4846 28 4 v 31 w(Value)p 2660 4846 V 30 w(Type)p Fq(\))1905 +5381 y(21)p eop +%%Page: 22 23 +22 22 bop 0 123 a Fr(Option)23 b(V)-8 b(alue)22 b(Unit)0 +336 y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h +(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20 +b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765 +336 28 4 v 31 w(U-)0 449 y(nit)e Fq(are)j(described)i(in)d(T)-7 +b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g +(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21 +b(is)g(entirely)0 562 y(up)26 b(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g +(these)h(units)g(a)f(presented)j(to)e(the)f(user)-5 b(.)38 +b(F)o(or)26 b(e)o(xample,)h(SANE)d(e)o(xpresses)29 b(all)d(lengths)i +(in)0 675 y(millimeters.)37 b(A)25 b(frontend)j(is)d(generally)k(e)o +(xpected)f(to)d(pro)o(vide)j(appropriate)h(con)l(v)o(ersion)g(routines) +f(so)e(that)g(a)f(user)i(can)0 788 y(e)o(xpress)e(quantities)h(in)e(a)f +(customary)i(unit)f(\(e.g.,)f(inches)i(or)f(centimeters\).)p +499 894 2903 4 v 497 1007 4 113 v 953 973 a Fr(Symbol)p +1698 1007 V 1698 1007 V 504 w(Code)p 2000 1007 V 2000 +1007 V 525 w(Description)p 3400 1007 V 499 1010 2903 +4 v 499 1027 V 497 1140 4 113 v 548 1106 a Fp(SANE)p +773 1106 28 4 v 31 w(UNIT)p 1024 1106 V 31 w(NONE)p 1698 +1140 4 113 v 480 w Fq(0)p 2000 1140 V 256 w(V)-10 b(alue)24 +b(is)f(unit-less)j(\(e.g.,)d(page)i(count\).)p 3400 1140 +V 497 1253 V 548 1219 a Fp(SANE)p 773 1219 28 4 v 31 +w(UNIT)p 1024 1219 V 31 w(PIXEL)p 1698 1253 4 113 v 425 +w Fq(1)p 2000 1253 V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g +(pix)o(els.)p 3400 1253 V 497 1366 V 548 1332 a Fp(SANE)p +773 1332 28 4 v 31 w(UNIT)p 1024 1332 V 31 w(BIT)p 1698 +1366 4 113 v 535 w Fq(2)p 2000 1366 V 256 w(V)-10 b(alue)24 +b(is)f(in)h(number)g(of)g(bits.)p 3400 1366 V 497 1479 +V 548 1445 a Fp(SANE)p 773 1445 28 4 v 31 w(UNIT)p 1024 +1445 V 31 w(MM)p 1698 1479 4 113 v 590 w Fq(3)p 2000 +1479 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p +3400 1479 V 497 1591 V 548 1558 a Fp(SANE)p 773 1558 +28 4 v 31 w(UNIT)p 1024 1558 V 31 w(DPI)p 1698 1591 4 +113 v 535 w Fq(4)p 2000 1591 V 256 w(V)-10 b(alue)24 +b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 1591 V +497 1704 V 548 1670 a Fp(SANE)p 773 1670 28 4 v 31 w(UNIT)p +1024 1670 V 31 w(PERCENT)p 1698 1704 4 113 v 315 w Fq(5)p +2000 1704 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p +3400 1704 V 497 1817 V 548 1783 a Fp(SANE)p 773 1783 +28 4 v 31 w(UNIT)p 1024 1783 V 31 w(MICROSECOND)p 1698 +1817 4 113 v 95 w Fq(6)p 2000 1817 V 256 w(V)-10 b(alue)24 +b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 1817 +V 499 1821 2903 4 v 1215 1974 a(T)-7 b(able)24 b(4.4:)29 +b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 1974 28 4 +v 31 w(Unit)p Fq(\))0 2394 y Fr(Option)f(V)-8 b(alue)22 +b(Size)0 2608 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g +(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26 +b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0 +2721 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v) +n(alue:)227 2906 y Fp(SANE)p 452 2906 V 31 w(TYPE)p 703 +2906 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g +(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e +(string)427 3019 y(size)c(calcuations,)i(the)d(terminating)i +Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g +(the)g(string.)29 b(Note)427 3132 y(that)24 b(the)g(terminating)i +Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e +(string)i(option)g(v)n(alues.)227 3262 y Fp(SANE)p 452 +3262 V 31 w(TYPE)p 703 3262 V 31 w(INT)p Fr(,)c Fp(SANE)p +1163 3262 V 31 w(TYPE)p 1414 3262 V 31 w(FIXED)p Fr(:)43 +b Fq(The)31 b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f +(multiple)h(of)e(the)427 3374 y(size)24 b(of)g(a)f Fp(SANE_Word)p +Fq(.)h(The)f(option)i(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 +3529 y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p +2289 3529 V 31 w(Word)p Fj(\))o Fh(:)227 3692 y Fp(SANE)p +452 3692 V 31 w(TYPE)p 703 3692 V 31 w(BOOL)p Fr(:)44 +b Fq(The)23 b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p +2486 3692 V 28 w(Word\))p Fq(.)227 3821 y Fp(SANE)p 452 +3821 V 31 w(TYPE)p 703 3821 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p +1327 3821 V 31 w(TYPE)p 1578 3821 V 31 w(GROUP)p Fr(:)43 +b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 4098 y +Fr(Option)f(Capabilities)0 4312 y Fq(Member)h Fp(cap)d +Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31 +b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n +(v)o(e)0 4425 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f +(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i +(the)f(follo)n(wing)h(to)e(macros)h(to)0 4538 y(test)c(certain)h +(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227 +4723 y Fp(SANE)p 452 4723 V 31 w(OPTION)p 813 4723 V +30 w(IS)p 953 4723 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p +Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553 +4723 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427 +4836 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i +(acti)n(v)o(e.)227 4966 y Fp(SANE)p 452 4966 V 31 w(OPTION)p +813 4966 V 30 w(IS)p 953 4966 V 32 w(SETTABLE\()p Fl(cap)p +Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p +2663 4966 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427 +5079 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g +Fq(is)f(softw)o(are)i(settable.)1905 5381 y(22)p eop +%%Page: 23 24 +23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p +1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p +3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86 +784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31 +w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254 +w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f +(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p +3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862 +931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010 +28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31 +w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V +100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n +(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123 +y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39 +b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25 +b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32 +b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n +(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199 +1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462 +y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g +(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286 +4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p +507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160 +2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue) +g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43 +b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p +1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50 +b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513 +1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31 +w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability) +j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28 +b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p +3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026 +y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p +2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026 +V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139 +y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25 +b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252 +y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p +3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p +311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p +1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22 +b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not) +h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g +(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513 +2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g +(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f +(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34 +3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p +507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p +1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d +(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929 +y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f +(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d +(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513 +3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p +2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of) +1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099 +3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862 +3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311 +3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160 +3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e +(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently) +1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5 +b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513 +3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V +34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31 +w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v +349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h +(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513 +3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6 +b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946 +y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d +(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g +(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513 +4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n +(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f +(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828 +4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24 +b(Capabilities)1905 5381 y(23)p eop +%%Page: 24 25 +24 24 bop 0 123 a Fr(Option)23 b(V)-8 b(alue)22 b(Constraints)0 +340 y Fq(It)k(is)g(often)h(useful)g(to)f(constrain)j(the)d(v)n(alues)i +(that)e(an)h(option)g(can)g(tak)o(e.)37 b(F)o(or)25 b(e)o(xample,)j +(constraints)h(can)d(be)g(used)h(by)g(a)0 453 y(frontend)h(to)e +(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n(v)o(en)h(option.)38 +b(Member)26 b Fp(constraint)p 2921 453 28 4 v 28 w(type)e +Fq(indicates)k(what)e(con-)0 566 y(straint)e(is)d(in)h(ef)n(fect)h(for) +g(the)f(option.)30 b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h +(allo)n(wed)f(for)h(the)f(option)i(are)e(described)j(by)d(one)0 +679 y(of)i(the)g(union)h(members)f(of)g(member)g Fp(constraint)p +Fq(.)g(The)f(possible)j(v)n(alues)f(of)f(type)h Fp(SANE)p +3078 679 V 31 w(Constraint)p 3659 679 V 28 w(Type)0 792 +y Fq(and)f(the)g(interpretation)j(of)d(the)g Fp(constraint)18 +b Fq(union)25 b(is)e(described)j(in)e(T)-7 b(able)23 +b(4.6.)0 1077 y Fm(4.2.10)99 b(Inter)o(nationlization)0 +1140 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 1140 a 0 1140 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 1140 a 154 x Fq(All)24 b(back)o(end)j(te)o +(xts)e(should)h(preferable)h(be)d(written)h(in)g(english.)33 +b(Localization)27 b(\(translation)h(of)c(back)o(end)j(te)o(xts\))e(has) +g(to)0 1407 y(be)g(done)h(in)f(the)g(frontend.)36 b(T)-7 +b(o)24 b(automatically)k(prepare)f(translation)h(tables)e(\(e.g.)34 +b(english)27 b(to)e(german\))h(it)f(is)g(necessary)0 +1520 y(to)e(mark)h(the)g(te)o(xts)g(that)g(shall)g(be)g(translated.)0 +1802 y Fr(Ho)o(w)f(is)g(a)g(text)h(mark)o(ed)f(f)n(or)h(translation)0 +2019 y Fq(The)e(k)o(e)o(yw)o(ord)h Fp(SANE)p 724 2019 +28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f(te)o(xt)g(for)h +(translation.)31 b Fp(SANE)p 2566 2019 V 31 w(I18N)20 +b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0 2132 +y(prototype:)227 2347 y Fp(#ifndef)52 b(SANE_I18N)227 +2460 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227 +2573 y(#endif)0 2788 y Fq(Y)-10 b(ou)33 b(should)i(not)f(mark)f +(prototypes)k(or)c(v)n(ariables)i(with)e Fp(SANE)p 2124 +2788 V 31 w(I18N)e Fq(because)k(it)e(is)h(not)f(possible)j(\(or)d(v)o +(ery)h(hard\))0 2901 y(to)c(\002nd)f(out)h(the)g(te)o(xts)g(that)h(are) +f(co)o(v)o(ered)h(by)e(prototypes)k(\()p Fp(SANE_I18N\(START_)o(SC)o +(AN)o(_TE)o(XT)o(\))p Fq(\))23 b(and)30 b(v)n(ariables)0 +3014 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o(na)o(me)o(\))p +Fq(\).)0 3170 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f(can)g(look)g +(lik)o(e)g(this:)0 3283 y Fp(snprintf\(buf,)49 b(sizeof\(buf\),)g +(SANE_I18N\("Sta)o(rt)f(scan"\))0 3396 y Fq(or)0 3509 +y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g(scan"\))p +Fq(.)0 3621 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f(te)o(xts)h +(in)g(structs)h(because)g(the)f(prototype)i Fp(SANE)p +2529 3621 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the)h +(compiler)-5 b(.)0 3904 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o(ed) +g(f)n(or)g(translation?)0 4121 y Fq(All)g(option)i(te)o(xts)f(that)g +(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g +(translation.)31 b(This)24 b(is:)136 4318 y Fk(\017)46 +b Fq(member)24 b Fp(title)136 4492 y Fk(\017)46 b Fq(member)24 +b Fp(desc)136 4666 y Fk(\017)46 b Fq(member)24 b Fp(string)p +883 4666 V 30 w(list)0 4863 y Fq(of)f Fp(SANE)p 323 4863 +V 31 w(Option)p 684 4863 V 30 w(Descriptor)p Fq(.)0 5019 +y(It)29 b(is)f(not)i(allo)n(wed)f(to)g(mark/translate)j(memeber)e +Fp(name)p Fq(.)42 b(Please)29 b(also)h(do)f(not)g(mark)g(an)o(y)g +(error)g(or)g(deb)n(ug)i(messages)0 5132 y(that)24 b(are)g(displayed)i +(by)e(the)f(back)o(end.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 +5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(24)p eop +%%Page: 25 26 +25 25 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p +1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215 +V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235 +V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31 +w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v +614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.) +49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427 +y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5 +b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a +Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V +28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094 +V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f +(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6 +b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879 +766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30 +b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o +(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h +Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25 +b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107 +1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518 +y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325 +1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879 +2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e +(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n +(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41 +b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e +Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g +(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6 +b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d +(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51 +b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h +Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g +Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879 +2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e +Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27 +b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n +(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d +Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71 +3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877 +3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224 +4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d +(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879 +3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28 +b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399 +y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35 +b(descriptor)h(member)1879 3512 y Fp(constraint.word)p +2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o +(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40 +b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33 +b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28 +b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g +(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879 +3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j +(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n +(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o +(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303 +a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303 +V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565 +v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e +(applicable)i(to)e(string-v)n(alued)k(options)1879 4415 +y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e +(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i +(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641 +28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e +Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the) +e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p +3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23 +b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905 +5381 y(25)p eop +%%Page: 26 27 +26 26 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 32 a 91 x Fr(File)23 +b(f)n(ormats)i(and)d(translation)j(functions)0 356 y +Fq(The)h(recommended)j(\002le)d(formats)h(for)g(translation)j(tables)e +(are)e(the)h Fp(po)e Fq(\002les)h(and)h Fp(mo)e Fq(or)i +Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0 +469 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g(k) +o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e +(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 582 y Fp(msgstr)p +Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i +Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22 +b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 695 y +Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22 +b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h +Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0 +807 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d +Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0 +1092 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34 +b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g +(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0 +1205 y(should)h(use)f(the)g(function)i Fp(gettext)19 +b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24 +b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 1318 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0 +1489 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g +(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i +(tables,)f(then)e(the)g(fron-)0 1602 y(tend)f(is)f(responsible)k(to)c +(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23 +b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g +(create)i(its)0 1715 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0 +2000 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the) +g(gette)o(xt)h(tools.)2241 2000 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 2241 2000 a 2241 2000 +a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 2241 2000 a 2241 2000 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 2241 2000 a 0 2351 a Fn(4.3)119 +b(Operations)0 2620 y Fm(4.3.1)99 b Fc(sane)p 545 2620 +30 4 v 35 w(init)0 2853 y Fq(This)35 b(function)h(must)f(be)g(called)h +(before)g(an)o(y)f(other)g(SANE)d(function)37 b(can)e(be)g(called.)63 +b(The)35 b(beha)n(vior)i(of)d(a)h(SANE)0 2966 y(back)o(end)h(is)e +(unde\002ned)i(if)e(this)h(function)i(is)d(not)g(called)i(\002rst.)60 +b(The)34 b(v)o(ersion)i(code)f(of)f(the)g(back)o(end)j(is)d(returned)i +(in)0 3079 y(the)28 b(v)n(alue)h(pointed)h(to)e(by)h +Fp(version)p 1267 3079 28 4 v 29 w(code)p Fq(.)40 b(If)28 +b(that)h(pointer)h(is)d Fp(NULL)p Fq(,)f(no)i(v)o(ersion)i(code)e(is)g +(returned.)45 b(Ar)n(gument)0 3192 y Fp(authorize)18 +b Fq(is)23 b(either)i(a)e(pointer)i(to)e(a)g(function)i(that)f(is)f(in) +l(v)n(ok)o(ed)j(when)d(the)h(back)o(end)h(requires)h(authentication)h +(for)d(a)0 3305 y(speci\002c)g(resource)i(or)e Fp(NULL)c +Fq(if)k(the)g(frontend)h(does)g(not)f(support)h(authentication.)227 +3551 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int)h(*)j(version_code,) +1482 3664 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o(ba)o(ck)48 +b(authorize\);)0 3910 y Fq(The)23 b(authorization)28 +b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i +(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 4157 +y Fp(sane)p 452 4157 V 31 w(open)p Fq(,)c Fp(sane)p 967 +4157 V 31 w(control)p 1383 4157 V 29 w(option)p Fq(,)f +Fp(sane)p 2005 4157 V 31 w(start)0 4403 y Fq(If)25 b(a)h(back)o(end)i +(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f +(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0 +4516 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h +(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d +(accessing)k(protected)0 4629 y(resources.)66 b(Back)o(ends)37 +b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40 +b(that)35 b(do)h(not)f(require)i(user)f(as-)0 4742 y(sistance.)64 +b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j +(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0 +4855 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g +(based)e(on)g(resource-)i(and)e(user)n(-name.)0 5026 +y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing) +h(declaration:)1905 5381 y(26)p eop +%%Page: 27 28 +27 27 bop 227 123 a Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o(LEN)157 +b(128)227 236 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN)157 +b(128)227 462 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o(_C)o +(al)o(lba)o(ck)o(\))445 574 y(\(SANE_String_Con)o(st)c(resource,)500 +687 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE)o(N]) +o(,)500 800 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o(D_)o +(LE)o(N])o(\);)0 1000 y Fq(Three)31 b(ar)n(guments)i(are)e(passed)h(to) +f(the)g(authorization)j(function:)46 b Fp(resource)26 +b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0 +1113 y(the)24 b(resource)j(that)d(requires)i(authorization.)35 +b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d +(user)n(-prompt)k(requesting)0 1226 y(a)36 b(username)i(and)f(a)g +(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b +Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g +(array)g(of)0 1339 y Fp(SANE)p 225 1339 28 4 v 31 w(MAX)p +421 1339 V 31 w(USERNAME)p 892 1339 V 29 w(LEN)22 b Fq(and)i +Fp(SANE)p 1482 1339 V 31 w(MAX)p 1678 1339 V 32 w(PASSWORD)p +2150 1339 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6 +b(.)33 b(The)23 b(authorization)0 1452 y(call)k(should)h(place)f(the)f +(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38 +b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0 +1565 y(NUL)c(terminated.)0 1852 y Fm(4.3.2)99 b Fc(sane)p +545 1852 30 4 v 35 w(exit)0 2070 y Fq(This)26 b(function)i(must)e(be)g +(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38 +b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h +(handles)0 2183 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f +(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g +(through)g(a)d(call)h(to)g Fp(sane)p 3656 2183 28 4 v +31 w(clo-)0 2296 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d +(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f +(this)g(function\).)48 b(After)29 b(this)h(function)0 +2408 y(returns,)36 b(no)c(function)i(other)f(than)g Fp(sane)p +1396 2408 V 31 w(init\(\))28 b Fq(may)k(be)g(called)h(\(re)o(gardless)h +(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0 2521 +y Fp(sane)p 225 2521 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f +(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e +(being)g(released)i(properly)-6 b(.)227 2721 y Fp(void)53 +b(sane_exit)d(\(void\);)0 3008 y Fm(4.3.3)99 b Fc(sane)p +545 3008 30 4 v 35 w(get)p 760 3008 V 35 w(devices)0 +3226 y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g +(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30 +b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6 +b(,)0 3339 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h +Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f +Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p +3635 3339 28 4 v 29 w(list)p Fq(.)0 3452 y(The)27 b(returned)i(list)f +(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g +(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0 +3565 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p +1056 3565 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25 +b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0 +3678 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41 +b(If)27 b(ar)n(gument)h Fp(local)p 1899 3678 V 31 w(only)c +Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n +(vices)0 3791 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE) +d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n +(vice)g(list)g(includes)i(all)e(remote)0 3904 y(de)n(vices)e(that)f +(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227 +4104 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device) +d(***)54 b(device_list,)1864 4216 y(SANE_Bool)c(local_only\);)0 +4416 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g +Fp(SANE)p 1242 4416 V 31 w(STATUS)p 1603 4416 V 30 w(NO)p +1743 4416 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)1357 4635 y Fr(Back)o(end)f +(Implementation)i(Note)227 4779 y Fq(SANE)h(does)k(not)f(require)h +(that)f(this)h(function)g(is)f(called)h(before)g(a)e +Fp(sane)p 2646 4779 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227 +4892 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o +(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f +(unnecessary)j(and)227 5005 y(undesirable)29 b(to)d(call)g(this)h +(function)h(\002rst.)1607 4926 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 1607 4926 a 1607 4926 +a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 1607 4926 a 79 x Fq(The)d(same)h(informtation)j(about)e(a)e(de)n +(vice)i(has)f(to)g(be)g(returned)227 5118 y(when)e Fp(sane)p +672 5118 28 4 v 31 w(open)d Fq(is)i(called.)1290 5118 +y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 1290 5118 a 1290 5118 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 1290 5118 a 1290 5118 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 1290 +5118 a 1905 5381 a Fq(27)p eop +%%Page: 28 29 +28 28 bop 0 123 a Fm(4.3.4)99 b Fc(sane)p 545 123 30 +4 v 35 w(open)0 356 y Fq(This)26 b(function)h(is)f(used)h(to)e +(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36 +b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0 +469 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40 +b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33 +b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e +Fp(*h)p Fq(.)0 503 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 503 a 0 503 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 503 a 79 x Fq(The)d(description) +j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e Fp(**device)p +2040 582 28 4 v 29 w(description)p Fq(.)i(This)e(is)f(the)i(same)f +(description)j(that)0 695 y(is)h(returned)j(in)d(the)h(list)g(by)f +Fp(sane)p 1144 695 V 31 w(get)p 1340 695 V 32 w(devices)p +Fq(.)42 b(The)29 b(returned)i(data)g Fp(*h)c Fq(and)j +Fp(*device)p 3186 695 V 30 w(description)23 b Fq(is)0 +807 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid)i(until)f +(a)f(call)h(to)g Fp(sane)p 2288 807 V 30 w(close\(\))c +Fq(is)j(performed.)3231 807 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 3231 807 a 3231 807 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 3231 +807 a 3231 807 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 3231 807 a 28 w Fq(As)g(a)g(special)i(case,)0 +920 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n(vice)g +(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n(vice)e +(\(if)f(there)h(is)g(such)g(a)0 1033 y(de)n(vice\).)227 +1280 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k +(SANE_Handle)d(*)55 b(h,)e(const)f(SANE_Device)e(**)k(device_descrip)o +(ti)o(on)o(\);)0 1526 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g +(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +1772 y Fp(SANE)p 452 1772 28 4 v 31 w(STATUS)p 813 1772 +V 30 w(DEVICE)p 1173 1772 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 +b(de)n(vice)i(is)e(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i +(else\).)227 1918 y Fp(SANE)p 452 1918 V 31 w(STATUS)p +813 1918 V 30 w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f +(not)h(v)n(alid.)227 2065 y Fp(SANE)p 452 2065 V 31 w(STATUS)p +813 2065 V 30 w(IO)p 953 2065 V 32 w(ERROR)p Fr(:)43 +b Fq(An)23 b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de) +n(vice.)227 2211 y Fp(SANE)p 452 2211 V 31 w(STATUS)p +813 2211 V 30 w(NO)p 953 2211 V 32 w(MEM)p Fr(:)44 b +Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n +(ailable.)227 2357 y Fp(SANE)p 452 2357 V 31 w(STATUS)p +813 2357 V 30 w(ACCESS)p 1173 2357 V 30 w(DENIED)p Fr(:)43 +b Fq(Access)30 b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to) +g(insuf)n(\002cient)427 2470 y(or)24 b(in)l(v)n(alid)h(authentication.) +0 2778 y Fm(4.3.5)99 b Fc(sane)p 545 2778 30 4 v 35 w(close)0 +3011 y Fq(This)32 b(function)h(terminates)h(the)e(association)j +(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h +Fp(h)e Fq(and)h(the)g(de)n(vice)0 3123 y(it)h(represents.)59 +b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g +(to)g Fp(sane)p 2326 3123 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j +(\002rst.)57 b(After)33 b(this)0 3236 y(function)26 b(returns,)f +(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 +3508 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 +3816 y Fm(4.3.6)99 b Fc(sane)p 545 3816 30 4 v 35 w(get)p +760 3816 V 35 w(option)p 1155 3816 V 35 w(descriptor)0 +4049 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f +(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h +(descriptor)g(for)f(option)0 4161 y(number)i Fp(n)e Fq(of)h(the)h(de)n +(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36 +b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0 +4274 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g +(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de) +n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 4387 y(includes)22 +b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i +(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p +Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 4500 +y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h +(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227 +4771 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48 +b(*)445 4884 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)1905 5381 y +Fq(28)p eop +%%Page: 29 30 +29 29 bop 0 123 a Fm(4.3.7)99 b Fc(sane)p 545 123 30 +4 v 35 w(control)p 1000 123 V 34 w(option)0 347 y Fq(This)31 +b(function)h(is)f(used)g(to)g(set)g(or)g(inquire)h(the)f(current)h(v)n +(alue)g(of)e(option)j(number)e Fp(n)f Fq(of)g(the)h(de)n(vice)h +(represented)i(by)0 460 y(handle)26 b Fp(h)p Fq(.)k(The)24 +b(manner)i(in)e(which)h(the)f(option)i(is)f(controlled)i(is)d +(speci\002ed)i(by)f(parameter)h Fp(a)p Fq(.)k(The)24 +b(possible)j(v)n(alues)e(of)0 572 y(this)g(parameter)h(are)e(described) +j(in)d(more)g(detail)h(belo)n(w)-6 b(.)31 b(The)24 b(v)n(alue)h(of)f +(the)g(option)i(is)e(passed)i(through)g(ar)n(gument)g +Fp(v)p Fq(.)j(It)0 685 y(is)21 b(a)f(pointer)j(to)e(the)g(memory)h +(that)f(holds)h(the)g(option)g(v)n(alue.)29 b(The)20 +b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f Fq(must)h(be)g(big)g +(enough)0 798 y(to)26 b(hold)g(the)g(entire)h(option)h(v)n(alue)e +(\(determined)i(by)e(member)g Fp(size)d Fq(in)j(the)g(corresponding)k +(option)d(descriptor\).)39 b(The)0 911 y(only)23 b(e)o(xception)i(to)d +(this)g(rule)h(is)f(that)h(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g +(string)h(option,)h(the)e(string)i(pointed)g(to)e(by)g(ar)n(gument)0 +1024 y Fp(v)33 b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i +(will)d(stop)h(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering) +i(the)d(\002rst)f Fp(NUL)0 1137 y Fq(terminator)c(in)e(the)g(string.)44 +b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p +Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o +(vide)i(details)g(on)e(ho)n(w)0 1250 y(well)23 b(the)h(request)h(has)f +(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d +(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227 +1468 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h +(h,)k(SANE_Int)e(n,)2027 1580 y(SANE_Action)f(a,)j(void)g(*v,)2027 +1693 y(SANE_Int)e(*)j(i\);)0 1911 y Fq(The)21 b(w)o(ay)h(the)f(option)j +(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d +(controlled)k(by)c(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i +(of)e(type)0 2024 y Fp(SANE)p 225 2024 28 4 v 31 w(Action)p +Fq(.)k(The)e(possible)j(v)n(alues)f(and)f(their)g(meaning)h(is)e +(described)j(in)e(T)-7 b(able)23 b(4.7.)p 185 2139 3531 +4 v 183 2252 4 113 v 628 2218 a Fr(Symbol)p 1363 2252 +V 1363 2252 V 493 w(Code)p 1664 2252 V 1664 2252 V 850 +w(Description)p 3714 2252 V 185 2255 3531 4 v 185 2272 +V 183 2385 4 113 v 234 2351 a Fp(SANE)p 459 2351 28 4 +v 31 w(ACTION)p 820 2351 V 30 w(GET)p 1015 2351 V 32 +w(VALUE)p 1363 2385 4 113 v 254 w Fq(0)p 1664 2385 V +100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 2385 +V 183 2723 4 339 v 234 2464 a Fp(SANE)p 459 2464 28 4 +v 31 w(ACTION)p 820 2464 V 30 w(SET)p 1015 2464 V 32 +w(VALUE)p 1363 2723 4 339 v 254 w Fq(1)p 1664 2723 V +100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g +(passed)h(through)g(ar)n(-)1716 2576 y(gument)21 b Fp(v)d +Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue) +1716 2689 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p +3714 2723 V 183 3288 4 565 v 234 2802 a Fp(SANE)p 459 +2802 28 4 v 31 w(ACTION)p 820 2802 V 30 w(SET)p 1015 +2802 V 32 w(AUTO)p 1363 3288 4 565 v 309 w Fq(2)p 1664 +3288 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28 +b(or)f(de)n(vice)g(will)g(au-)1716 2915 y(tomatically)39 +b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38 +b(mode)1716 3028 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o +(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 3141 y(v)n(alue)22 +b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h +Fp(v)e Fq(is)h(completely)1716 3254 y(ignored)j(in)f(this)g(case)g(and) +g(may)f(be)h Fp(NULL)p Fq(.)p 3714 3288 V 185 3291 3531 +4 v 1168 3444 a(T)-7 b(able)24 b(4.7:)29 b(Action)24 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 3444 28 4 v +31 w(Action)p Fq(\))0 3745 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an) +g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o +Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0 +3858 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e +Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h +(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0 +3971 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g +(described)i(in)e(T)-7 b(able)23 b(4.8.)0 4134 y(This)g(function)j(may) +d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +4351 y Fp(SANE)p 452 4351 V 31 w(STATUS)p 813 4351 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h +(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427 +4464 y(option)e(number)-5 b(.)227 4602 y Fp(SANE)p 452 +4602 V 31 w(STATUS)p 813 4602 V 30 w(INVAL)p Fr(:)44 +b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227 +4741 y Fp(SANE)p 452 4741 V 31 w(STATUS)p 813 4741 V +30 w(IO)p 953 4741 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +4879 y Fp(SANE)p 452 4879 V 31 w(STATUS)p 813 4879 V +30 w(NO)p 953 4879 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 5017 +y Fp(SANE)p 452 5017 V 31 w(STATUS)p 813 5017 V 30 w(ACCESS)p +1173 5017 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h +(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427 +5130 y(or)24 b(in)l(v)n(alid)h(authentication.)1905 5381 +y(29)p eop +%%Page: 30 31 +30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046 +a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746 +1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103 +1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a +Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p +1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21 +b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g +(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h +(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j +(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797 +1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h +(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i +(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d +(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797 +1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49 +b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f +(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797 +2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32 +b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31 +b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28 +b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e +(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h +(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455 +V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4 +v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30 +w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133 +V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n +(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f +(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797 +2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g +Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j +(should)e(reload)g(all)f(options.)1797 2986 y(This)36 +b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one) +1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923 +4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p +628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444 +3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g +(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797 +3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p +2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797 +3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f +(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26 +b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if) +1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30 +b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33 +b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797 +3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4 +791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29 +b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option) +1905 5381 y(30)p eop +%%Page: 31 32 +31 31 bop 0 123 a Fm(4.3.8)99 b Fc(sane)p 545 123 30 +4 v 35 w(get)p 760 123 V 35 w(parameters)0 356 y Fq(This)28 +b(function)i(is)e(used)h(to)e(obtain)j(the)e(current)i(scan)f +(parameters.)44 b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j +(to)d(be)0 469 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f +(been)h(started)h(\()p Fp(sane)p 2070 469 28 4 v 31 w(start\(\))19 +b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0 +582 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6 +b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates) +e(of)g(what)f(the)g(parameters)0 695 y(will)23 b(be)g(when)g +Fp(sane)p 716 695 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32 +b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i +(started)g(allo)n(ws,)0 807 y(for)c(e)o(xample,)h(to)e(get)h(an)g +(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27 +b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0 +920 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f +(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer) +j Fp(p)c Fq(to)i(a)g(parameter)0 1033 y(structure.)k(The)23 +b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n +(w)-6 b(.)227 1305 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e +(\(SANE_Handle)h(h,)2027 1417 y(SANE_Parameters)f(*)54 +b(p\);)0 1689 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e +(a)f(structure)k(of)d(type)g Fp(SANE)p 2314 1689 V 31 +w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0 +1802 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 +b(.)910 1723 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 910 1723 a 910 1723 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 910 1723 a 227 2048 +a Fp(typedef)52 b(struct)336 2161 y({)445 2274 y(SANE_Frame)e(format;) +445 2387 y(SANE_Int)h(flags;)445 2500 y(SANE_Int)g(lines;)445 +2613 y(SANE_Int)g(depth;)445 2725 y(SANE_Int)g(pixels_per_line;)445 +2838 y(SANE_Int)g(bytes_per_line;)445 2951 y(SANE_Int)g +(channels_per_ima)o(ge)o(;)445 3064 y(SANE_String)f(formatdesc;)445 +3177 y(SANE_String)g(proposed_filena)o(me)o(;)445 3290 +y(SANE_Int)h(dpi_x;)445 3403 y(SANE_Int)g(dpi_y;)445 +3516 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j +(*/)336 3629 y(})227 3742 y(SANE_Parameters)o(;)0 3988 +y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f(the)g +(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 b(possible)i(v)n +(alues)f(for)f(type)0 4101 y Fp(SANE)p 225 4101 28 4 +v 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7 b(able)28 +b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e(described) +i(in)f(more)f(detail)h(in)f(Sec-)0 4214 y(tion)d(3.2.)0 +4385 y(The)d Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g +(for)h(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g +(de\002ned,)h(all)f(unused)i(bits)0 4498 y(ha)n(v)o(e)g(to)g(be)f(set)h +(to)f(0:)136 4770 y Fk(\017)46 b Fp(SANE)p 452 4770 V +31 w(PFLAG)p 758 4770 V 31 w(LAST)p 1009 4770 V 31 w(FRAME)27 +b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g(if)g(and)h +(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227 +4882 y(being)23 b(acquired)i(\(or)d(the)g(frame)g(that)g(will)g(be)g +(acquired)i(ne)o(xt)e(if)g(there)h(is)f(no)g(current)h(frame\))g(is)f +(the)g(last)g(frame)g(of)227 4995 y(a)g(multi)h(frame)g(image)g +(\(e.g.,)f(the)h(current)h(frame)f(is)f(the)h(blue)g(component)i(of)e +(a)f(red,)h(green,)g(blue)h(image\).)29 b(Note,)227 5108 +y(that)24 b(it)g(is)f(possible)j(to)d(transmit)i(multiple)g(images)f +(in)f(succession.)0 5128 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 5128 a 0 5128 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 5128 a +0 5128 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 5128 a 1905 5381 a Fq(31)p eop +%%Page: 32 33 +32 32 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 0 32 a 217 35 3466 4 v +215 148 4 113 v 535 114 a Fr(Symbol)p 1144 148 V 1144 +148 V 368 w(Code)p 1446 148 V 1446 148 V 100 w(SANE)21 +b(standard)p 2159 148 V 2159 148 V 586 w(Description)p +3681 148 V 217 151 3466 4 v 217 168 V 215 281 4 113 v +267 247 a Fp(SANE)p 492 247 28 4 v 31 w(FRAME)p 798 247 +V 31 w(GRAY)p 1144 281 4 113 v 230 w Fq(0)p 1446 281 +V 318 w(v)o(ersion)k(1)p 2159 281 V 240 w(Band)f(co)o(v)o(ering)h +(human)f(visual)h(range.)p 3681 281 V 215 394 V 267 360 +a Fp(SANE)p 492 360 28 4 v 31 w(FRAME)p 798 360 V 31 +w(RGB)p 1144 394 4 113 v 285 w Fq(1)p 1446 394 V 318 +w(v)o(ersion)g(1)p 2159 394 V 240 w(Pix)o(el-interlea)n(v)o(ed)i +(red/green/blue)h(bands.)p 3681 394 V 215 506 V 267 473 +a Fp(SANE)p 492 473 28 4 v 31 w(FRAME)p 798 473 V 31 +w(RED)p 1144 506 4 113 v 285 w Fq(2)p 1446 506 V 318 +w(v)o(ersion)d(1)p 2159 506 V 240 w(Red)e(band)i(of)e(a)g +(red/green/blue)28 b(image.)p 3681 506 V 215 619 V 267 +585 a Fp(SANE)p 492 585 28 4 v 31 w(FRAME)p 798 585 V +31 w(GREEN)p 1144 619 4 113 v 175 w Fq(3)p 1446 619 V +318 w(v)o(ersion)d(1)p 2159 619 V 240 w(Green)f(band)g(of)g(a)f +(red/green/blue)28 b(image.)p 3681 619 V 215 732 V 267 +698 a Fp(SANE)p 492 698 28 4 v 31 w(FRAME)p 798 698 V +31 w(BLUE)p 1144 732 4 113 v 230 w Fq(4)p 1446 732 V +318 w(v)o(ersion)d(1)p 2159 732 V 240 w(Blue)e(band)i(of)e(a)g +(red/green/blue)28 b(image.)p 3681 732 V 215 845 V 267 +811 a Fp(SANE)p 492 811 28 4 v 31 w(FRAME)p 798 811 V +31 w(RAW)p 1144 845 4 113 v 285 w Fq(5)p 1446 845 V 318 +w(v)o(ersion)d(2)p 2159 845 V 240 w(Arbitrary)g(pix)o(el)f(property)i +(transmission.)p 3681 845 V 215 958 V 267 924 a Fp(SANE)p +492 924 28 4 v 31 w(FRAME)p 798 924 V 31 w(MIME)p 1144 +958 4 113 v 230 w Fq(6)p 1446 958 V 318 w(v)o(ersion)f(2)p +2159 958 V 240 w(Data)e(described)j(by)e(a)f(mime)g(descriptor)-5 +b(.)p 3681 958 V 217 961 3466 4 v 1194 1115 a(T)e(able)23 +b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 2377 +1115 28 4 v 31 w(Frame)p Fq(\))0 1230 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 0 1230 a 0 1230 +a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 0 1230 a 0 1230 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 0 1230 a 0 1397 a + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 1397 a 0 1397 +a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 1397 a 136 1488 a Fk(\017)46 b Fp(SANE)p 452 1488 +28 4 v 31 w(PFLAG)p 758 1488 V 31 w(MORE)p 1009 1488 +V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\))e(is)g(set)g(to)g +(1)f(to)h(indicate)i(further)f(pending)h(images.)40 b(It)26 +b(is)227 1601 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f(1)g +(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g(determined)i +(at)e(a)g(v)o(ery)g(early)h(time,)f(where)227 1714 y(it)f(might)g(not)h +(be)f(detectable,)i(if)e(there)h(actually)h(are)e(more)g(images)h(to)f +(transfer)h(\(e.g.)28 b(you)22 b(will)e(usually)j(not)e(kno)n(w)227 +1827 y(if)31 b(the)h(document)h(feeder)g(contains)g(further)g(pages)g +(when)e(starting)i(to)f(scan)g(the)f(current)i(one.)53 +b(Thus)31 b(you)h(are)227 1939 y(allo)n(wed)25 b(to)e(set)h(that)g(bit) +g(b)n(ut)g(later)g(f)o(ail)g(at)f Fp(sane)p 1808 1939 +V 31 w(start\(\))p Fq(.)136 2127 y Fk(\017)46 b Fp(SANE)p +452 2127 V 31 w(PFLAG)p 758 2127 V 31 w(NEW)p 954 2127 +V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h(to)g(1) +f(to)h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g(a)227 +2240 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g +(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group) +h(multi-image)227 2353 y(scans.)136 2541 y Fk(\017)46 +b Fp(SANE)p 452 2541 V 31 w(PFLAG)p 758 2541 V 31 w(BACKSIDE)18 +b Fq(\(bit)24 b(3,)e(bitv)n(alue)j(8\))e(tell)g(if)g(the)g(current)i +(image)e(w)o(as)g(acquired)i(from)e(the)g(front)h(\(0\))227 +2653 y(or)j(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g +(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n +(ws)g(to)f(group)227 2766 y(and)e(order)h(multi-image)g(transfers)h(re) +o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h +(\002rst/back)g(\002rst\).)0 3038 y(Note,)d(that)h(\003ags)e(is)h +(compatibel)j(to)c(member)i Fp(last)p 1715 3038 V 31 +w(frame)18 b Fq(of)k Fp(SANE)p 2356 3038 V 31 w(Parameters)17 +b Fq(of)22 b(SANE)e(standard)k(v)o(ersion)0 3151 y(1)f(\(same)h(size)g +(and)g(only)g(bit)g(0)f(\(bitv)n(alue)j(1\))d(w)o(as)h(used)g(with)f +(same)h(function\).)0 3322 y(Member)33 b Fp(lines)d Fq(speci\002es)35 +b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.) +57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 +3435 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the) +h(frontend)h(should)g(call)f Fp(sane)p 2572 3435 V 31 +w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0 +3548 y Fp(SANE)p 225 3548 V 31 w(STATUS)p 586 3548 V +30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f(transferring)k +(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i(inband,)h(it)c(is)0 +3661 y(recommended)23 b(to)e(set)g(that)g(member)l(,)h(if)f(a)n(v)n +(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h(applicable,)i +(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0 3832 +y(Member)31 b Fp(bytes)p 618 3832 V 30 w(per)p 813 3832 +V 32 w(line)d Fq(speci\002es)k(the)f(number)h(of)f(bytes)h(that)f +(comprise)i(one)e(scan)g(line.)52 b(If)30 b(bytes)p 3585 +3832 V 35 w(per)p 3735 3832 V 34 w(line)0 3945 y(is)e(set)g(to)g(0,)g +(which)h(can)f(currently)i(only)f(be)f(the)g(case)h(for)f +Fp(SANE)p 2150 3945 V 31 w(FRAME)p 2456 3945 V 30 w(MIME)p +Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0 4058 +y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i(simply)e +(try)h(to)f(read)h(until)g Fp(SANE)p 2490 4058 V 31 w(STATUS)p +2851 4058 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h(block)0 +4171 y(length.)j(F)o(or)22 b(ef)n(\002cienc)o(y)i(reasons,)g(medium)f +(to)g(lar)n(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f +(kilobytes\))j(should)g(be)e(used.)0 4284 y(Returning)i(short)g(reads)f +(is)g(allo)n(wed)g(to)g(allo)n(w)f(for)h(small)f(b)n(uf)n(fers)j(in)d +(the)h(back)o(end.)0 4456 y(Member)i Fp(depth)c Fq(speci\002es)27 +b(the)f(number)g(of)g(bits)g(per)g(sample.)35 b(Note,)26 +b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g(n*8)0 +4569 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23 b(with)h(other)g +(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6 +b(.)0 4740 y(Member)24 b Fp(pixels)p 666 4740 V 30 w(per)p +861 4740 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g +(that)g(comprise)h(one)f(scan)g(line.)0 4912 y(Assume)k +Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then) +h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f +Fp(depth)p Fq(\))e(and)0 5025 y(the)e(number)i(of)e(pix)o(els)h(per)f +(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h +Fp(pixels)p 2416 5025 V 30 w(per)p 2611 5025 V 31 w(line)p +Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 +5045 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 5045 a 0 5045 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 5045 a 0 5045 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 5045 a 1905 +5381 a Fq(32)p eop +%%Page: 33 34 +33 33 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 32 a 91 x Fq(of)23 b(bytes)i(per)f +(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h Fp(bytes)p +1675 123 28 4 v 31 w(per)p 1871 123 V 31 w(line)p Fq(\))d(as)j(follo)n +(ws:)1214 360 y Fh(c)i(>)p Fj(=)1445 216 y Fb(\()1554 +304 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p Fj(8)p Fk(e)424 +b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 417 y Fh(B)f Fk(\001)d +Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h Fj(+)f(7\))p Fh(=)p +Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g Fj(1)0 595 y Fq(Note)j(that)g +(the)g(number)g(of)g(bytes)g(per)g(line)g(can)g(be)g(lar)n(ger)h(than)f +(the)g(minimum)g(v)n(alue)g(imposed)h(by)f(the)g(right)g(side)g(of)0 +707 y(this)c(equation.)31 b(A)22 b(frontend)k(must)e(be)f(able)h(to)g +(properly)i(cope)e(with)f(such)i(\223padded\224)h(image)e(formats.)0 +868 y(Member)f Fp(channels)p 775 868 V 29 w(per)p 969 +868 V 31 w(image)d Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the) +e(image)f(consists)j(of.)j(When)23 b(the)g(image)0 981 +y(is)29 b(transmitted)i(in)e(more)g(than)g(one)h(frame)f +Fp(channels)p 1869 981 V 29 w(per)p 2063 981 V 31 w(image)d +Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g(frames)h(for)f(this)0 +1093 y(image.)0 1254 y(Member)g Fp(formatdesc)24 b Fq(is)29 +b(used)g(for)g(the)h(ne)n(w)e(frametypes)j Fp(SANE)p +2301 1254 V 31 w(FRAME)p 2607 1254 V 30 w(RAW)c Fq(and)j +Fp(SANE)p 3209 1254 V 31 w(FRAME)p 3515 1254 V 30 w(MIME)p +Fq(.)c(Its)0 1367 y(meaning)f(dif)n(fers)g(between)f(the)g(tw)o(o)f +(types:)136 1597 y Fk(\017)46 b Fp(SANE)p 452 1597 V +31 w(FRAME)p 758 1597 V 31 w(RAW)p Fq(:)28 b(The)i Fp(formatdesc)c +Fq(contains)32 b(a)f(description)i(of)e(the)g(channel)h(data)f(and)g +(an)g(optional)227 1710 y(depth)25 b(information)h(separated)g(by)e(a)f +(colon\(:\).)227 1855 y(A)g(plane)h(is)g(descibed)h(by)f(one)g +(channel,)h(e.g.)k(\224)p Fp(gray)p Fq(\224)21 b(or)j(\224)p +Fp(gray:12)p Fq(\224.)227 2001 y(Channel)c(interlea)n(v)o(ed)h(data)d +(is)g(described)j(by)d(a)g(comma)g(separated)i(list)f(of)f(channel)i +(descriptions,)i(e.g.)27 b(\224)p Fp(red,green,blue)p +Fq(\224)227 2114 y(or)d(\224)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p +Fq(\224,)17 b(the)24 b(channel)h(data)f(is)g(sent)g(in)f(the)h(gi)n(v)o +(en)g(order)-5 b(.)227 2259 y(The)24 b(depth)i(information)h(does)e +Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f +(data,)g(it)e(is)g(only)h(an)g(informa-)227 2372 y(tion)f(for)g(the)g +(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f +(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227 +2518 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p +Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p +Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel) +227 2630 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared) +j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24 +b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 2743 y(description)e(lik)o(e)e +Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g +(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h +(with)227 2856 y(usefull)f(colors.)227 3002 y(Note)30 +b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d +(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227 +3115 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f +(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27 +b(an)g(RGB)e(image)i(is)g(sent)g(it)227 3227 y(is)e(prefered)i(to)e +(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d +(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227 +3340 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d +(de\002ned)i(in)e(member)h Fp(channels)p 2756 3340 V +29 w(per)p 2950 3340 V 31 w(image)p Fq(.)136 3518 y Fk(\017)46 +b Fp(SANE)p 452 3518 V 31 w(FRAME)p 758 3518 V 31 w(MIME)p +Fq(:)31 b(The)h Fp(formatdesc)c Fq(contains)36 b(the)d(MIME)f +(type/subtype)38 b(*\(;parameter\))e(\002elds)d(as)227 +3631 y(described)f(in)c(RFC)f(1521,)k(4.)44 b(The)28 +b(Content-T)-7 b(ype)31 b(Header)f(Field,)f(without)h(the)f +(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227 3744 +y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i +(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g +(possible,)k(please)227 3857 y(stick)28 b(to)f(the)h(IAN)m(A)d +(assigned)30 b(MIME)25 b(types,)k(and)f(mak)o(e)f(sure)h(the)f +(datastream)j(is)d(compliant)i(with)e(the)g(corre-)227 +3970 y(sponding)32 b(speci\002cation.)48 b(When)29 b(data)h(is)f +(transmitted)i(with)e(the)g(framy)h(type)g Fp(SANE)p +3052 3970 V 30 w(FRAME)p 3357 3970 V 31 w(MIME)c Fq(all)k(data)227 +4083 y(has)e(to)f(be)g(transmitted)j(whithin)e(one)g(frame,)g(multiple) +g(frames)g(are)f(not)h(allo)n(wed)g(\(so)f(the)h(\003ag)e +Fp(last)p 3601 4083 V 31 w(frame)227 4196 y Fq(has)e(to)e(be)h(set)g +(when)g(using)i(this)e(frame)g(type\).)30 b(A)21 b(fully)j(compliant)h +(SANE)20 b(back)o(end)26 b(is)c(required)j(to)e(transmit)h(in)227 +4309 y(either)29 b(SANE)d(nati)n(v)o(e)i(frametypes,)j(or)d(in)g(a)f +(MIME)g(type,)i(for)g(which)f(a)f(con)l(v)o(erting)k(middleend)f(e)o +(xists)f(and)f(is)227 4422 y(freely)d(a)n(v)n(ailable)h(for)e(all)f +(platforms.)227 4567 y(Other)e(formats)h(may)f(be)g(transmitted,)i(b)n +(ut)f(as)f(the)g(only)h(thing)g(the)f(a)n(v)o(erage)h(frontend)i(can)d +(do)g(with)g(them,)g(is)g(sa)n(v)o(e)227 4680 y(them.)44 +b(This)29 b(is)f(not)h(considered)j(a)c(good)h(option,)j(as)c(it)h +(does)g(not)g(f)o(acilitate)i(transmitting)g(the)e(data)g(to)g(a)f +(client)227 4793 y(application)i(that)d(may)g(be)f(running)j(the)e +(frontend.)40 b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g +(transferred)j(by)c(the)h(back)o(end)i(is)e(not)227 4906 +y(an)k(image)f(in)g(nature,)k(it)c(w)o(ouldn')n(t)i(mak)o(e)e(sense)i +(to)e(try)g(con)l(v)o(erting)k(it)c(an)o(yw)o(ay)-6 b(,)32 +b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227 5019 y(simple)22 +b Fp(SANE)p 715 5019 V 31 w(FRAME)p 1021 5019 V 31 w(MIME)c +Fq(transfer)24 b(for)d(that)h(case.)29 b(But)21 b(e)n(v)o(en)g(then,)h +(try)g(to)f(stick)h(to)g(well)f(kno)n(wn)g(stuf)n(f)h(with)227 +5132 y(freely)j(e)o(xisting)g(standards)h(and)e(vie)n(wers)h(as)e +(well.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 +5151 a 1905 5381 a Fq(33)p eop +%%Page: 34 35 +34 34 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 32 a 91 x Fq(The)23 +b(member)g Fp(proposed)p 929 123 28 4 v 29 w(filename)c +Fq(can)24 b(be)f(used)i(to)e(suggest)i(a)e(reasonable)j(def)o(ault)f +(\002lename)f(or)f(-e)o(xtension)j(in)0 236 y(case)21 +b(the)h(back)o(end)h(can)e(mak)o(e)g(such)h(a)e(suggestion,)k(lik)o(e)e +(e.g.)27 b(an)21 b(image)g(database.)30 b(If)21 b(no)g(such)h +(suggestion)i(is)c(intended,)0 349 y(set)k(the)g(\002eld)f(to)g +(\224\224.)0 520 y(In)28 b(the)h(case)g(of)f(non-MIME)h(frames,)h(this) +f(is)f(e)o(xpected)j(to)d(hold)h(the)g(basename)h(for)f(the)f(image,)i +(with)e(the)h(e)o(xtension)0 633 y(determined)i(by)f(the)f(sa)n(v)o(e)h +(function)h(of)e(the)h(frontend,)i(as)e(the)f(frontend)i(can)f(fully)g +(understand)i(the)e(data)g(and)f(is)g(thus)0 746 y(able)24 +b(to)g(encode)h(it)e(in)h(an)o(y)f(format)h(it)g(wishes.)0 +917 y(F)o(or)f(MIME)f(frames)i(it)f(can)h(contain)h(either:)136 +1187 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which) +g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o +(xtension.)32 b(This)24 b(could)i(also)227 1300 y(be)e(gotten)h(from)e +(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e +(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)136 1487 +y Fk(\017)46 b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o +(xtension.)0 1757 y(Note,)31 b(that)f(for)g(frontends)i(that)e(are)g +(able)g(to)g(parse)g(a)f(gi)n(v)o(en)i(MIME)d(type)i(internally)-6 +b(,)34 b(it)29 b(is)g(perfectly)j(permissible)g(to)0 +1870 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g(the)g(proposed)i +(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h(basename,)h(when) +f(using)g(internal)0 1983 y(sa)n(v)o(e)g(algorithms)i(for)d(dif)n +(ferent)j(formats.)0 2154 y(In)34 b(an)o(y)g(case,)k(if)c(the)g +(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f(frontend)h +(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0 +2267 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g +(local)g(\002lesystem)h(restrictions.)0 2439 y(Special)i(care)g(should) +g(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o +(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all) +g(path)0 2552 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o +(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h +(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0 +2664 y(a)n(v)n(oiding)h(to)e(o)o(v)o(erwrite)g(e)o(xisting)h(\002les.) +40 b(\(Creating)30 b(of)d(leading)i(dot)f(\002les)f(-)g(lik)o(e)h +(.rhosts)h(-)e(is)g(not)h(an)g(issue)g(here,)h(as)e(a\))0 +2777 y(co)o(v)o(ers)d(that\).)0 2949 y(The)k(string)h +Fp(proposed)p 848 2949 V 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f +(transmit)i(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in) +e(the)0 3062 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of) +n(fer)-5 b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h +(information)i(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0 +3174 y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j +(enganged)f(\002lters,)f(etc.)0 3346 y(The)34 b(members)g +Fp(dpi)p 711 3346 V 32 w(x,)53 b(dpi)p 1071 3346 V 32 +w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h +(resolution.)63 b(Note,)37 b(that)d(multiple-image)0 +3459 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c +(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j +(resolution)g(between)0 3572 y(frames)24 b(of)g(the)f(same)h(image.)0 +3743 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g +(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h +(unchanged)j(when)c(future)0 3856 y(e)o(xtensions)j(are)e(done.)30 +b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e +(to)g(0.)2484 3856 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 2484 3856 a 2484 3856 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 2484 3856 +a 2484 3856 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 2484 3856 a 0 4163 a Fm(4.3.9)99 b Fc(sane)p +545 4163 30 4 v 35 w(start)0 4396 y Fq(This)23 b(function)j(initiates)g +(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i +(by)c(handle)i Fp(h)p Fq(.)227 4641 y Fp(SANE_Status)50 +b(sane_start)g(\(SANE_Handle)f(h\);)0 4886 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h +(status)g(codes.)227 5132 y Fp(SANE)p 452 5132 28 4 v +31 w(STATUS)p 813 5132 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 +b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g +Fp(sane)p 3297 5132 V 31 w(cancel)p Fq(.)1905 5381 y(34)p +eop +%%Page: 35 36 +35 35 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(STATUS)p +813 123 V 30 w(DEVICE)p 1173 123 V 30 w(BUSY)p Fr(:)44 +b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6 b(.)30 b(The)23 +b(operation)j(should)g(be)d(retried)i(later)-5 b(.)227 +269 y Fp(SANE)p 452 269 V 31 w(STATUS)p 813 269 V 30 +w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 +415 y Fp(SANE)p 452 415 V 31 w(STATUS)p 813 415 V 30 +w(NO)p 953 415 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g +(is)e(out)h(of)g(documents.)227 561 y Fp(SANE)p 452 561 +V 31 w(STATUS)p 813 561 V 30 w(COVER)p 1118 561 V 31 +w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227 +707 y Fp(SANE)p 452 707 V 31 w(STATUS)p 813 707 V 30 +w(IO)p 953 707 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g +(while)f(communicating)i(with)e(the)g(de)n(vice.)227 +852 y Fp(SANE)p 452 852 V 31 w(STATUS)p 813 852 V 30 +w(NO)p 953 852 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)0 1160 +y Fm(4.3.10)99 b Fc(sane)p 595 1160 30 4 v 35 w(read)0 +1393 y Fq(This)19 b(function)j(is)e(used)g(to)g(read)g(image)g(data)g +(from)g(the)g(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)27 b(Ar)n(gument)20 b Fp(buf)e Fq(is)h(a)g(pointer)0 +1506 y(to)27 b(a)g(memory)g(area)h(that)f(is)g(at)g(least)h +Fp(maxlen)c Fq(bytes)k(long.)41 b(The)26 b(number)i(of)f(bytes)i +(returned)g(is)e(stored)h(in)f Fp(*len)p Fq(.)37 b(A)0 +1619 y(back)o(end)d(must)d(set)h(this)g(to)g(zero)g(when)g(the)g(call)g +(f)o(ails)g(\(i.e.,)h(when)f(a)f(status)i(other)f(than)h +Fp(SANE)p 3205 1619 28 4 v 30 w(STATUS)p 3565 1619 V +30 w(GOOD)c Fq(is)0 1732 y(returned\).)50 b(When)29 b(the)h(call)h +(succeeds,)i(the)d(number)g(of)g(bytes)h(returned)g(can)f(be)g(an)o +(ywhere)h(in)f(the)g(range)g(from)g(0)f(to)0 1844 y Fp(maxlen)20 +b Fq(bytes.)227 2090 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f +(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482 2203 y(SANE_Int)c(maxlen,)g +(SANE_Int)g(*)j(len\);)0 2449 y Fq(If)30 b(this)i(function)h(is)d +(called)i(when)f(no)g(data)g(is)g(a)n(v)n(ailable,)j(one)e(of)e(tw)o(o) +h(things)h(may)e(happen,)k(depending)g(on)d(the)g(I/O)0 +2561 y(mode)24 b(that)g(is)f(in)h(ef)n(fect)g(for)g(handle)h +Fp(h)p Fq(.)114 2807 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g +(blocking)i(I/O)e(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f +(blocks)i(until)f(at)f(least)h(one)g(data)f(byte)h(is)227 +2920 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g(error)g(occurs\).)114 +3107 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c +(mode,)k(the)d(call)g(returns)h(immediately)g(with)e(status)i +Fp(SANE)p 3656 3107 V 31 w(STA-)227 3220 y(TUS)p 397 +3220 V 32 w(GOOD)21 b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0 +3466 y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via) +g(a)f(call)h(to)f Fp(sane)p 2024 3466 V 31 w(set)p 2220 +3466 V 31 w(io)p 2361 3466 V 32 w(mode\(\))p Fq(.)0 3637 +y(This)g(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n +(wing)h(status)g(codes.)227 3883 y Fp(SANE)p 452 3883 +V 31 w(STATUS)p 813 3883 V 30 w(CANCELLED)p Fr(:)42 b +Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g +Fp(sane)p 3297 3883 V 31 w(cancel)p Fq(.)227 4029 y Fp(SANE)p +452 4029 V 31 w(STATUS)p 813 4029 V 30 w(EOF)p Fr(:)45 +b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h +(frame.)44 b(If)28 b Fp(sane)p 3199 4029 V 31 w(read)e +Fq(sends)427 4142 y(back)f(an)o(y)e(image)h(data)g(it)g(is)f(not)h +(allo)n(wed)g(to)g(return)g(with)g Fp(SANE)p 2540 4142 +V 31 w(STATUS)p 2901 4142 V 30 w(EOF)p Fq(.)227 4288 +y Fp(SANE)p 452 4288 V 31 w(STATUS)p 813 4288 V 30 w(JAMMED)p +Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 +4434 y Fp(SANE)p 452 4434 V 31 w(STATUS)p 813 4434 V +30 w(NO)p 953 4434 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 +b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +4580 y Fp(SANE)p 452 4580 V 31 w(STATUS)p 813 4580 V +30 w(COVER)p 1118 4580 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4726 y Fp(SANE)p +452 4726 V 31 w(STATUS)p 813 4726 V 30 w(IO)p 953 4726 +V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 4871 y Fp(SANE)p +452 4871 V 31 w(STATUS)p 813 4871 V 30 w(NO)p 953 4871 +V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 5017 y Fp(SANE)p +452 5017 V 31 w(STATUS)p 813 5017 V 30 w(ACCESS)p 1173 +5017 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h +(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 +5130 y(or)24 b(in)l(v)n(alid)h(authentication.)1905 5381 +y(35)p eop +%%Page: 36 37 +36 36 bop 0 123 a Fm(4.3.11)99 b Fc(sane)p 595 123 30 +4 v 35 w(cancel)0 354 y Fq(This)24 b(function)i(is)d(used)i(to)e +(immediately)j(or)e(as)f(quickly)j(as)e(possible)i(cancel)f(the)f +(currently)i(pending)g(operation)g(of)e(the)0 467 y(de)n(vice)h +(represented)h(by)e(handle)h Fp(h)p Fq(.)227 709 y Fp(void)53 +b(sane_cancel)d(\(SANE_Handle)f(h\);)0 951 y Fq(This)33 +b(function)i(can)f(be)f(called)h(at)f(an)o(y)h(time)f(\(as)g(long)h(as) +f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i(handle\))h(b)n(ut)f(usually)h +(af)n(fects)f(long-)0 1064 y(running)28 b(operations)h(only)e(\(such)g +(as)f(image)h(is)f(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h +(this)f(function)j(asynchronously)i(\(e.g.,)0 1177 y(from)37 +b(within)g(a)f(signal)j(handler\).)70 b(It)37 b(is)f(important)j(to)d +(note)i(that)f(completion)i(of)e(this)g(operaton)i(does)f +Fl(not)h Fq(imply)0 1290 y(that)g(the)f(currently)i(pending)g +(operation)h(has)d(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i +(that)e(cancellation)i(has)d(been)0 1403 y Fl(initiated)p +Fq(.)68 b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j +(call)d(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0 +1516 y Fp(SANE)p 225 1516 28 4 v 31 w(STATUS)p 586 1516 +V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j +(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0 +1629 y(this)i(implies)h(that)f(a)f(frontend)i(must)f +Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g +(cancelled)i(operation)g(has)e(returned.)0 1935 y Fm(4.3.12)99 +b Fc(sane)p 595 1935 30 4 v 35 w(set)p 810 1935 V 35 +w(io)p 965 1935 V 35 w(mode)0 2166 y Fq(This)21 b(function)j(is)e(used) +g(to)f(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p +Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d +(non-blocking.)0 2279 y(If)i(ar)n(gument)j Fp(m)c Fq(is)h +Fp(SANE)p 833 2279 28 4 v 31 w(TRUE)p Fq(,)e(the)j(mode)f(is)h(set)g +(to)f(non-blocking)28 b(mode,)23 b(otherwise)i(it')-5 +b(s)24 b(set)g(to)f(blocking)j(mode.)227 2521 y Fp(SANE_Status)50 +b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 b(SANE_Bool)c(m\);)0 +2763 y Fq(By)33 b(def)o(ault,)38 b(ne)n(wly)c(opened)h(handles)h +(operate)g(in)d(blocking)j(mode.)60 b(A)33 b(back)o(end)j(may)d(elect)i +(not)f(to)g(support)h(non-)0 2876 y(blocking)29 b(I/O)c(mode.)38 +b(In)26 b(such)h(a)f(case)h(the)f(status)i(v)n(alue)f +Fp(SANE)p 2107 2876 V 31 w(STATUS)p 2468 2876 V 30 w(UNSUPPORTED)20 +b Fq(is)27 b(returned.)39 b(Blocking)0 2989 y(I/O)32 +b(must)g(be)h(supported)i(by)d(all)h(back)o(ends,)k(so)32 +b(calling)i(this)f(function)i(with)d(ar)n(gument)i Fp(m)d +Fq(set)i(to)f Fp(SANE)p 3509 2989 V 31 w(FALSE)d Fq(is)0 +3102 y(guaranteed)e(to)c(complete)i(successfully)-6 b(.)0 +3272 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h +(follo)n(wing)h(status)g(codes:)227 3514 y Fp(SANE)p +452 3514 V 31 w(STATUS)p 813 3514 V 30 w(INVAL)p Fr(:)44 +b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227 +3659 y Fp(SANE)p 452 3659 V 31 w(STATUS)p 813 3659 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)0 3964 y Fm(4.3.13)99 b +Fc(sane)p 595 3964 30 4 v 35 w(get)p 810 3964 V 35 w(select)p +1205 3964 V 34 w(fd)0 4196 y Fq(This)25 b(function)j(is)e(used)g(to)g +(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d +(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 +4309 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h +(a)f(call)h(to)f Fp(sane)p 1850 4309 28 4 v 31 w(read\(\))d +Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29 +b(If)21 b(the)h(call)0 4422 y(completes)j(successfully)-6 +b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d +Fp(*fd)p Fq(.)227 4664 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 4906 y Fq(This)37 +b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g +Fp(sane)p 2056 4906 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed) +h(and)f(the)g(returned)0 5019 y(\002le-descriptor)j(is)c(guaranteed)k +(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h +(image)f(acquisition)j(\(i.e.,)g(un-)0 5132 y(til)e Fp(sane)p +339 5132 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 5132 +V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h +Fp(sane)p 2810 5132 V 31 w(read\(\))c Fq(returns)41 b(with)e(status) +1905 5381 y(36)p eop +%%Page: 37 38 +37 37 bop 0 123 a Fp(SANE)p 225 123 28 4 v 31 w(STATUS)p +586 123 V 30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e +(guarantee)i(to)e(close)h(the)f(returned)i(select)f(\002le)f +(descriptor)i(at)e(the)0 236 y(point)24 b(when)e(the)h(ne)o(xt)g +Fp(sane)p 962 236 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h +Fp(SANE)p 2202 236 V 31 w(STATUS)p 2563 236 V 30 w(EOF)p +Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 349 +y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f +(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p +3167 349 V 31 w(read\(\))p Fq(.)0 520 y(A)30 b(back)o(end)k(may)e +(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31 +b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0 +633 y Fp(SANE)p 225 633 V 31 w(STATUS)p 586 633 V 30 +w(UNSUPPORTED)p Fq(.)0 805 y(Note)25 b(that)h(the)g(only)g(operation)i +(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c(a)g(host)i +(operating-system)i(dependent)0 918 y(test)23 b(whether)h(the)e +(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h(test)g(can)g(be)g +(implemented)h(using)g Fp(select\(\))18 b Fq(or)23 b +Fp(poll\(\))0 1031 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f(other)i +(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l(,)23 +b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0 +1144 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals) +f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g +(until)g(a)f(call)g(to)0 1256 y Fp(sane)p 225 1256 V +31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i +(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this) +g(operation)i(is)d(strongly)0 1369 y(encouraged)27 b(as)c(it)g(permits) +i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g +(acquisition)j(is)c(in)h(progress.)0 1541 y(This)f(function)j(may)d(f)o +(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227 +1787 y Fp(SANE)p 452 1787 V 31 w(STATUS)p 813 1787 V +30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.) +227 1933 y Fp(SANE)p 452 1933 V 31 w(STATUS)p 813 1933 +V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)0 2241 y Fm(4.3.14)99 b +Fc(sane)p 595 2241 30 4 v 35 w(strstatus)0 2474 y Fq(This)28 +b(function)i(can)f(be)f(used)h(to)f(translate)i(a)e(SANE)e(status)j +(code)g(into)g(a)f(printable)i(string.)44 b(The)28 b(returned)i(string) +g(is)e(a)0 2587 y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g +(complete)h(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f +(\(full-stop\).)32 b(The)22 b(function)j(is)0 2700 y(guaranteed)k(to)c +(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g +(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this) +g(function)h(is)0 2813 y(performed.)227 3059 y Fp(const)53 +b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g +(status\);)0 3411 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0 +3676 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i +(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b +Fp(sane)p 2797 3676 28 4 v 31 w(init\(\))17 b Fq(and)22 +b Fp(sane)p 3547 3676 V 31 w(exit\(\))0 3789 y Fq(initialize)j(and)d(e) +o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31 +b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f +(initialization)j(and)d(before)0 3902 y(e)o(xiting)i(the)f(back)o(end.) +0 4074 y(Function)j Fp(sane)p 573 4074 V 31 w(get)p 769 +4074 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h +(after)g Fp(sane)p 2572 4074 V 31 w(init\(\))c Fq(has)k(been)h(called.) +36 b(It)26 b(returns)0 4187 y(the)32 b(list)f(of)h(the)f(de)n(vices)i +(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 +b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0 +4300 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f +(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n +(ferent)h(calls.)30 b(It)21 b(should)j(be)0 4413 y(noted)i(that)f(this) +g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g +(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of) +0 4526 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36 +b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f +(ability)h(for)f(a)f(user)i(to)e(directly)0 4638 y(select)g(a)e +(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g +(function.)0 4810 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e +(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352 +4810 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h +(at)0 4923 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o +(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e +(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 5036 y(at)e(an)o(y)h(gi)n(v)o +(en)g(time.)1905 5381 y(37)p eop +%%Page: 38 39 +38 38 bop 536 2582 a @beginspecial 0 @llx 0 @lly 601 +@urx 542 @ury 3060 @rhi @setspecial +%%BeginDocument: figs/flow.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: flow.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Tue Dec 3 22:09:10 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 601 542 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-161.0 577.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr +% Polyline +n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr +% Polyline +n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr +% Polyline +n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 6600 m +gs 1 -1 sc (image acquisition) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 3825 m +gs 1 -1 sc (device setup) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 7515 m +gs 1 -1 sc (- go back to) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5775 7515 m +gs 1 -1 sc (sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +7275 7515 m +gs 1 -1 sc (if more frames desired) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 3300 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 5100 m +gs 1 -1 sc (- sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 4500 m +gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 4080 m +gs 1 -1 sc (sane_control_option\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 3600 m +gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 5700 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 6900 m +gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6000 m +gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6450 m +gs 1 -1 sc (sane_read\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 8100 m +gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 1200 m +gs 1 -1 sc (- sane_init\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 9300 m +gs 1 -1 sc (- sane_exit\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +3600 1800 m +gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 2700 m +gs 1 -1 sc (- sane_open\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 8700 m +gs 1 -1 sc (- sane_close\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4800 2175 m +gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23 +b(\003o)n(w)0 3154 y(An)g(opened)i(de)n(vice)g(can)f(be)f(setup)i +(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f +(functions)j Fp(sane)p 3460 3154 28 4 v 30 w(get)p 3655 +3154 V 32 w(opt-)0 3267 y(ion)p 170 3267 V 31 w(descriptor\(\))k +Fq(and)38 b Fp(sane)p 1280 3267 V 31 w(control)p 1696 +3267 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n +(vice,)42 b(obtaining)e(option)0 3380 y(descriptors)d(and)e(setting)h +(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f +(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0 +3493 y(read)g(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o +(ginning)h(and)f(then)g(b)n(uild)h(a)d(dialog)j(\(either)g(graphical)g +(or)e(a)g(command-)0 3606 y(line)27 b(oriented)i(option)g(list\))e +(that)g(allo)n(ws)g(to)g(control)i(the)e(a)n(v)n(ailable)i(options.)40 +b(It)27 b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0 +3719 y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29 +b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f +(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0 +3832 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary) +h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34 +b(While)24 b(setting)i(up)0 3945 y(the)i(de)n(vice,)h(it)e(is)g(also)h +(admissible)h(to)e(call)h Fp(sane)p 1655 3945 V 31 w(get)p +1851 3945 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i +(of)e(what)g(the)h(image)0 4057 y(parameters)e(will)d(look)h(lik)o(e)g +(once)h(image)f(acquisition)i(be)o(gins.)0 4229 y(The)36 +b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e +(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p +3186 4229 V 31 w(set)p 3382 4229 V 31 w(io)p 3523 4229 +V 32 w(mode\(\))p Fq(.)0 4342 y(De)n(vices)30 b(are)f(required)i(to)e +(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g(mode\),) +h(b)n(ut)e(support)i(for)e(non-blocking)0 4455 y(I/O)23 +b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d(such)h(as)e +(UNIX.)0 4626 y(After)g(the)g(de)n(vice)g(is)g(setup)h(properly)-6 +b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f(a)f(call)h(to) +g Fp(sane)p 3077 4626 V 30 w(start\(\))p Fq(.)i(The)d(back-)0 +4739 y(end)33 b(calculates)h(the)f(e)o(xact)f(image)h(parameters)h(at)e +(this)g(point.)56 b(So)31 b(future)i(calls)g(to)f Fp(sane)p +3023 4739 V 31 w(get)p 3219 4739 V 31 w(parameters\(\))0 +4852 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h +(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i +(starts)f(at)f(this)0 4965 y(point)41 b(or)e(during)i(the)e(\002rst)h +(call)f(to)h Fp(sane)p 1450 4965 V 31 w(read\(\))35 b +Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking) +44 b(I/O)0 5078 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e +(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h +Fp(sane)p 2949 5078 V 31 w(set)p 3145 5078 V 31 w(io)p +3286 5078 V 32 w(mode\(\))c Fq(and/or)1905 5381 y(38)p +eop +%%Page: 39 40 +39 39 bop 0 123 a Fp(sane)p 225 123 28 4 v 31 w(get)p +421 123 V 31 w(select)p 782 123 V 30 w(fd\(\))21 b Fq(at)i(this)h +(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f +(the)h(back)o(end)h(does)g(not)e(support)0 236 y(the)h(requested)i +(operation.)0 255 y + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 255 a 0 255 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 255 a 152 x Fq(Image)k(data)h(is) +f(collected)i(by)e(repeatedly)j(calling)f Fp(sane)p 1914 +407 28 4 v 30 w(read\(\))27 b Fq(until)k(this)f(function)i(will)e +(return)h(an)f(end-of-\002le)0 520 y(status)35 b(\()p +Fp(SANE)p 495 520 V 31 w(STATUS)p 856 520 V 30 w(EOF)p +Fq(\).)d(This)i(indicates)j(the)d(end)g(of)g(the)g(current)i(frame.)60 +b(If)34 b(the)h(frontend)h(e)o(xpects)f(addi-)0 633 y(tional)g(frames)g +(\(e.g.,)h(the)e(indi)n(vidual)i(channels)g(in)e(of)g(a)f +(red/green/blue)38 b(image)d(or)f(multiple)h(images\),)i(it)c(can)i +(call)0 746 y Fp(sane)p 225 746 V 31 w(start\(\))20 b +Fq(again.)31 b(If)24 b(the)h Fp(SANE)p 1349 746 V 31 +w(PFLAG)p 1655 746 V 30 w(LAST)p 1905 746 V 31 w(FRAME)c +Fq(bit)k(is)f(set)g(in)g Fp(flags)p Fq(,)d(the)k(current)h(image)e(is)g +(com-)0 859 y(plete.)60 b(In)33 b(this)i(case,)h(it)e(should)h(be)e +(tested,)38 b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p +2409 859 V 31 w(PFLAG)p 2715 859 V 31 w(MORE)p 2966 859 +V 31 w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 972 +y(further)e(calls)e(to)g Fp(sane)p 794 972 V 31 w(start\(\))c +Fq(can)30 b(be)f(made)g(to)g(acquire)h(more)f(images.)46 +b(Please)30 b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 +1085 y(be)f(set)g(at)f(the)h(be)o(ginning)i(of)e(a)f(the)h +(transmission)i(of)e(the)g(last)g(frame)g(before)h(the)f(ne)n(w)f +(image,)h(it)g(is)f(possible,)k(that)d(no)0 1198 y(reliable)f(decision) +h(can)e(be)f(made)h(at)f(this)h(time.)34 b(It)26 b(is)f(thus)h +(permissible)i(for)e(a)f(back)o(end)i(to)f(set)f(this)h(bit,)g(and)g +(then)g(later)0 1311 y(at)33 b(the)g(actual)h(call)f(to)f +Fp(sane)p 980 1311 V 31 w(start\(\))d Fq(return)34 b(an)f(error)g(lik)o +(e)h Fp(SANE)p 2388 1311 V 31 w(STATUS)p 2749 1311 V +30 w(NO)p 2889 1311 V 31 w(DOCS)p Fq(.)c(Such)j(a)f(sequence)j(is)0 +1424 y(permitted)27 b(to)f(transmit)h(multiple)g(images)g(from)e(a)h +(single)h(page)g(as)e(well)h(as)f(multiple)j(pages.)36 +b(This)26 b(beha)n(viour)j(should)0 1536 y(be)21 b(controlled)i(by)e +(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n(w)h(single-page)i +(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 1649 +y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g(all)d +(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p 2933 1649 +V 31 w(PFLAG)p 3239 1649 V 31 w(LAST)p 3490 1649 V 30 +w(FRAME)e Fq(on)0 1762 y(and)29 b Fp(SANE)p 384 1762 +V 31 w(PFLAG)p 690 1762 V 31 w(MORE)p 941 1762 V 31 w(IMAGES)c +Fq(of)n(f)k(is)f(encountered,)34 b(or)28 b(an)h(error)h(other)g(than)f +Fp(SANE)p 3085 1762 V 31 w(STATUS)p 3446 1762 V 30 w(EOF)e +Fq(occurs)0 1875 y(in)21 b(a)g(SANE)e(function.)30 b(Note)21 +b(that)h Fp(SANE)p 1342 1875 V 31 w(STATUS)p 1703 1875 +V 30 w(NO)p 1843 1875 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w) +o(ay)f(for)h(the)f(back)o(end)j(to)d(indicate)0 1988 +y(the)j(end)g(of)f(a)g(multiple)i(image)f(scan.)0 2160 +y(A)c(frontend)k(may)d(choose)i(to)e(skip)i(frames)f(\(e.g.)28 +b(because)23 b(it)e(cannot)i(parse)g(them\),)e(which)h(is)f +(accomplished)k(by)c(simply)0 2273 y(calling)30 b Fp(sane)p +500 2273 V 31 w(start)25 b Fq(again,)30 b(which)f(will)f(get)h(you)g +(to)f(the)h(ne)o(xt)f(frame,)i(without)f(ha)n(ving)i(to)d(read)h(and)g +(discard)h(the)0 2386 y(current)25 b(one.)0 2557 y(In)d(order)h(to)f +(prematurely)i(stop)f(scanning)h(and)f(to)e(reset)i(the)f(back)o(end)j +(state,)d Fp(sane)p 2707 2557 V 31 w(cancel\(\))c Fq(can)k(be)g(called) +h(at)f(an)o(y)0 2670 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d +(well)h(after)g(normal)g(termination)i(of)e(a)f(multiple)h(image)g +(scan)h(as)e(described)j(abo)o(v)o(e.)0 2842 y(When)33 +b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e +(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 2842 V +31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0 +2955 y(e)o(xiting)e(the)f(application,)37 b(function)d +Fp(sane)p 1443 2955 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55 +b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0 +3068 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d +(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0 +3239 y(The)e(follo)n(wing)i(C)d(sample)j(code)f(implements)h(a)e +(reference)j(loop)e(for)g(acquiring)i(multiple)f(images:)0 +3510 y Fp(SANE_Parameters)48 b(parms;)0 3623 y(SANE_Status)268 +b(status;)0 3849 y(do)0 3962 y({)109 4075 y(do)109 4188 +y({)218 4301 y(/*)54 b(Now)f(start)f(acquiring)f(the)i(next)g(frame.)e +(*/)218 4414 y(status=sane_sta)o(rt)o(\(ha)o(nd)o(le)o(\);)218 +4640 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h(problem,)d(and)i(no)h +(more)e(frames)g(can)h(be)273 4752 y(*)h(read)f(at)g(this)g(time.)f +(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S)49 b(still)273 +4865 y(*)54 b(being)e(clear,)g(this)h(will)f(break)h(out)g(of)g(_BOTH_) +f(loops.)273 4978 y(*/)218 5091 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o +(OD\))48 b(break;)0 5102 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 5102 a 0 5102 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 5102 a +0 5102 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 5102 a 1905 5381 a Fq(39)p eop +%%Page: 40 41 +40 40 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 32 a 218 236 a Fp(/*)54 +b(Now)f(let)g(us)h(see)f(what)g(the)g(next)g(frame)f(brings.)f(*/)218 +349 y(status=sane_get)o(_p)o(ara)o(me)o(te)o(rs)o(\(h)o(and)o(le)o(,&)o +(pa)o(rm)o(s\);)218 574 y(/*)j(This)f(actually)d(should)i(not)h(fail,)g +(but)g(maybe)f(the)h(doc)h(feeder)273 687 y(*)g(jammed)e(or)h +(something,)d(so)k(we)g(break)e(as)h(well,)g(if)g(something)273 +800 y(*)h(is)f(wrong.)273 913 y(*/)218 1026 y(if)h(\(status)d(!=)j +(SANE_STATUS_GO)o(OD\))48 b(break;)218 1252 y(/*)54 b(Now)f(we)h(check) +e(the)h(announced)e(parameters,)e(if)54 b(we)f(can)h(make)e(use)273 +1365 y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g +(to)g(the)g(next)g(frame.)273 1478 y(*/)218 1591 y(if)h(\()g +(do_i_like_that\()o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;) +218 1817 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle) +g(filenames,)273 1929 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e +(files,)i(ask)h(user)273 2042 y(*)h(for)f(confirmation,)c(...)273 +2155 y(*/)218 2268 y(setup_for_trans)o(fe)o(r\(.)o(..)o(\);)218 +2494 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f(frame)f(data)h(and)g +(process)f(it.)h(This)g(should)273 2607 y(*)h(return)e(SANE_STATUS_GO)o +(OD)o(,)c(until)53 b(the)g(frame)f(is)i(complete,)273 +2720 y(*)g(what)f(causes)e(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273 +2833 y(*/)218 2946 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54 +b(\()g(status=sane_rea)o(d\()o(..)o(.\))48 b(\))54 b(\))545 +3059 y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red) +o(\(\))o(;)218 3284 y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f +(anything)e(but)i(EOF,)g(break)f(out.)h(*/)218 3397 y(if)h(\(status)d +(!=)j(SANE_STATUS_EO)o(F\))48 b({)436 3510 y(break;)218 +3623 y(})218 3849 y(/*)54 b(Now)f(loop)g(until)f(we)i(have)e(all)i +(frames)d(of)j(an)g(image.)d(*/)109 3962 y(})j(while\(!\(parms.f)o(la)o +(g)49 b(&)54 b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0 +4188 y(/*)g(O.K.)e(-)i(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h +(it)h(together,)c(save)j(it,)55 4301 y(*)h(flush)e(buffers,)f(transmit) +g(it,)i(increment)d(filenames,)g(etc.)55 4413 y(*/)0 +4639 y(/*)k(Now)f(check)f(for)h(more)g(pending)e(images.)h(If)h(we)h +(have)f(more,)f(redo)h(from)f(start.)55 4752 y(*)i(Some)e(backends)f +(might)i(cheat)f(here)h(and)g(send)f(us)i(for)f(an)h(extra)e(round)g +(which)55 4865 y(*)i(will)e(fail)h(at)h(sane_start,)49 +b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c(if)k(they)55 +4978 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start)f(of)i(the)f +(last)g(frame)f(we)i(read.)55 5091 y(*/)0 5098 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 5098 +a 0 5098 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 5098 a 0 5098 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 5098 a 1905 5381 a Fq(40)p +eop +%%Page: 41 42 +41 41 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 32 a 91 x Fp(})54 b(while\(parms.fla)o +(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S\);)0 +349 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j +(go)f(back)g(to)h(option-control)55 462 y(*)g(loop.)55 +574 y(*/)0 800 y(sane_cancel\(han)o(dl)o(e\))o(;)0 911 +y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 911 a 0 911 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 911 a 0 911 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 911 a 340 x Fn(4.5)119 +b(W)-8 b(ell-Kno)o(wn)31 b(Options)0 1517 y Fq(While)c(most)f(back)o +(end)j(options)f(are)f(completely)i(self-describing,)i(there)c(are)g(a) +f(cases)h(where)g(a)f(user)h(interf)o(ace)i(might)0 1630 +y(w)o(ant)24 b(to)g(special-case)k(the)c(handling)j(of)d(certain)i +(options.)32 b(F)o(or)24 b(e)o(xample,)h(the)f(scan)h(area)g(is)f +(typically)i(de\002ned)f(by)g(four)0 1743 y(options)35 +b(that)e(specify)h(the)f(top-left)i(and)e(bottom-right)j(corners)e(of)f +(the)g(area.)57 b(W)l(ith)33 b(a)f(graphical)j(user)e(interf)o(ace,)k +(it)0 1856 y(w)o(ould)25 b(be)g(tedious)i(to)d(force)i(the)f(user)h(to) +e(type)i(in)f(these)g(four)h(numbers.)34 b(Instead,)26 +b(most)f(such)h(interf)o(aces)h(will)d(w)o(ant)h(to)0 +1969 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g(\(lo)n +(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h(or)d(a) +h(high\(er\))h(resolution)i(scan)d(of)0 2082 y(a)h(subpart)i(of)e(the)g +(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f(scan)h +(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0 +2194 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g +(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n +(v)o(e)h(well-de\002ned)0 2307 y(meanings.)0 2615 y Fm(4.5.1)99 +b(Option)25 b(Number)h(Count)0 2848 y Fq(Option)e(number)h(0)e(has)h +(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g +(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 2848 +28 4 v 30 w(TYPE)p 3556 2848 V 31 w(INT)d Fq(and)0 2961 +y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n +(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g +(includes)i(option)e(number)h(0\).)0 3074 y(This)23 b(means)h(that)f +(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f +(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o +(ycle)0 3187 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h +(until)h Fp(sane)p 1963 3187 V 31 w(get)p 2159 3187 V +31 w(option)p 2520 3187 V 30 w(descriptor\(\))17 b Fq(returns)25 +b Fp(NULL)p Fq(,)c(or)j(a)0 3300 y(frontend)i(can)e(directly)h(read)f +(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 3608 +y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 3689 +y + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 3689 a 0 3689 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 3689 a 152 x Fq(Option)33 b Fp(resolution)28 +b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j(at)c(which)i(an)e +(image)h(should)i(be)d(acquired.)59 b(When)33 b(the)0 +3954 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g(dif)n(ferent)j(v)n +(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h(to)f(de\002ne)h +(the)g(options)h Fp(x)p 3327 3954 28 4 v 33 w(resolution)0 +4067 y Fq(and)40 b Fp(y)p 230 4067 V 33 w(resolution)p +Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i Fp(resolution)34 +b Fr(or)40 b Fq(the)g(options)i Fp(x)p 3142 4067 V 32 +w(resolution)34 b Fr(and)0 4179 y Fp(y)p 60 4179 V 32 +w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0 4351 +y(The)k(type)h(of)g(this)g(option)h(is)e(either)i Fp(SANE)p +1417 4351 V 31 w(TYPE)p 1668 4351 V 31 w(INT)c Fq(or)j +Fp(SANE)p 2212 4351 V 31 w(TYPE)p 2463 4351 V 31 w(FIXED)p +Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460 4351 V 30 w(UNIT)p +3710 4351 V 31 w(DPI)0 4464 y Fq(\(dots/inch\).)0 4636 +y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g +(back)o(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h +(a)e(manner)i(consistent)0 4749 y(with)c(the)h(abo)o(v)o(e)g +(de\002nition.)955 4749 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 955 4749 a 955 4749 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 955 4749 +a 955 4749 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 955 4749 a 1905 5381 a Fq(41)p eop +%%Page: 42 43 +42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221 +@urx 205 @ury 1836 @rhi @setspecial +%%BeginDocument: figs/area.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: area.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Wed Dec 4 19:19:37 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 221 205 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-59.0 231.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% Polyline +n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr +/Helvetica findfont 180.00 scalefont setfont +2550 2302 m +gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +7.500 slw +% Polyline +n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr +n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr +n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3375 3150 m +gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1500 m +gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2700 1050 m +gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1050 3600 m +gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +4425 525 m +gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1080 585 m +gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 1725 1650 m 1725 1800 l gs col-1 s gr +% Polyline +n 1650 1725 m 1800 1725 l gs col-1 s gr +% Polyline +n 3375 2700 m 3375 2850 l gs col-1 s gr +% Polyline +n 3300 2775 m 3450 2775 l gs col-1 s gr +15.000 slw +% Polyline +n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23 +b(area)h(options)0 2134 y Fm(4.5.3)99 b(Pr)n(e)o(view)25 +b(Mode)g(Option)0 2367 y Fq(The)g(boolean)j(option)f +Fp(preview)22 b Fq(is)j(used)i(by)f(a)f(frontend)j(to)e(inform)g(the)g +(back)o(end)i(when)e(image)g(acquisition)j(should)0 2480 +y(be)e(optimized)i(for)e(speed,)i(rather)g(than)e(quality)i(\(\223pre)n +(vie)n(w)f(mode\224\).)41 b(When)27 b(set)g(to)g Fp(SANE)p +3003 2480 28 4 v 31 w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 +2593 y(in)e(ef)n(fect,)g(when)g(set)g(to)g Fp(SANE)p +1012 2593 V 31 w(FALSE)d Fq(image)j(acquisition)j(should)f(proceed)f +(in)f(normal)h(quality)g(mode.)33 b(The)25 b(setting)0 +2706 y(of)c(this)h(option)h Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e +(other)i(option.)29 b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h +(options)g(are)f(concerned,)i(the)e(pre)n(vie)n(w)0 2819 +y(mode)i(is)g(completely)i(side)e(ef)n(fect)h(free.)30 +b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g(frontend)i(will)e +(tak)o(e)g(care)h(of)e(appropriately)0 2932 y(setting)i(the)e(scan)h +(resolution)i(for)d(pre)n(vie)n(w)h(mode)f(\(through)j(option)e +Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e(free)h(to)f(o)o(v)o +(erride)0 3045 y(the)j Fp(resolution)21 b Fq(v)n(alue)27 +b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h(mode,)f(b)n(ut)g +(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)g(to)f(the)0 +3158 y(frontend)35 b(where)n(v)o(er)e(possible.)1081 +3078 y + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + 1081 3078 a 1081 3078 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 1081 3078 a 80 x Fq(When)f(the)h +Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f +(transfer)g(the)f(image)f(in)0 3270 y(frame)24 b(type)g +Fp(SANE)p 639 3270 28 4 v 31 w(FRAME)p 945 3270 V 30 +w(RAW)e Fq(if)h(possible.)1584 3270 y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + 1584 3270 a 1584 +3270 a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 1584 3270 a 1584 3270 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 1584 3270 a 0 3442 a Fq(This)j(option)i +(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 3555 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +3863 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 4096 +y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g(are)f +(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29 +b(The)22 b(scan)i(area)f(is)f(de\002ned)0 4209 y(by)h(tw)o(o)f(points)j +(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e +(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0 +4322 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e +(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e +(the)h(scan)g(surf)o(ace)h(as)0 4435 y(seen)25 b(by)g(the)g(sensor)h +(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i +(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 +b(this)h(reason,)0 4547 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i +(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f +(simultaneously)k(the)c Fl(smallest)0 4660 y Fq(and)f(the)f +(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h +(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0 +4773 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f +(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g +(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0 +4886 y(necessary)i(con)l(v)o(ersions.)0 5058 y(The)d(names)h(of)g(the)f +(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o +(en)g(in)f(the)h(table)h(belo)n(w:)1905 5381 y(42)p eop +%%Page: 43 44 +43 43 bop 1200 111 a Fr(Name)100 b(Description)1200 223 +y Fp(tl-x)107 b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue) +1200 336 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i +Fq(coordinate)g(v)n(alue)1200 449 y Fp(br-x)107 b Fq(Bottom-right)25 +b Fh(x)e Fq(coordinate)j(v)n(alue)1200 562 y Fp(br-y)107 +b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0 +778 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e(follo) +n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g +(options:)136 1003 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h +(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p +2091 1003 28 4 v 31 w(UNIT)p 2342 1003 V 31 w(PIXEL)p +Fq(\))20 b(or)k(millimeters)h(\()p Fp(SANE)p 3484 1003 +V 31 w(UNIT)p 3735 1003 V 31 w(MM)p Fq(\))227 1116 y(to)f(these)g +(options.)31 b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h +(identical.)136 1298 y Fk(\017)46 b Fq(Whene)n(v)o(er)25 +b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h +(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136 +1480 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g +(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h +(options)h(ha)n(v)o(e)f(range)227 1592 y(constraints)i(associated.)51 +b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f +(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 1705 +y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f +(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o +(ace)g(size.)136 1887 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o +(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i +(missing.)0 2185 y Fm(4.5.5)99 b(Depth)26 b(option)0 +2267 y + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 2267 a 0 2267 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 2267 a 144 x Fq(Option)k Fp(depth)c +Fq(is)k(used)g(to)f(select)i(the)e(image)h(depth)h(in)e(bits/sample)j +(in)d(multi)h(bit)f(mode)h(-)f(\(this)h(means)g(for)g(24)f(bit)0 +2524 y(r)n(gb)23 b(mode)g(this)g(v)n(alue)g(must)f(be)h(8\).)28 +b(The)22 b(type)h(of)g(this)g(option)h(is)e Fp(SANE)p +2319 2524 28 4 v 31 w(TYPE)p 2570 2524 V 31 w(INT)p Fq(.)e(The)i(unit)h +(is)f Fp(SANE)p 3437 2524 V 31 w(UNIT)p 3688 2524 V 31 +w(BIT)p Fq(.)0 2637 y(F)o(or)h(1)g(bit)h(modes)g(\(Lineart)g(or)g +(Halftone\))h(this)f(option)h(has)f(to)f(be)h(inacti)n(v)o(e.)30 +b(F)o(or)22 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0 +2750 y(Halftone\))h(the)f(back)o(end)i(should)f(use)f(the)g(well-kno)n +(wn)g(option)h Fp(mode)p Fq(.)0 3028 y(This)h(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3141 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3253 +y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 0 3253 a 0 3253 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 0 3253 a 0 3253 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 0 3253 a 299 x +Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 3633 y + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 3633 +a 0 3633 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 3633 a 145 x Fq(The)30 b Fp(gamma-table)24 +b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 3778 +28 4 v 31 w(CONSTRAINT)p 2225 3778 V 29 w(RANGE)d Fq(of)j(the)h(type)g +Fp(SANE)p 3208 3778 V 31 w(TYPE)p 3459 3778 V 31 w(INT)d +Fq(which)0 3891 y(represent)c(the)d(gamma)g(correction)j(table)e(for)g +(gray)-6 b(.)28 b(In)22 b(color)g(mode)f(the)h Fp(gamma-table)15 +b Fq(may)21 b(be)h(used)g(to)f(set)g(a)g(com-)0 4003 +y(mon)d(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28 +b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12 +b Fp(green-gamma-tab)o(le)0 4116 y Fq(and)32 b Fp(blue-gamma-table)24 +b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g +(correction)k(for)d(each)h(color)g(separately)-6 b(.)0 +4229 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h +(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f +Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 4342 y Fp(blue-gamma-tabl)o(e)19 +b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options) +h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0 +4455 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f +(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h +(reduce)g(\(if)0 4568 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g +(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45 +b(This)29 b(should)h(e.g.)44 b(look)0 4681 y(lik)o(e)24 +b(this:)0 4906 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o +(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 5019 y(green_value)c(=)k +(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\)) +o(\))0 5132 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o +(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 5146 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 0 5146 +a 0 5146 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 0 5146 a 0 5146 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 0 5146 a 1905 5381 a Fq(43)p +eop +%%Page: 44 45 +44 44 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 32 a 91 x Fq(The)24 +b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e +(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h +(shado)n(w)-6 b(,)0 236 y(contrast,)24 b(brightness,)i(threshold,)f +(analog)p 1379 236 28 4 v 35 w(gamma.)j(These)22 b(functions)j(are)e +(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0 +349 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0 +633 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 746 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 859 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 0 +859 a 0 859 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 0 859 a 0 859 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 0 859 a 308 x Fm(4.5.7)99 +b(Scan)26 b(Mode)f(options)0 1249 y + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 0 1249 a 0 1249 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + +0 1249 a 151 x Fq(The)d(option)i Fp(mode)19 b Fq(de\002nes)k(a)f +Fp(SANE)p 1222 1400 28 4 v 31 w(CONSTRAINT)p 1803 1400 +V 28 w(STRING)p 2161 1400 V 30 w(LIST)e Fq(of)i(type)h +Fp(SANE)p 2926 1400 V 31 w(TYPE)p 3177 1400 V 31 w(STRING)p +Fq(.)18 b(It)k(is)g(used)0 1513 y(to)34 b(select)i(the)e(scanmode)i +(\(e.g.)61 b(Color)34 b(or)g(Gray\).)61 b(W)-7 b(ell)34 +b(kno)n(wn)h(modes)g(are:)50 b Fp(Color)p Fq(,)34 b Fp(Gray)p +Fq(,)g Fp(Halftone)c Fq(and)0 1626 y Fp(Lineart)p Fq(.)46 +b Fp(Color)27 b Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g +(or)f(16)h(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 +b Fp(Lineart)c Fq(are)0 1739 y(single)e(bit)f(modes.)0 +1852 y(This)f(w)o(ay)h(a)f(frontend)i(can)f(select)h(e.g)e(the)h(mode)g +Fp(Gray)d Fq(for)j(scanning)h(a)f(f)o(ax.)0 2136 y(This)i(option)i(is)e +(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 2249 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +2362 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 0 2362 a 0 2362 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 0 2362 a 0 2362 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 0 2362 a 308 +x Fm(4.5.8)99 b(Scan)26 b(Sour)n(ce)g(options)0 2751 +y + -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch +pop /CBarY65 exch def + 0 2751 a 0 2751 a + 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint +exch pop /CBarY66 exch def + 0 2751 a 152 x Fq(The)36 b(option)j +Fp(source)33 b Fq(is)k(used)h(to)f(select)h(the)f(scansource)j(\(e.g.) +69 b(Automatic)38 b(Document)g(Feeder\).)69 b(It)37 b(de\002nes)h(a)0 +3016 y Fp(SANE)p 225 3016 28 4 v 31 w(CONSTRAINT)p 806 +3016 V 28 w(STRING)p 1164 3016 V 30 w(LIST)20 b Fq(of)j(type)g +Fp(SANE)p 1930 3016 V 31 w(TYPE)p 2181 3016 V 31 w(STRING)p +Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b +Fp(Flatbed)p Fq(,)0 3129 y Fp(Transparancy)49 b(Adapter)20 +b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0 +3413 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3526 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3639 y + -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch +pop /CBarY67 exch def + 0 +3639 a 0 3639 a + 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint +exch pop /CBarY68 exch def + 0 3639 a 0 3639 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore + 0 3639 a 308 x Fm(4.5.9)99 +b(Thr)n(eshold)0 4010 y + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 4010 a 0 4010 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 4010 a 170 +x Fq(The)29 b(option)j Fp(threshold)25 b Fq(is)30 b(used)g(to)g +(de\002ne)h(the)f(threshold)i(for)e(Lineart)h(and)f(may)g(be)g +(Halftone)h(mode.)48 b(In)30 b(multi)0 4293 y(bit)36 +b(modes)g(this)g(option)i(should)f(be)f(set)g(inacti)n(v)o(e.)67 +b(The)35 b(type)h(of)g(this)g(option)i(is)d Fp(SANE)p +2975 4293 28 4 v 31 w(TYPE)p 3226 4293 V 31 w(FIXED)p +Fq(.)d(The)k(unit)0 4406 y(is)g Fp(SANE)p 321 4406 V +31 w(UNIT)p 572 4406 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g +(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68 +b(It)36 b(de\002nes)g(the)g(minimum)0 4519 y(intensity)27 +b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data) +h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v) +n(alues)i(in)e(the)0 4631 y(follo)n(wing)h(w)o(ay:)0 +4744 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white) +g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40 +b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 4857 y(intensities)e(brighter)g +(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e +(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0 +4970 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29 +b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f +(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0 +5083 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14 +b(.)g(.)g(70)23 b(percent\).)0 5103 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 5103 a 0 5103 +a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 5103 a 0 5103 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 5103 a 1905 5381 a Fq(44)p eop +%%Page: 45 46 +45 45 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 32 a 91 x Fq(This)26 +b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o +(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e +(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +349 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 349 a 0 349 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 349 a 0 349 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 349 a 284 x Fm(4.5.10)99 +b(Analog)24 b(gamma)0 715 y + -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch +pop /CBarY73 exch def + 0 715 a 0 715 a + 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint +exch pop /CBarY74 exch def + 0 715 a 134 +x Fq(The)37 b(option)i Fp(analog-gamma)31 b Fq(is)38 +b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h(analog)h +(gamma)e(function)i(of)f(the)0 962 y(scanner)33 b(in)e(multi)h(bit)f +(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g(option)h(should)g(be)e +(set)g(inacti)n(v)o(e.)54 b(The)31 b(type)h(of)f(this)h(option)g(is)0 +1075 y Fp(SANE)p 225 1075 28 4 v 31 w(TYPE)p 476 1075 +V 31 w(FIXED)p Fq(.)27 b(The)k(unit)g(is)g Fp(SANE)p +1486 1075 V 30 w(UNIT)p 1736 1075 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g +(range)h(can)f(be)g(de\002ned)g(by)g(the)g(back)o(end)i(as)0 +1188 y(supported.)38 b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g +(positi)n(v)o(e.)37 b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i +(that)f(the)g(gamma)f(correction)k(has)d(no)0 1301 y(ef)n(fect.)j(A)20 +b(v)n(alue)j(lar)n(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j +(of)c(the)h(image.)29 b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be) +f(options)0 1414 y Fp(analog-gamma-re)o(d)p Fq(,)16 b +Fp(analog-gamma-gre)o(en)g Fq(and)24 b Fp(analog-gamma-bl)o(ue)o +Fq(.)f(It)g(is)h(not)g(allo)n(wed)g(to)g(em-)0 1527 y(ulate)31 +b(an)e(anlog)i(gamma)e(function)j(by)d(a)h(digital)h(gamma)e(table.)48 +b(The)29 b(back)o(end)j(has)e(to)f(disable)j(\(or)d(not)h(de\002ne\))h +(this)0 1640 y(option)25 b(when)f(the)g(scanner)h(does)f(not)g(support) +i(an)d(analog)i(\(hardw)o(are\))h(gamma)d(function.)0 +1795 y(When)37 b(analog)i(gamma,)h(highlight)f(and)f(shado)n(w)f +(functions)j(are)d(a)n(v)n(ailable)j(at)d(the)g(same)g(time)g(then)h +(the)f(back)o(end)0 1908 y(author)32 b(has)g(to)e(care)i(about)g(the)f +(order)h(in)e(which)i(the)f(functions)i(are)e(implemented)i(in)e(the)g +(scanner)i(hardw)o(are.)52 b(The)0 2021 y(SANE)27 b(standard)32 +b(e)o(xpects)g(that)e(changing)j(the)d(analog)h(gamma)e(v)n(alue)i(has) +f(no)g(ef)n(fect)h(to)f(the)g(shado)n(w)g(and)h(highlight)0 +2133 y(function.)59 b(When)33 b(the)g(analog)i(gamma)d(function)j(is)e +(e)o(x)o(ecuted)i(in)d(the)i(scanner)g(hardw)o(are)h(before)f(the)f +(shado)n(w)h(and)0 2246 y(highlight)d(functions)g(then)e(the)g(back)o +(end)i(should)f(do)e(a)g(compensation.)47 b(F)o(or)27 +b(this)i(the)g(shado)n(w)g(and)g(highlight)i(v)n(alues)0 +2359 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g(corrected)j(with)d(the)h(rele) +n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 2514 y(It)e(is)h(not)g(allo)n +(wed)g(to)g(emulate)g(an)g(analog)h(gamma)e(function)j(by)e(a)f +(digital)i(gamma)e(table.)29 b(The)21 b(back)o(end)j(has)e(to)f +(disable)0 2627 y(\(or)j(not)g(de\002ne\))g(this)g(option)h(when)f(the) +f(scanner)j(does)e(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(gamma)d(function.)0 2782 y(This)j(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +2895 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3008 +y + -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch +pop /CBarY75 exch def + 0 3008 a 0 3008 a + 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint +exch pop /CBarY76 exch def + 0 3008 a 0 3008 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore + 0 3008 a 284 x +Fm(4.5.11)99 b(Shado)o(w)0 3356 y + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 3356 a 0 3356 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 +3356 a 153 x Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g +(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v) +o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h(is)0 +3622 y Fp(SANE)p 225 3622 28 4 v 31 w(TYPE)p 476 3622 +V 31 w(FIXED)p Fq(.)26 b(The)k(unit)g(is)g Fp(SANE)p +1482 3622 V 30 w(UNIT)p 1732 3622 V 31 w(PERCENT)p Fq(.)c(The)j(v)n +(alue)i(range)g(should)g(be)f(0.0.)14 b(.)g(.)g(100.0)29 +b(if)g(pos-)0 3735 y(sible.)47 b(It)29 b(is)h(used)g(to)f(de\002ne)h +(the)g(maximum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(an)e(image) +h(data)g(v)n(alue)g(of)g(0)f(\(black\).)48 b(The)0 3847 +y(back)o(end)26 b(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f +(follo)n(wing)i(w)o(ay:)0 3960 y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h +(that)g(the)f(sensiti)n(vity)k(range)d(is)f(not)h(reduced,)k(only)c +(the)f(minimum)h(intensity)h(produces)h(an)0 4073 y(image)30 +b(data)g(v)n(alue)h(of)e(0)h(\(black\).)48 b(A)29 b(v)n(alue)h(of)g +(50.0)g(means)g(that)g(that)g(a)f(medium)h(intensity)i(and)e(e)n(v)o +(erything)i(that)e(is)0 4186 y(dark)o(er)e(produces)h(an)e(image)g +(data)h(v)n(alue)f(of)g(0)f(\(black\).)41 b(A)25 b(v)n(alue)j(of)e +(100.0)i(means)f(the)g(sensiti)n(vity)j(range)e(is)e(reduced)0 +4299 y(to)i(0,)g(all)g(image)g(data)g(v)n(alues)h(are)f(0)g(\(black\).) +43 b(If)28 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o(v)o(er)h(the)h +(full)f(range)h(the)f(back)o(end)i(has)0 4412 y(to)25 +b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35 +b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e +(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0 +4525 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p +Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31 +b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0 +4638 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g +(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g +(disable)i(\(or)e(not)h(de\002ne\))0 4751 y(this)24 b(option)h(when)f +(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(shado)n(w)e(function.)0 4906 y(This)i(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +5019 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 5132 +y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 5132 a 0 5132 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 5132 a 0 5132 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 5132 a 1905 5381 +a Fq(45)p eop +%%Page: 46 47 +46 46 bop 0 123 a Fm(4.5.12)99 b(Highlight)0 204 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 +204 a 0 204 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 204 a 148 x Fq(The)26 b(option)i Fp(highlight)21 +b Fq(is)26 b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f +(white)g(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g +(is)0 465 y Fp(SANE)p 225 465 28 4 v 31 w(TYPE)p 476 +465 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p +1461 465 V 31 w(UNIT)p 1712 465 V 31 w(PERCENT)p Fq(.)d(The)j(v)n(alue) +h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 b(if)h(possi-)0 +577 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h(the)g(minimum)f +(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e(maximum)h(possible)h +(image)f(data)g(v)n(alue)0 690 y(\(white/full)c(intensity\).)31 +b(The)23 b(back)o(end)j(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f +(follo)n(wing)i(w)o(ay:)0 803 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h +(sensiti)n(vity)i(range)e(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h +(ha)n(v)o(e)g(maximum)f(v)n(alue)h(\(white)f(/)g(full)0 +916 y(intensity\).)31 b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a) +f(medium)h(intensity)i(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j +(produces)f(the)f(max-)0 1029 y(imum)f(possible)j(image)e(data)g(v)n +(alue)h(\(white)f(/)f(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e +(100.0)i(means)f(that)g(the)g(sensiti)n(vity)j(range)d(is)0 +1142 y(not)d(reduced,)j(only)d(the)h(maximum)f(intensity)i(produces)h +(an)d(image)g(data)h(with)f(maximum)g(possible)i(v)n(alue)f(\(white)f +(/)g(full)0 1255 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h +(able)g(to)f(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has) +f(to)f(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 1368 +y(\(e.g.)35 b(30.)14 b(.)g(.)g(70)25 b(percent\).)38 +b(In)25 b(color)i(mode)f(there)h(can)f(be)g(options)h +Fp(highlight-red)p Fq(,)20 b Fp(highlight-gree)o(n)f +Fq(and)0 1481 y Fp(highlight-blue)p Fq(,)g(in)26 b(this)h(case)g +Fp(highlight)21 b Fq(has)26 b(to)g(be)g(disabled.)39 +b(It)26 b(is)g(not)g(allo)n(wed)h(to)f(emulate)h(a)f(highlight)0 +1594 y(function)h(by)f(a)f(digital)i(gamma)d(table.)35 +b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h(de\002ne\))g +(this)g(option)g(when)g(the)f(scanner)0 1707 y(does)f(not)g(support)i +(an)d(analog)i(\(hardw)o(are\))h(highlight)g(function.)0 +1874 y(This)g(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1987 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2100 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 0 +2100 a 0 2100 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 0 2100 a 0 2100 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 0 2100 a 302 x Fm(4.5.13)99 +b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0 2483 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 +2483 a 0 2483 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 2483 a 148 x Fq(The)18 b(option)h Fp(lamp-on)14 +b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h(scanner)h(on.)27 +b(The)17 b(type)i(of)f(this)h(option)g(is)f Fp(SANE)p +3431 2631 28 4 v 31 w(TYPE)p 3682 2631 V 31 w(BUTTON)p +Fq(.)0 2744 y(The)23 b(unit)h(is)g Fp(SANE)p 637 2744 +V 31 w(UNIT)p 888 2744 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e +(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(on.)0 +2911 y(The)18 b(option)h Fp(lamp-off)14 b Fq(is)k(used)h(to)f(turn)g +(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.)27 b(The)18 +b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p 3499 2911 +V 31 w(TYPE)p 3750 2911 V 30 w(BUTTON)p Fq(.)0 3024 y(The)23 +b(unit)h(is)g Fp(SANE)p 637 3024 V 31 w(UNIT)p 888 3024 +V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g(the)g +(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0 +3191 y(These)33 b(options)h(are)f(not)g(mandatory)-6 +b(,)37 b(b)n(ut)c(if)f(a)g(back)o(end)j(does)e(support)i(them,)f(it)e +(must)h(implement)h(it)e(in)g(a)g(manner)0 3304 y(consistent)26 +b(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0 3417 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 +3417 a 0 3417 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 3417 a 0 3417 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 3417 a 302 x Fm(4.5.14)99 +b(Scanner)26 b(b)n(uttons)0 3782 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 3782 a 0 3782 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + +0 3782 a 166 x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which) +e(state)h(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5 +b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 4061 +y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g +(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to) +d(the)g(same)0 4174 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f +(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h +(w)o(ould)f(be)g(implemented:)0 4287 y(Fi)n(v)o(e)25 +b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e +(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o +(ant)f(to)0 4400 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i +(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n +(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0 +4512 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g +(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n +(utton\).)47 b(F)o(or)0 4625 y(three)24 b(people)i(the)d(image)h(is)g +(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g +(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0 +4906 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e +(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n +(wing)i(options:)0 5019 y Fp(scanner-buttons)o(-l)o(oc)o(k)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 5019 28 4 v 31 +w(TYPE)p 1951 5019 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25 +b(=)e Fp(SANE)p 2813 5019 V 31 w(FALSE)0 5132 y(scanner-buttons)o(-s)o +(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809 +5132 V 31 w(TYPE)p 2060 5132 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 5151 a 1905 +5381 a Fq(46)p eop +%%Page: 47 48 +47 47 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 32 a 91 x Fp(scanner-buttons)o(-s)o +(ta)o(tu)o(s-u)o(pd)o(at)o(e)17 b Fq(is)23 b(of)g(type)i +Fp(SANE)p 2191 123 28 4 v 31 w(TYPE)p 2442 123 V 30 w(BUTTON)0 +236 y Fq(When)18 b(setting)i(these)f(options)h(the)f(back)o(end)h(does) +f(not)f(set)g Fp(SANE)p 2091 236 V 31 w(INFO)p 2342 236 +V 31 w(RELOAD)p 2703 236 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p +3445 236 V 31 w(INFO)p 3696 236 V 31 w(RELOAD)p 4057 +236 V 30 w(PARAMS)0 349 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 +520 y(A)33 b(Frontend)j(has)f(to)f(disable)i(the)f(usage)g(of)g(the)f +(scanner)n(-b)n(uttons)40 b(by)34 b(def)o(ault.)63 b(This)35 +b(is)f(important)i(because)g(other)0 633 y(frontends)26 +b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g +(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25 +b(important)g(thing)0 746 y(is)f(that)h(some)f(scanners)i(do)f(not)f +(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g +(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0 +859 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g +(scanner\).)136 1130 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o +(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f +(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31 +b(this)h(it)227 1243 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o +(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 1243 V 31 w(TRUE)p +Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227 +1356 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b +Fp(SANE)p 1667 1356 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h +(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-)227 +1469 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28 +b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e) +n(v)o(ery)g(user)g(has)g(read)h(and)227 1582 y(write)24 +b(access)h(to.)336 1794 y Fr(\226)46 b Fq(If)20 b(the)h(lock\002le)g +(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j(creates)f(the)e +(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d(\(PID\))427 +1907 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27 +b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f +(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 2020 y +Fq(is)k(set)f(to)h Fp(SANE)p 953 2020 V 31 w(TRUE)336 +2166 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h +(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g +(back)o(end)i(has)e(to)g(check)g(if)427 2279 y(the)f(process)i(with)d +(the)h(PID)f(stored)i(in)e(the)h(lock\002le)h(still)f(is)g(running.)46 +b(If)28 b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427 +2392 y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j +Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g +Fp(SANE)p 3340 2392 V 31 w(FALSE)p Fq(.)c(If)k(not)427 +2505 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of) +h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g +(access)427 2618 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e +(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23 +b(set)h(to)g Fp(SANE)p 3194 2618 V 30 w(TRUE)136 2831 +y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i +(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37 +b(If)28 b(it)g(is)h Fp(SANE)p 3472 2831 V 31 w(TRUE)c +Fq(then)227 2943 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h +(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 2943 +V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136 +3131 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n +(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f +(once)g(per)g(second)g(\(while)g(not)227 3244 y(scanning\):)336 +3432 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h +Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o +Fq(.)35 b(The)27 b(back)o(end)j(checks)427 3545 y(if)37 +b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i +(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427 +3657 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h +(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option) +427 3770 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20 +b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f +(means)g(the)h(b)n(utton)h(is)427 3883 y(not)23 b(pressed,)h(a)d(v)n +(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30 +b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427 +3996 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f +(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42 +b(The)27 b(back)o(end)427 4109 y(has)c(to)f(implement)h(a)f(timeout)h +(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h +(within)f(a)e(prede\002ned)j(time)427 4222 y(\(e.g.)50 +b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50 +b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427 +4335 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b +Fp(SANE)p 1862 4335 V 31 w(FALSE)d Fq(and)j(does)h(set)f +Fp(SANE)p 2881 4335 V 31 w(INFO)p 3132 4335 V 31 w(RELOAD)p +3493 4335 V 30 w(OPTIONS)427 4448 y Fq(to)20 b(inform)g(the)g(frontend) +i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n +(-b)n(utton)k(functions.)30 b(If)20 b(access)427 4561 +y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o +(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 4707 y Fr(\226)46 +b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i +Fp(scanner-buttons-)o(st)o(at)o(us)136 4894 y Fk(\017)46 +b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g +(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g +Fp(scanner-buttons-)o(lo)o(ck)227 5007 y Fq(to)34 b Fp(SANE)p +556 5007 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g +(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f +(same.)0 5009 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 5009 a 0 5009 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 5009 a 0 5009 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 +5009 a 1905 5381 a Fq(47)p eop +%%Page: 48 49 +48 48 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 32 a 227 123 a Fq(If)39 +b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es)g(the)h(lock\002le)g +(and)f(sets)g(the)h(v)n(alue)f(of)g Fp(scanner-buttons)o(-lo)o(ck)31 +b Fq(to)227 236 y Fp(SANE)p 452 236 28 4 v 31 w(FALSE)p +Fq(.)227 386 y Fp(sane)p 452 386 V 31 w(close\(\))14 +b Fq(should)20 b(do)e(the)h(same)f(as)g(setting)h(option)h +Fp(scanner-buttons)o(-l)o(oc)o(k)11 b Fq(to)18 b Fp(SANE)p +3601 386 V 31 w(FALSE)p Fq(.)0 505 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 505 a 0 505 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + +0 505 a 0 505 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 505 a 1905 5381 a Fq(48)p eop +%%Page: 49 50 +49 49 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51 +b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g +(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h +(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895 +y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e +(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f +(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h +(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e +(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h +(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367 +y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e +(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5 +b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480 +y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g +(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i +(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h +(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g +(access)g(to)g(the)g(system.)227 2743 y(Controlling)34 +b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e) +n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227 +2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges) +i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i +(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36 +b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d +(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47 +b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n +(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227 +3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i +(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g +(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that) +g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f +(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g +(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i +(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24 +b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n +(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22 +b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l +(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f +(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834 +y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h +(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h +(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19 +b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e +(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws) +227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices) +h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44 +b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24 +b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g +(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i +(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g +(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740 +y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i +(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114 +4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client) +h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o +(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(49)p +eop +%%Page: 50 51 +50 50 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f +(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e +(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i +(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45 +b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h +(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227 +536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k +(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o +(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0 +896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h +(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h +(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0 +1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0 +1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7 +b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g +(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0 +2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44 +b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28 +b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h +(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n +(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44 +b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30 +b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c +(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).) +0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29 +b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10 +b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227 +2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g +(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h +(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43 +b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g +Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37 +b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227 +3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e +Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6 +b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43 +b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40 +b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f +(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g +(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d +(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227 +3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o +(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues) +g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f +(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g +(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47 +b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0 +4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378 +y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C) +e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e +(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737 +y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w) +o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g +(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28 +b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g +(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f +(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h +(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(50)p eop +%%Page: 51 52 +51 51 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded) +j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g +(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227 +236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29 +b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f +(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0 +526 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by) +e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g +(in)e(which)i(the)o(y)227 639 y(appear)25 b(in)f(the)g(corresponding)j +(C)c(type)h(declaration.)0 816 y Fa(union)p Fr(:)45 b +Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e +(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i +(members)e(is)227 929 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30 +b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j +(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1042 y(of)g(the)g +(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1251 y(Note)25 +b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e +(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f +(constructed)0 1364 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g +(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of) +d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1524 +y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h +(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h +(protocol.)0 1858 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h +(Requests)0 2112 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g +(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\)) +f(protocol.)34 b(This)24 b(means)h(that)0 2225 y(all)h(acti)n(vity)h +(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back) +o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0 +2338 y(by)d(the)f(client.)0 2628 y Fm(5.2.1)99 b Fc(SANE)p +545 2628 30 4 v 35 w(NET)p 760 2628 V 35 w(INIT)0 2849 +y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e +(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20 +b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0 +2962 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g +(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g +(belo)n(w:)744 3165 y Fr(r)n(equest:)941 b(r)n(eply:)744 +3278 y Fp(SANE)p 969 3278 28 4 v 31 w(Word)52 b(version)p +1657 3278 V 30 w(code)98 b(SANE)p 2225 3278 V 31 w(Word)52 +b(status)744 3391 y(SANE)p 969 3391 V 31 w(String)g(user)p +1602 3391 V 30 w(name)153 b(SANE)p 2225 3391 V 31 w(Word)52 +b(version)p 2913 3391 V 30 w(code)0 3591 y Fq(The)32 +b Fp(version)p 563 3591 V 30 w(code)e Fq(ar)n(gument)35 +b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36 +b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3704 +y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39 +b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i +(code)f(is)f(used)g(to)g(hold)0 3817 y(the)c(netw)o(ork)h(protocol)h(v) +o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h +(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0 +3930 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f +(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e +(the)g(netw)o(ork)0 4043 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o +(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g +(compatible\).)33 b(The)24 b Fp(user)p 3656 4043 V 31 +w(name)0 4156 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h +(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59 +b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4269 y(cannot)26 +b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e +Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h +(be)f(placed)h(in)e(the)0 4382 y(authenticity)30 b(of)c(this)i(user)n +(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o +(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5 +b(.)39 b(E.g.,)25 b(it)0 4495 y(could)g(be)e(used)i(as)e(the)h(def)o +(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0 +4654 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 4654 V 31 w(STA-)0 4767 y(TUS)p 170 4767 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g +(unde\002ned)i(v)n(alues.)2384 4734 y Fg(1)2457 4767 +y Fq(The)d Fp(version)p 3013 4767 V 30 w(code)e Fq(ar)n(gument)28 +b(returns)0 4880 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw) +o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g +(pre)n(vious)i(paragraph)h(on)0 4993 y(the)d(meaning)h(of)e(the)h(b)n +(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p +0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19 +b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak) +g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5 +b(.)1905 5381 y Fq(51)p eop +%%Page: 52 53 +52 52 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0 +356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f +(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055 +596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196 +b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822 +y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822 +V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h +(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6 +b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344 +V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has) +g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p +2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0 +1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f +Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765 +y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p +760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open) +i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760 +2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p +985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V +30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071 +2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577 +y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y +Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k +(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0 +2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099 +V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has) +e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d +Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23 +b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31 +b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j +(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p +Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g +(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0 +3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g +(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0 +3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p +760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077 +4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p +1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252 +4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d +Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h +(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905 +5381 y(52)p eop +%%Page: 53 54 +53 53 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p +1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h +(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706 +705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97 +b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28 +w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h +(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29 +b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h +(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50 +b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n +(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A) +o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445 +1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 +1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 +4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V +34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i +(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i +(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694 +y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p +1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187 +2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040 +2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31 +w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294 +b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033 +V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p +1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 +b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 +3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 +b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371 +V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e +Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f +(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23 +b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the) +g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34 +b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40 +b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75 +b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c +Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945 +y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080 +3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p +1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h +Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p +Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V +31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058 +V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28 +b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g +(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f +(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n +(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c +Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31 +b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h +Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32 +b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v) +o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37 +b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g +(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f +(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o +(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622 +y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24 +b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g +(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call) +0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p +Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned) +h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f +(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26 +b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36 +b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f +Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p +Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h +(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(53)p +eop +%%Page: 54 55 +54 54 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on) +d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i +(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0 +236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f +(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946 +236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V +31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h +(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28 +b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462 +y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply) +i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i +(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28 +b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that) +f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0 +687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545 +995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V +35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886 +1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p +1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061 +1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061 +1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b +Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e +(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0 +2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40 +b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g +(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j +Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g +(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750 +30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).) +940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y +Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p +2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p +2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116 +3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891 +3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913 +y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g +(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h +(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23 +b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19 +b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e +(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33 +b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g +(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section) +g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d +(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31 +b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0 +4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073 +4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28 +b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n +(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27 +b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data) +g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0 +4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g +(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5 +b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g +(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50 +b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.) +0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence) +j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted) +j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j +(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f +(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905 +5381 y(54)p eop +%%Page: 55 56 +55 55 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25 +b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g +(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31 +w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j +(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f +(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0 +349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g +(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i +(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18 +b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g +(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35 +b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36 +b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33 +b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742 +y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g +(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j +(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i +(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o +(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0 +968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31 +b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6 +b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v) +o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i +(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0 +1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j +(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i +(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h +(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609 +30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f +(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635 +b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30 +w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53 +b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f +(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0 +2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p +810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h +(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854 +b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31 +w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53 +b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967 +3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006 +y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g +(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31 +b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string) +h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24 +b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j +(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17 +b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j +(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0 +4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512 +y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o +(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n +(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g +(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo) +n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0 +4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g +(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i +(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22 +b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e +(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0 +5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905 +5381 y(55)p eop +%%Page: 56 57 +56 56 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b +Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20 +b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30 +b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f +(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j +(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0 +349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26 +b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f +(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f +(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31 +w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p +Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v +35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g +(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5 +b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i +(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h +(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o +(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y +Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e +Fq(call)j(will)f(be)h(closed.)1905 5381 y(56)p eop +%%Page: 57 58 +57 57 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51 +b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28 +b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.) +35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0 +1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g +(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h +(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0 +2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h +(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18 +b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e +(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c +(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0 +2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g +(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j +(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o +(an)o(e/)1905 5381 y Fq(57)p eop +%%Page: 58 59 +58 58 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6 b(,)24 +b(36)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6 b(,)24 +b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0 1713 +y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021 y(enumeration)i +(types,)f(35)0 2217 y(image)f(data)g(format,)g(8)0 2413 +y(mailing)h(list,)e(42)0 2609 y(netw)o(ork)i(authorization,)i(40)0 +2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031 +y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031 +V 36 w(Array)-6 b(,)23 b(38)0 3227 y(passw)o(ord,)i(22)0 +3340 y(pointer)l(,)g(35)0 3453 y(pre)n(vie)n(w)f(mode,)f(32)0 +3649 y(resolution)j(option,)f(32)0 3845 y(SANE)p 244 +3845 V 31 w(Action,)f(24)0 3957 y(SANE)p 244 3957 V 31 +w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12 +b(ALUE,)20 b(24)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p +616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21 +b(24)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616 +4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(24)0 +4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296 +V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0 +4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(35)0 4635 +y(sane)p 165 4635 V 34 w(cancel,)h(28)0 4748 y(SANE)p +244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19 +b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V +32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p +244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19 +b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V +32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095 +1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h +(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125 +V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095 +1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p +2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p +2339 1351 V 31 w(Char)l(,)k(14,)f(35)2095 1463 y(sane)p +2260 1463 V 35 w(close,)h(23)2095 1576 y(SANE)p 2339 +1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095 +1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689 +V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31 +w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V +31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915 +V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095 +2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028 +V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095 +2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V +35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p +2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339 +2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480 +V 35 w(e)o(xit,)f(22)2095 2593 y(SANE)p 2339 2593 V 31 +w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V +31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095 +2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32 +w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095 +3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(26)2095 3157 +y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(26) +2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270 +V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(26)2095 3383 y(SANE)p +2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(26)2095 +3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31 +w(RED,)f(10,)h(26)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p +2685 3609 V 31 w(RGB,)f(9,)h(26)2095 3722 y(sane)p 2260 +3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095 +3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p +2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p +2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(26)2095 +4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p +2643 4060 V 35 w(fd,)d(29)2095 4173 y(SANE)p 2339 4173 +V 31 w(Handle,)h(15,)g(35)2095 4286 y(SANE)p 2339 4286 +V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(25)2095 +4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32 +w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(25)2095 4512 +y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32 w(RELO)m(AD)p +2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(25)2095 4625 y(sane)p +2260 4625 V 35 w(init,)j(19)2095 4738 y(SANE)p 2339 4738 +V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851 V 31 w(NET)p +2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(40)2095 4964 y(SANE)p +2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(40)2095 +5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(37)1905 +5381 y(58)p eop +%%Page: 59 60 +59 59 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(NET)p +453 123 V 32 w(CONTR)l(OL)p 913 123 V 30 w(OPTION,)21 +b(38)0 236 y(SANE)p 244 236 V 31 w(NET)p 453 236 V 32 +w(EXIT)-7 b(,)21 b(41)0 349 y(SANE)p 244 349 V 31 w(NET)p +453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(37)0 462 +y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p 663 +462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(38)0 +574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p +663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(39)0 687 y(SANE)p +244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(36)0 +800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(37)0 +913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8 +b(AR)j(T)e(,)19 b(39)0 1026 y(sane)p 165 1026 V 34 w(open,)24 +b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139 +V 34 w(Descriptor)l(,)i(16)0 1252 y(SANE)p 244 1252 V +31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21 +b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365 +V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0 +1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(26)0 +1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p +165 1704 V 34 w(read,)g(27)0 1817 y(sane)p 165 1817 V +34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0 +1929 y(sane)p 165 1929 V 34 w(start,)g(27)0 2042 y(SANE)p +244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155 +V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p +975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268 +V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19 +b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p +603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21 +b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p +603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21 +b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p +603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720 +V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15)0 +2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833 +V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31 +w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32 +w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8 +b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171 +y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V +30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p +244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p +765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397 +V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5 +b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24 +b(14,)f(35)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496 +3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34 +w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21 +b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962 +V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p +504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244 +4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301 +y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10 +b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504 +4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526 +V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p +244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V +31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p +493 4865 V 32 w(BIT)-7 b(,)22 b(18)0 4978 y(SANE)p 244 +4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(18)0 5091 y(SANE)p +244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(18)2095 +123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(18)2095 +236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(18)2095 +349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7 +b(,)20 b(18)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p +2588 462 V 32 w(PIXEL,)h(18)2095 574 y(SANE)p 2339 574 +V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(17)2095 +687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31 +w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p +2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913 +V 31 w(W)-7 b(ord,)24 b(12,)f(35)2095 1026 y(scan)i(area)f(options,)h +(32)2095 1139 y(scan)g(resolution,)h(32)2095 1252 y(structure,)g(36) +2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095 +1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(36)2095 +1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095 +2374 y(well-kno)n(wn)h(options,)g(31)1905 5381 y(59)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/sane2/0.05/sane2-0.05.tex.gz b/sane2/0.05/sane2-0.05.tex.gz new file mode 100644 index 00000000..9fad3a31 --- /dev/null +++ b/sane2/0.05/sane2-0.05.tex.gz @@ -0,0 +1,2664 @@ +\documentclass[11pt,DVIps]{report} + +\usepackage{times,epsfig,changebar,html} + +\setlength{\parindent}{0pt} +\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex} +\setlength{\textwidth}{6.5in} +\setlength{\textheight}{8.5in} +\setlength{\marginparwidth}{0pt} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\marginparsep}{0pt} +\addtolength{\topmargin}{-0.75in} + +\title{\huge SANE Standard Version 2.0 proposal 0.05 - rauch/beck} +\author{} +\date{May 14, 2002} + +\makeindex + +\begin{document} + +\newcommand{\filename}[1]{{\tt #1}} +\newcommand{\code}[1]{{\tt #1}} +\newcommand{\var}[1]{{\it #1}} +\newcommand{\defn}[1]{#1\index{#1}} + +\begin{latexonly} + \setcounter{changebargrey}{0} % black change bars +\end{latexonly} + +\maketitle +\tableofcontents +\listoffigures +\listoftables + + +\chapter{Preface} + +The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +\ref{chap:contact}. + +The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + + +\section{About This Document} + +This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +The remainder of this document is organized as follows. +Chapter~\ref{chap:intro} provides introductional material. +Chapter~\ref{chap:environ} presents the environment SANE is designed +for. Chapter~\ref{chap:api} details the SANE Application Programmer +Interface. Chapter~\ref{chap:net} specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter~\ref{chap:contact} gives information on how +to join the SANE development process. + +\subsection{Typographic Conventions} + +Changes since the last revision of this document are highlighted +like this: + +% \begin{changebar} +% Paragraphs that changed since the last revision of the documention +% are marked like this paragraph. +% \end{changebar} + +\chapter{Introduction}\label{chap:intro} + +SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +\section{Terminology} + +An application that uses the SANE interface is called a SANE {\em + frontend}. A driver that implements the SANE interface is called a +SANE {\em backend}. A {\em meta backend\/} provides some means to +manage one or more other backends. + + +\chapter{The SANE Environment}\label{chap:environ} + +SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE {\em option\/}. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +\code{brightness} whose value is an integer in the range from 0 to +255. + +With self-describing options, a backend need not be concerned with +{\em presentation\/} issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the {\em meaning\/} of each option. It simply provides +means to present and alter the options defined by the backend. + + +\section{Attaching to a SANE backend} + +The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +\begin{itemize} + +\item {\bf Static linking:} A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called \code{be} + would normally export a function called \code{sane\_read()}. If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend \code{be} include a + header file that has lines of the form: + \begin{quote} +\begin{verbatim} +#define sane_read be_sane_read +\end{verbatim} + \end{quote} + With definitions of this kind, backend \code{be} will export + function name \code{be\_sane\_read()}. Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +\item {\bf Dynamic linking:} A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix \code{sane\_}), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + + More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends {\em on demand}. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +\item {\bf Network connection:} Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +\end{itemize} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth} + \caption{Example SANE Hiearchy} + \label{fig:hierarchy} + \end{center} +\end{figure} + +The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine +A uses a dynamic-linking based meta backend called \code{dll} to +access the backends called \code{pnm}, \code{mustek}, and \code{net}. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called \code{saned}. The \code{saned} in +turn has access to the \code{hp} and \code{autolum} backends through +another instance of the \code{dll} backend. The \code{autolum} meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called \code{qcam}. + +Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + + +\section{Image Data Format}\label{sec:imageformat}\index{image data format} + +Arguably the most important aspect of an image acquisition system is +how images are represented. The SANE approach is to define a simple +yet powerful representation that is sufficient for vast majority of +applications and devices. While the representation is simple, the +interface has been defined carefully to allow extending it in the +future without breaking backwards compatibility. Thus, it will be +possible to accommodate future applications or devices that were not +anticipated at the time this standard was created. + +A SANE image is a rectangular area. The rectangular area is +subdivided into a number of rows and columns. At the intersection of +each row and column is a (preferable quadratic) pixel. A pixel consists +of one or more sample values. Each sample value represents one channel +(e.g., the red channel). Each sample value has a certain bit depth. +The bit depth is fixed for the entire image and can be as small as one +bit. Valid bit depths are 1, 8, or 16 bits per sample. If a device's +natural bit depth is something else, it is up to the driver to scale +the sample values appropriately (e.g., a 4 bit sample could be scaled +by a factor of four to represent a sample value of depth 8). + +\subsection{Image Transmission} + +The SANE API transmits an image as a sequence of frames. Each frame +covers the same rectangular area as the entire image, but may contain +only a subset of the channels in the final image. For example, a +red/green/blue image could either be transmitted as a single frame +that contains the sample values for all three channels or it could be +transmitted as a sequence of three frames: the first frame containing +the red channel, the second the green channel, and the third the blue +channel. + +\begin{changebar} +There are two different types of transmission: pixel oriented data or +arbitary data. +\end{changebar} + +Conceptually, each pixel oriented frame is transmitted +a byte at a time. Each byte may contain 8 sample values (for an image +bit depth of 1), one full sample value (for an image bit depth of 8), +or a partial sample value (for an image bit depth of 16 or bigger). +In the latter case, the bytes of each sample value are transmitted in +the machine's native byte order. +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +\end{quote} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/xfer.eps,width=0.5\textwidth} + \caption{Transfer order of image data bytes} + \label{fig:xfer} + \end{center} +\end{figure} + +The order in which the sample values in a frame are transmitted is +illustrated in Figure~\ref{fig:xfer}. As can be seen, the values are +transmitted row by row and each row is transmitted from left-most to +right-most column. The left-to-right, top-to-bottom transmission +order applies when the image is viewed in its normal orientation (as +it would be displayed on a screen, for example). + +If a frame contains multiple channels, then the channels are +transmitted in an interleaved fashion. Figure~\ref{fig:pixels} +illustrates this for the case where a frame contains a complete +red/green/blue image with a bit-depth of 8. For a bit depth of 1, +each byte contains 8 sample values of a {\em single\/} channel. In +other words, a bit depth 1 frame is transmitted in a byte interleaved +fashion. + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/image-data.eps,width=0.8\textwidth} + \caption{Bit and byte order of image data} + \label{fig:pixels} + \end{center} +\end{figure} + +When transmitting an image frame by frame, the frontend needs to know +what part of the image a frame represents (and how many frames it +should expect). For that purpose, the SANE API tags every frame with +a type and a format descriptor. + +It also is possible to transmit arbitary (not necessaryly pixel oriented) +data. This e.g. allows transmission of compressed images like jpeg, tiff, etc. + +This version of the SANE standard supports the following frame types: +\begin{quote} +\begin{description} +\begin{changebar} + +\item[\code{\defn{SANE\_FRAME\_RAW}}:] The frame contains one + or more channels of data in a channel-interleaved format, + that represents sample values from a property of the + individual pixels that is subject to further description + in the \code{formatdesc} member of the \code{SANE\_Parameters} + structured type. The complete image may consist of several + channels, the number of channels is defined by member + \code{channels\_per\_image} of \code{SANE\_Parameters}. + The image may be transmitted in an arbitary number of + frames which can be determined by watching the \code{last\_frame} + flag in said type (or by counting the channels). + Note: This frame type replaces all frame types of the SANE standard version 1. + +\item[\code{\defn{SANE\_FRAME\_MIME}}:] The frame contains + arbitrary data of the MIME (see RFC 1521/1522) type that + is given in the \code{formatdesc} member of the + \code{SANE\_Parameters} structured type. + As such, it is assumed to be incomprehensible to the + frontend, except for selected types the frontend is + specifically capable of handling internally. + The frontend is free to ignore those frames, or employ + any appropriate means to otherwise handle this data + (like saving them to disk or spawning an external viewer). + +\item + The following frame types are part of the SANE standard version 1. + Backends that claim to be conform to the SANE standard version 2 are + not allowed to use these frame types. + A frontend can decide to support version 1 backends and version 2 + backends. It is desirable to create a meta backend with + a frontend part conform to the SANE standard version 1 and + a backend part conform to the SANE standard version 2 (so all + version 2 frontends can connect to version 1 backends). + A version 1 backend does use the following frame types: + +\begin{description} + +\item[\code{\defn{SANE\_FRAME\_GRAY}}:] This is a frame type from + SANE standard version 1. Backends that claim to be conform to + the SANE standard version 2 are not allowed to use this frame type. + The frame contains a single channel of data that represents sample + values from a spectral band that covers the human visual range. + The image consists of this frame only. + +\item[\code{\defn{SANE\_FRAME\_RGB}}:] This is a frame type from + SANE standard version 1. Backends that claim to be conform to + the SANE standard version 2 are not allowed to use this frame type. + The frame contains three channels of data that represent sample + values from the red, green, and blue spectral bands. The sample + values are interleaved in the order red, green, and blue. + The image consists of this frame only. + +\item[\code{\defn{SANE\_FRAME\_RED}}:] This is a frame type from + SANE standard version 1. Backends that claim to be conform to + the SANE standard version 2 are not allowed to use this frame type. + The frame contains one channel of data that represents sample + values from the red spectral band. The complete image consists + of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN}, + and \code{SANE\_FRAME\_BLUE}. The order in which the frames are + transmitted chosen by the backend. + +\item[\code{\defn{SANE\_FRAME\_GREEN}}:] This is a frame type from + SANE standard version 1. Backends that claim to be conform to + the SANE standard version 2 should not use this frame type. + The frame contains one channel of data that represents sample + values from the green spectral band. The complete image consists + of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN}, + and \code{SANE\_FRAME\_BLUE}. The order in which the frames are + transmitted chosen by the backend. + +\item[\code{\defn{SANE\_FRAME\_BLUE}}:] This is a frame type from + SANE standard version 1. Backends that claim to be conform to + the SANE standard version 2 should not use this frame type. + The frame contains one channel of data that represents sample + values from the blue spectral band. The complete image consists + of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN}, + and \code{SANE\_FRAME\_BLUE}. The order in which the frames are + transmitted chosen by the backend. + +\end{description} +\end{changebar} + + +\end{description} +\end{quote} + +When the bit depth is 1 there are only two sample values possible, +1 represents minimum intensity (black) and 0 represents maximum +intensity (white). For all other bit depths a sample value of 0 +represents minimum intensity and larger values represent increasing +intensity. + + +\chapter{The SANE Application Programmer Interface (API)}\label{chap:api} + +\begin{changebar} +This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called \filename{sane/sane-2.h}. This file should +normally be included via a C pre-processor directive of the form: +\begin{verbatim} + #include +\end{verbatim} +\end{changebar} + + +\section{Version Control} + +The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +The SANE API provides the following five macros to manage version +numbers. +\begin{quote} + \begin{description} + \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the + number of the SANE standard that the interface implements. + + \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:] + \label{sec:saneversioncode} + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (\var{maj}), the minor version number \var{min}, + and the build revision of a backend (\var{bld}). The major and + minor version numbers must be in the range 0\ldots255 and the + build revision must be in the range 0\ldots65535. + + Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + + Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + + \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the + major version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the + minor version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the + build revision component of the version code passed in argument + \var{vc}. + \end{description} +\end{quote} + + +\section{Data Types} + +\subsection{Base Types} + +The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +\begin{quote} + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\ + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};} +\end{quote} +\verb|SANE_Byte| must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. \verb|SANE_Word| must be +capable of holding any of the following: +\begin{itemize} + \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE| + \item signed integers in the range $-2^{31}\ldots2^{31}-1$ + \item fixed point values in the range $-32768\ldots32767.9999$ with + a resolution of $1/65536$ + \item 32 bits (for bit sets) +\end{itemize} +Note that the SANE standard does not define what C type +\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some +platforms, the latter may map to \verb|long int| whereas on others it +may map to \verb|int|. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +\subsection{Boolean Type} + +\code{\defn{SANE\_Bool}} is used for variables that can take one of +the two truth values \code{\defn{SANE\_FALSE}} and +\code{\defn{SANE\_TRUE}}. The former value is defined to be 0, +whereas the latter is 1.\footnote{This is different from ANSI C where + any non-zero integer value represents logical TRUE.} The C +declarations for this type are given below. +\begin{quote} +\begin{verbatim} +#define SANE_FALSE 0 +#define SANE_TRUE 1 +typedef SANE_Word SANE_Bool; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Bool| whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +\subsection{Integer Type} + +\code{\defn{SANE\_Int}} is used for variables that can take integer +values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is +given below. +\begin{quote} +\begin{verbatim} +typedef SANE_Word SANE_Int; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Int| whenever a given variable or formal argument has a +fixed interpretation as an integer object. + + +\subsection{Fixed-point Type} + +\code{\defn{SANE\_Fixed}} is used for variables that can take fixed +point values in the range $-32768$ to $32767.9999$ with a resolution +of $1/65535$. The C declarations relating to this type are given +below. +\begin{quote} +\begin{verbatim} +#define SANE_FIXED_SCALE_SHIFT 16 +typedef SANE_Word SANE_Fixed; +\end{verbatim} +\end{quote} +The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of $1/65536$. + +Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Fixed| whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE + fixed-point value that is smaller than the double value \var{d}. + No range checking is performed. If the value of \var{d} is out of + range, the result is undefined. + + \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest + double machine number that corresponds to fixed-point value + \var{w}. + + \end{description} +\end{quote} +SANE does {\em not\/} require that the following two expressions hold +true (even if the values of \var{w} and \var{d} are in range): +\begin{quote} +\begin{verbatim} +SANE_UNFIX(SANE_FIX(d)) == d +SANE_FIX(SANE_UNFIX(w)) == w +\end{verbatim} +\end{quote} +In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + + +\subsection{Text} + +\subsubsection{Character Type} + +Type \code{\defn{SANE\_Char}} represents a single text character or +symbol. At present, this type maps directly to the underlying C +\verb|char| type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +\verb|sizeof(SANE_Char)==sizeof(char)|. +\begin{quote} +\begin{verbatim} +typedef char SANE_Char; +\end{verbatim} +\end{quote} + +\subsubsection{String Type} + +Type \code{\defn{SANE\_String}} represents a text string as a sequence +of C \verb|char| values. The end of the sequence is indicated by a +\verb|'\0'| (\defn{NUL}) character. +\begin{quote} +\begin{verbatim} +typedef SANE_Char *SANE_String; +typedef const SANE_Char *SANE_String_Const; +\end{verbatim} +\end{quote} +The type \code{\defn{SANE\_String\_Const}} is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +\begin{quote} +\begin{verbatim} +const SANE_String str; +\end{verbatim} +\end{quote} +declares a string pointer that is constant (not a string pointer that +points to a constant value). + + +\subsection{Scanner Handle Type} + +Access to a scanner is provided through an opaque type called +\code{\defn{SANE\_Handle}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef void *SANE_Handle; +\end{verbatim} +\end{quote} +While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a \verb|SANE_Handle|. In +particular, SANE does not require that a value of this type is a legal +pointer value. + + +\subsection{Status Type} + +Most SANE operations return a value of type \code{\defn{SANE\_Status}} +to indicate whether the completion status of the operation. If an +operation completes successfully, \verb|SANE_STATUS_GOOD| is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table \ref{tab:status}. It is recommended to use function +\code{sane\_strstatus()} to convert status codes into a legible +string. + +\begin{table}[htbp] + \begin{center} + \begin{tabular}{|l|r|l|} + \hline + \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} & + \multicolumn{1}{c|}{\bf Description} \\ + \hline\hline +\code{\defn{SANE\_STATUS\_GOOD}} + & 0 & Operation completed succesfully. \\ +\code{\defn{SANE\_STATUS\_UNSUPPORTED}} + & 1 & Operation is not supported. \\ +\code{\defn{SANE\_STATUS\_CANCELLED}} + & 2 & Operation was cancelled. \\ +\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}} + & 3 & Device is busy---retry later. \\ +\code{\defn{SANE\_STATUS\_INVAL}} + & 4 & Data or argument is invalid. \\ +\code{\defn{SANE\_STATUS\_EOF}} + & 5 & No more data available (end-of-file). \\ +\code{\defn{SANE\_STATUS\_JAMMED}} + & 6 & Document feeder jammed. \\ +\code{\defn{SANE\_STATUS\_NO\_DOCS}} + & 7 & Document feeder out of documents. \\ +\code{\defn{SANE\_STATUS\_COVER\_OPEN}} + & 8 & Scanner cover is open. \\ +\code{\defn{SANE\_STATUS\_IO\_ERROR}} + & 9 & Error during device I/O. \\ +\code{\defn{SANE\_STATUS\_NO\_MEM}} + & 10 & Out of memory. \\ +\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}} + & 11 & Access to resource has been denied. \\ + \hline + \end{tabular} + \caption{Status Codes}\label{tab:status} + \end{center} +\end{table} + + +\subsection{Device Descriptor Type} +\begin{changebar} + +Each SANE device is represented by a structure of type +\code{\defn{SANE\_Device}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const vendor; + SANE_String_Const model; + SANE_String_Const type; + SANE_String_Const email_backend_author; + SANE_String_Const device_location; + SANE_String_Const comment; + SANE_String_Const reserved_string; + SANE_Int backend_version_code; + SANE_Int backend_capablity_flags; + SANE_Int reserved_int; + } +SANE_Device; +\end{verbatim} +\end{quote} +\end{changebar} +\index{device-name} +The structure provides the unique name of the scanner in member +\code{name}. It is this unique name that should be passed in a call +to \code{sane\_open()}. The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is {\em recommended\/} that backends keep +unique names below 32 characters in length. However, applications +{\em must\/} be able to cope with arbitrary length unique names. + +The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members \code{vendor}, \code{model}, and \code{type} are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +\begin{table}[htbp] + \begin{center} + \leavevmode + \hspace{\fill} + \begin{tabular}[t]{|ll|} + \hline + \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\ + \hline\hline + \code{AGFA} & \code{Microtek} \\ + \code{Abaton} & \code{Minolta} \\ + \code{Acer} & \code{Mustek} \\ + \code{Apple} & \code{NEC} \\ + \code{Artec} & \code{Nikon} \\ + \code{Avision} & \code{Plustek} \\ + \code{CANON} & \code{Polaroid} \\ + \code{Connectix} & \code{Ricoh} \\ + \code{Epson} & \code{Sharp} \\ + \code{Fujitsu} & \code{Siemens} \\ + \code{Hewlett-Packard} & \code{Tamarack} \\ + \code{IBM} & \code{UMAX} \\ + \code{Kodak} & \code{Noname} \\ + \code{Logitech} & \\ + \hline + \end{tabular} + \hspace{\fill} + \begin{tabular}[t]{|l|} + \hline + \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\ + \hline\hline + \code{film scanner} \\ + \code{flatbed scanner} \\ + \code{frame grabber} \\ + \code{handheld scanner} \\ + \code{multi-function peripheral} \\ + \code{sheetfed scanner} \\ + \code{still camera} \\ + \code{video camera} \\ + \code{virtual device} \\ + \hline + \end{tabular} + \hspace{\fill} + \caption{Predefined Device Information Strings} + \label{tab:devinfo} + \end{center} +\end{table} +Note that vendor string \code{Noname} can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +\begin{changebar} +The backend has to set up the string \code{email\_backend\_author} +with the email address of the backend author or a contact person. + +The backend should fill the string \code{device\_location} with a +text that describes where a user can find this device, the text +should be read from the backend config file. + +The string \code{comment} can be used to display any comment to the user, +the text should be read from the backend config file. + +The string \code{reserved\_string} is planed for future use, the backend +has to set this string to "". + +With member \code{backend\_version\_code} a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +The member \code{backend\_capability\_flags} contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +The member \code{reserved\_int} is planned for future use, the backend has +to set the value of the integer to 0. +\end{changebar} + +\subsection{Option Descriptor Type}\label{sec:odesc} + +Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +\code{\defn{SANE\_Option\_Descriptor}} type is given below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const title; + SANE_String_Const desc; + SANE_Value_Type type; + SANE_Unit unit; + SANE_Int size; + SANE_Int cap; + SANE_Constraint_Type constraint_type; + union + { + const SANE_String_Const *string_list; + const SANE_Word *word_list; + const SANE_Range *range; + } + constraint; + } +SANE_Option_Descriptor; +\end{verbatim} +\end{quote} + +\subsubsection{Option Name} + +Member \code{name} is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (\code{a}--\code{z}), +digits (\code{0}--\code{9}), or the dash character (\code{-}) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +\subsubsection{Option Title} + +Member \code{title} is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +\subsubsection{Option Description} + +Member \code{desc} is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +\subsubsection{Option Value Type} + +Member \code{type} specifies the type of the option value. The +possible values for type \code{\defn{SANE\_Value\_Type}} are described +in Table \ref{tab:valuetype}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|p{0.6\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type + \verb|SANE_Bool|. \\ + +\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type + \verb|SANE_Int|. \\ + +\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type + \verb|SANE_Fixed|. \\ + +\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type + \verb|SANE_String|. \\ + +\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper. \\ + +\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members \code{title} and +\code{type} are valid in the option descriptor. \\ + + \hline + \end{tabular} + \caption{Option Value Types (\code{SANE\_Value\_Type})} + \label{tab:valuetype} + \end{center} +\end{table} + +\subsubsection{Option Value Unit} + +Member \code{unit} specifies what the physical unit of the option +value is. The possible values for type \code{\defn{SANE\_U\-nit}} are +described in Table \ref{tab:units}. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\ +\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\ +\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\ +\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\ +\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\ +\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\ +\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\ + +\hline + \end{tabular} + \caption{Physical Units (\code{SANE\_Unit})} + \label{tab:units} + \end{center} +\end{table} + +\subsubsection{Option Value Size}\label{sec:valuesize} + +Member \code{size} specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +\begin{quote} + \begin{description} + \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating \code{NUL} character is considered to be part of the + string. Note that the terminating \code{NUL} character must + always be present in string option values. + \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size + must be a positive integer multiple of the size of a + \verb|SANE_Word|. The option value is a vector of length + \[ \code{size}/\code{sizeof(SANE\_Word)}. \] + \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to + \code{sizeof(SANE\_Word)}. + \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The + option size is ignored. + \end{description} +\end{quote} + +\subsubsection{Option Capabilities} + +Member \code{cap} describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table \ref{tab:capabilities}. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro + returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is currently active. + + \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This + macro returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is software settable. + \end{description} +\end{quote} + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.59\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option + value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\ + +\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both + simultaneously). \\ + +\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option + value can be detected by software. If + \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/} + be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability + may or may not be set. If this capability is set but neither + \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT} + are, then there is no way to control the option. That is, the + option provides read-out of the current value only. \\ + +\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option. \\ + +\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling \code{sane\_control\_option()} + with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\ + +\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value). \\ + +\code{\defn{SANE\_CAP\_ADVANCED}} & 64 & + If set, this capability indicates that the option should be + considered an ``advanced user option.'' A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). + \\ + +\hline + \end{tabular} + \caption{Option Capabilities} + \label{tab:capabilities} + \end{center} +\end{table} + +\subsubsection{Option Value Constraints} + +It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member \code{constraint\_type} indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member \code{constraint}. The possible values of type +\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the +\code{constraint} union is described in Table~\ref{tab:constraints}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained. + The option can take any of the values possible for the option's + type. \\ + + \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member \code{constraint.range} points to + a range of the type \code{\defn{SANE\_Range}}. This type is illustrated + below: + \begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Word min; + SANE_Word max; + SANE_Word quant; + } +SANE_Range; +\end{verbatim} + \end{quote} + All three members in this structure are interpreted according to the + option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). + Members \code{min} and \code{max} specify the minimum and maximum + values, respectively. If member \code{quant} is non-zero, it + specifies the quantization value. If $l$ is the minimum value, $u$ + the maximum value and $q$ the (non-zero) quantization of a range, + then the legal values are $v=k\cdot q+l$ for all non-negative + integer values of $k$ such that $v<=u$. \\ + +\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + \code{constraint.word\_list} points to a list of words that + enumerates the legal values. The first element in that list is an + integer (\verb|SANE_Int|) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\ + +\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated + list of strings that enumerate the legal values for the option + value. +\\\hline + \end{tabular} + \caption{Option Value Constraints} + \label{tab:constraints} + \end{center} +\end{table} + + +\subsection{Internationlization}\label{sec:i18n} +\begin{changebar} +All backend texts should preferable be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +\subsubsection{How is a text marked for translation} + +The keyword \code{SANE\_I18N} is used to mark a text for translation. +\code{SANE\_I18N} has to be defined as a dummy prototype: + + \begin{quote} +\begin{verbatim} +#ifndef SANE_I18N +# define SANE_I18N(text) text +#endif +\end{verbatim} + \end{quote} + +You should not mark prototypes or variables with \code{SANE\_I18N} +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and +variables (\verb|SANE_I18N(option[7].name)|). + +A correct marked text can look like this:\\ +\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\ +or\\ +\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\ +It also is allowed to mark texts in structs because the +prototype \code{SANE\_I18N} has no effect to the compiler. + +\subsubsection{Which texts shall be marked for translation?} +All option texts that are visible for the user should be marked for +translation. This is: +\begin{itemize} +\item +member \code{title} +\item +member \code{desc} +\item +member \code{string\_list} +\end{itemize} +of \code{SANE\_Option\_Descriptor}. + +It is not allowed to mark/translate memeber \code{name}. +Please also do not mark any error or debug messages that are +displayed by the backend. + +\subsubsection{File formats and translation functions} +The recommended file formats for translation tables are the \code{po} files +and \code{mo} or \code{gmo} files. +The po file contains the original text marked with the keyword \code{msgid} +and the translated text marked with the keyword \code{msgstr}. +A \code{po} file that contains all needed \code{msgid}s can be created +e.g. by the gnu gettext tool \verb|xgettext| with the option +\verb|-k SANE_I18N|. +The translator adds the translated texts to the \code{po} files. +The gettext tool \code{msgfmt} converts the \code{po} files to the +\code{mo} or \code{gmo} files.\\ + +Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function \code{gettext} +to translate the texts. This e.g. can look like this:\\ +\verb|snprintf(buf, sizeof(buf), gettext("english text"));| + +If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the \code{po} files to create its +own translation tables from it.\\ + +Note that it is strongly recommended to use the gettext tools. +\end{changebar} + + +\section{Operations} + +\subsection{\code{sane\_init}} + +This function must be called before any other SANE function can be +called. The behavior of a SANE backend is undefined if this function +is not called first. The version code of the backend is returned in +the value pointed to by \code{version\_code}. If that pointer is +\code{NULL}, no version code is returned. + Argument \code{authorize} is either a pointer to a function that is + invoked when the backend requires authentication for a specific + resource or \code{NULL} if the frontend does not support + authentication. +\begin{quote}\index{sane\_init} +\begin{verbatim} +SANE_Status sane_init (SANE_Int * version_code, + SANE_Authorization_Callback authorize); +\end{verbatim} +\end{quote} + +The authorization function may be called by a backend in response to +any of the following calls: +\begin{quote} + \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start} +\end{quote} +If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +The authentication function type has the following declaration: +\begin{quote}\index{SANE\_Authorization\_Callback} + \index{domain}\index{username}\index{password} +\begin{verbatim} +#define SANE_MAX_USERNAME_LEN 128 +#define SANE_MAX_PASSWORD_LEN 128 + +typedef void (*SANE_Authorization_Callback) + (SANE_String_Const resource, + SANE_Char username[SANE_MAX_USERNAME_LEN], + SANE_Char password[SANE_MAX_PASSWORD_LEN]); +\end{verbatim} +\end{quote} +Three arguments are passed to the authorization function: +\code{resource} is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The \code{username} +and \code{password} arguments are (pointers to) an array of +\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN} +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +{\em must\/} be ASCII-NUL terminated. + +\subsection{\code{sane\_exit}} + +This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to \code{sane\_clo\-se()}, but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than \code{sane\_init()} may be called (regardless +of the status value returned by \code{sane\_exit()}. Neglecting to +call this function may result in some resources not being released +properly. +\begin{quote}\index{sane\_exit} +\begin{verbatim} +void sane_exit (void); +\end{verbatim} +\end{quote} + + +\subsection{\code{sane\_get\_devices}} + +This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a \code{NULL} terminated array of pointers to \verb|SANE_Device| +structures in \code{*device\_list}. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to \code{sane\_exit()} is performed. This +function can be called repeatedly to detect when new devices become +available. If argument \code{local\_only} is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +\begin{quote}\index{sane\_get\_devices} +\begin{verbatim} +SANE_Status sane_get_devices (const SANE_Device *** device_list, + SANE_Bool local_only); +\end{verbatim} +\end{quote} + +This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an +insufficient amount of memory is available. + +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + SANE does not require that this function is called before a + \code{sane\_open()} call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. +\begin{changebar} + The same informtation about + a device has to be returned when \code{sane\_open} is called. +\end{changebar} +\end{quote} + + +\subsection{\code{sane\_open}} + +This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +\code{name}. If the call completes successfully, a handle for the +device is returned in \code{*h}. +\begin{changebar} +The description of the device +is returned in \code{**device\_description}. This is the +same description that is returned in the list by \code{sane\_get\_devices}. +The returned data \code{*h} and \code{*device\_description} is guaranteed +to remain unchanged and valid until a call to \code{sane\_close()} +is performed. +\end{changebar} +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +\begin{quote}\index{sane\_open} +\begin{verbatim} +SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h, const SANE_Device ** device_description); +\end{verbatim} +\end{quote} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently + busy (in use by somebody else). +\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_close}} + +This function terminates the association between the device handle +passed in argument \code{h} and the device it represents. If the +device is presently active, a call to \code{sane\_cancel()} is +performed first. After this function returns, handle \code{h} must +not be used anymore. + +\begin{quote}\index{sane\_close} +\begin{verbatim} +void sane_close (SANE_Handle h); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_get\_option\_descriptor}} + +This function is used to access option descriptors. The function +returns the option descriptor for option number \code{n} of the device +represented by handle \code{h}. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle \code{h} (the count +includes option 0). If $n$ is not a valid option index, the function +returns \code{NULL}. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +\begin{quote}\index{sane\_get\_option\_descriptor} +\begin{verbatim} +const SANE_Option_Descriptor * + sane_get_option_descriptor (SANE_Handle h, SANE_Int n); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_control\_option}}\label{sec:control} + +This function is used to set or inquire the current value of option +number \code{n} of the device represented by handle \code{h}. The +manner in which the option is controlled is specified by parameter +\code{a}. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +\code{v}. It is a pointer to the memory that holds the option value. +The memory area pointed to by \code{v} must be big enough to hold the +entire option value (determined by member \code{size} in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument \code{v} may be shorter since the backend will stop +reading the option value upon encountering the first \code{NUL} +terminator in the string. If argument \code{i} is not \code{NULL}, +the value of \code{*i} will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +\begin{quote}\index{sane\_control\_option} +\begin{verbatim} +SANE_Status sane_control_option (SANE_Handle h, SANE_Int n, + SANE_Action a, void *v, + SANE_Int * i); +\end{verbatim} +\end{quote} + +The way the option is affected by a call to this function is +controlled by parameter \code{a} which is a value of type +\code{\defn{SANE\_Action}}. The possible values and their meaning is +described in Table~\ref{tab:actions}. + +\begin{table}[h] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\ + +\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The + option value passed through argument \code{v} may be modified by the + backend if the value cannot be set exactly. \\ + +\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter \code{v} is completely ignored in this case and + may be \code{NULL}. \\ + +\hline + \end{tabular} + \caption{Action Values (\code{SANE\_Action})} + \label{tab:actions} + \end{center} +\end{table} + +After setting a value via an action value of +\verb|SANE_ACTION_SET_VALUE|, additional information on how well the +request has been met is returned in \code{*i} (if \code{i} is +non-\code{NULL}). The returned value is a bitset that may contain any +combination of the values described in Table~\ref{tab:info}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in \code{*i} has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an + option may affect the value or availability of one or more {\em + other\/} options. When this happens, the SANE backend sets this + member in \code{*i} to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may + affect the parameter values (see \code{sane\_get\_parameters()}). + If setting an option affects the parameter values, this member will + be set in \code{*i}. Note that this member may be set even if the + parameters did not actually change. However, it is guaranteed that + the parameters never change without this member being set. \\ + +\hline + \end{tabular} + \caption{Additional Information Returned When Setting an Option} + \label{tab:info} + \end{center} +\end{table} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not + supported for the specified handle and option number. +\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + + +\subsection{\code{sane\_get\_parameters}} + +This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (\code{sane\_start()} has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +\code{sane\_start()} gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle \code{h} of the device for which the +parameters should be obtained and a pointer \code{p} to a parameter +structure. The parameter structure is described in more detail below. + +\begin{quote}\index{sane\_get\_parameters} +\begin{verbatim} +SANE_Status sane_get_parameters (SANE_Handle h, + SANE_Parameters * p); +\end{verbatim} +\end{quote} + +The scan parameters are returned in a structure of type +\code{\defn{SANE\_Parameters}}. The C declaration of this structure +is given below. +\begin{changebar} +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Frame format; + SANE_Int flags; + SANE_Int lines; + SANE_Int depth; + SANE_Int pixels_per_line; + SANE_Int bytes_per_line; + SANE_Int channels_per_image; + SANE_String formatdesc; + SANE_String proposed_filename; + SANE_Int dpi_x; + SANE_Int dpi_y; + char reserved[32]; /* 32 bytes for future use */ + } +SANE_Parameters; +\end{verbatim} +\end{quote} + +Member \code{format} specifies the format of the next frame to be +returned. The possible values for type \code{\defn{SANE\_Frame}} are +described in Table~\ref{tab:frameformat}. The meaning of these +values is described in more detail in Section~\ref{sec:imageformat}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|c|c|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf SANE standard} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\ +\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\ +\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\ +\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\ + +\hline + \end{tabular} + \caption{Frame Format (\code{SANE\_Frame})} + \label{tab:frameformat} + \end{center} +\end{table} + +The \code{flags} member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +\begin{itemize} + +\item +\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). Note, that it is possible to transmit +multiple images in succession. + +\item +\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. It is permissible to set that value to 1 "in good +faith", as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer (e.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at \code{sane\_start()}. + +\item +\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +\item +\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tell if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +\end{itemize} + +Note, that flags is compatibel to member \code{last\_frame} of +\code{SANE\_Parameters} of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). + + + +Member \code{lines} specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call \code{sane\_read()} until it +returns a status of \code{SANE\_STATUS\_EOF}. +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. + +Member \code{bytes\_per\_line} specifies the number of bytes that +comprise one scan line. +If bytes\_per\_line is set to 0, which can currently only be the case for +\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line +length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF} +with an arbitrary block length. For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. + +Member \code{depth} specifies the number of bits per sample. +Note, that only 0 (for not applicable), 1, and n*8 are allowed +values. Data with other depths has to be scaled up accordingly. + +Member \code{pixels\_per\_line} specifies the number of pixels that +comprise one scan line. + +Assume $B$ is the number of channels in the frame, then the bit depth +$d$ (as given by member \code{depth}) and the number of pixels per +line $n$ (as given by this member \code{pixels\_per\_line}) are +related to $c$, the number of bytes per line (as given by member +\code{bytes\_per\_line}) as follows: +\[ + c >= \left\{ + \begin{array}{ll} + \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\ + B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$} + \end{array} + \right. +\] +Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +Member \code{channels\_per\_image} specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +\code{channels\_per\_image} has to be the same for all frames for this image. + +Member \code{formatdesc} is used for the new frametypes +\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs +between the two types: + +\begin{itemize} +\item +\code{SANE\_FRAME\_RAW}: +The \code{formatdesc} contains a description of the channel data and +an optional depth information separated by a colon(:). + +A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}". + +Channel interleaved data is described by a comma separated list of channel descriptions, +e.g. "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}", +the channel data is sent in the given order. + +The depth information does {\bf not} define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member \code{depth}. + +Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be \code{infrared} or +a wavelength description like \code{1100nm}, but be aware that a +frontend may not be able to display such channels with usefull colors. + +Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member \code{channels\_per\_image}. + +\item +\code{SANE\_FRAME\_MIME}: +The \code{formatdesc} contains the MIME type/subtype *(;parameter) +fields as described in RFC 1521, 4. The Content-Type Header Field, +without the prefixing "Content-Type:". +Note, that it is discouraged to transfer proprietary file formats over +SANE. If at all possible, please stick to the IANA assigned MIME types, +and make sure the datastream is compliant with the corresponding +specification. +When data is transmitted with the framy type \code{SANE\_FRAME\_MIME} +all data has to be transmitted whithin one frame, multiple frames +are not allowed (so the flag \code{last\_frame} has to be set +when using this frame type). +A fully compliant SANE backend is required to transmit in either +SANE native frametypes, or in a MIME type, for which a converting +middleend exists and is freely available for all platforms. + +Other formats may be transmitted, but as the only thing the average +frontend can do with them, is save them. This is not considered a +good option, as it does not facilitate transmitting the data to a +client application that may be running the frontend. +However, if the data transferred by the backend is not an image in +nature, it wouldn't make sense to try converting it anyway, so it is +acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that +case. But even then, try to stick to well known stuff with freely +existing standards and viewers as well. +\end{itemize} + +The member \code{proposed\_filename} can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to "". + +In the case of non-MIME frames, this is expected to hold the basename for +the image, with the extension determined by the save function of the +frontend, as the frontend can fully understand the data and is thus able +to encode it in any format it wishes. + +For MIME frames it can contain either: + +\begin{itemize} +\item +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +\item +A complete filename, including extension. +\end{itemize} + +Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +In any case, if the frontend makes use of this field, the frontend +must mangle this proposal or the final filename it produces with +its help to suit local filesystem restrictions. + +Special care should be taken not to cause security flaws this way. +For Unix, that means killing out all path separators (/) [to avoid +to save away stuff in obscure places or create critical files like +/etc/hosts.allow] and avoiding to overwrite existing files. +(Creating of leading dot files - like .rhosts - is not an issue here, +as a) covers that). + +The string \code{proposed\_comment} can be used to transmit additional +image data, that can be stored in the comment areas several fileformats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. + +The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different +resolutions of each image. It is not permissible to change resolution +between frames of the same image. + +The member \code{reserved} is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. +\end{changebar} + + +\subsection{\code{sane\_start}} + +This function initiates aquisition of an image from the device +represented by handle \code{h}. +\begin{quote}\index{sane\_start} +\begin{verbatim} +SANE_Status sane_start (SANE_Handle h); +\end{verbatim} +\end{quote} +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The + operation should be retried later. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\end{description} +\end{quote} + + +\subsection{\code{sane\_read}} + +This function is used to read image data from the device represented +by handle \code{h}. Argument \code{buf} is a pointer to a memory area +that is at least \code{maxlen} bytes long. The number of bytes +returned is stored in \code{*len}. A backend must set this to zero +when the call fails (i.e., when a status other than +\code{SANE\_STA\-TUS\_GOOD} is returned). When the call succeeds, the +number of bytes returned can be anywhere in the range from 0 to +\code{maxlen} bytes. +\begin{quote}\index{sane\_read} +\begin{verbatim} +SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf, + SANE_Int maxlen, SANE_Int * len); +\end{verbatim} +\end{quote} +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle \code{h}. +\begin{enumerate} +\item If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +\item If the device is in non-blocking I/O mode, the call returns + immediately with status \code{SANE\_STA\-TUS\_GOOD} and with + \code{*len} set to zero. +\end{enumerate} +The I/O mode of handle \code{h} can be set via a call to +\code{sane\_set\_io\_mode()}. + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the + current frame. If \code{sane\_read} sends back any image data it +is not allowed to return with \code{SANE\_STATUS\_EOF}. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_cancel}} + +This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +\code{h}. +\begin{quote}\index{sane\_cancel} +\begin{verbatim} +void sane_cancel (SANE_Handle h); +\end{verbatim} +\end{quote} +This function can be called at any time (as long as handle \code{h} is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does {\em not\/} imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been {\em initiated}. Cancellation +completes only when the cancelled call returns (typically with a +status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must {\em not\/} call any other operation until the +cancelled operation has returned. + + +\subsection{\code{sane\_set\_io\_mode}} + +This function is used to set the I/O mode of handle \code{h}. The I/O +mode can be either blocking or non-blocking. If argument \code{m} is +\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise +it's set to blocking mode. +\begin{quote}\index{sane\_set\_io\_mode} +\begin{verbatim} +SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m); +\end{verbatim} +\end{quote} +By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete +successfully. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_get\_select\_fd}} + +This function is used to obtain a (platform-specific) file-descriptor +for handle \code{h} that is readable if and only if image data is +available (i.e., when a call to \code{sane\_read()} will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in \code{*fd}. +\begin{quote}\index{sane\_get\_select\_fd} +\begin{verbatim} +SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd); +\end{verbatim} +\end{quote} +This function can be called only after a call to \code{sane\_start()} +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until \code{sane\_cancel()} or \code{sane\_start()} get called again +or until \code{sane\_read()} returns with status +\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call \code{sane\_read()}. + +A backend may elect not to support this operation. In such a case, +the function returns with status code +\code{SANE\_STATUS\_UNSUPPORTED}. + +Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using \code{select()} +or \code{poll()} under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to \code{sane\_read()} is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_strstatus}} + +This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return \code{NULL}. +The returned pointer is valid at least until the next call to this +function is performed. +\begin{quote}\index{sane\_strstatus} +\begin{verbatim} +const SANE_String_Const sane_strstatus (SANE_Status status); +\end{verbatim} +\end{quote} + +\section{Code Flow}\index{code flow} + +The code flow for the SANE API is illustrated in +Figure~\ref{fig:flow}. Functions \code{sane\_init()} and +\code{sane\_exit()} initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +\begin{figure}[htb] + \begin{center} + \leavevmode + \psfig{file=figs/flow.eps,height=0.5\textheight} + \caption{Code flow} + \label{fig:flow} + \end{center} +\end{figure} + +Function \code{sane\_get\_devices()} can be called any time after +\code{sane\_init()} has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +Once a device has been chosen, it is opened using a call to +\code{sane\_open()}. Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +An opened device can be setup through the corresponding device handle +using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and +\code{sane\_control\_option()}. While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. However, as options are set, other options +may become active or inactive. Thus, after setting an option, it +maybe necessary to re-read some or all option descriptors. While +setting up the device, it is also admissible to call +\code{sane\_get\_parameters()} to get an estimate of what the image +parameters will look like once image acquisition begins. + +The device handle can be put in blocking or non-blocking mode by a +call to \code{sane\_set\_io\_mode()}. Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +After the device is setup properly, image acquisition can be started +by a call to \code{sane\_start()}. The backend calculates the exact +image parameters at this point. So future calls to +\code{sane\_get\_parameters()} will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to \code{sane\_read()} is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +\begin{changebar} +Image data is collected by repeatedly calling \code{sane\_read()} +until this function will return an end-of-file status +(\code{SANE\_STATUS\_EOF}). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels in of a red/green/blue image or multiple images), +it can call \code{sane\_start()} again. +If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the +current image is complete. In this case, it should be tested, if +\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set. +If yes, further calls to \code{sane\_start()} can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on +and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other +than \code{SANE\_STATUS\_EOF} occurs in a SANE function. +Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend +to indicate the end of a multiple image scan. + +A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling \code{sane\_start} again, which will get +you to the next frame, without having to read and discard the current one. + +In order to prematurely stop scanning and to reset the backend state, +\code{sane\_cancel()} can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. + +When done using the device, the handle should be closed by a call to +\code{sane\_close()}. Finally, before exiting the application, +function \code{sane\_exit()} must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +The following C sample code implements a reference loop for acquiring +multiple images: + +\begin{verbatim} +SANE_Parameters parms; +SANE_Status status; + +do +{ + do + { + /* Now start acquiring the next frame. */ + status=sane_start(handle); + + /* if that failed, we have a problem, and no more frames can be + * read at this time. Due to SANE_PFLAG_MORE_IMAGES still + * being clear, this will break out of _BOTH_ loops. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now let us see what the next frame brings. */ + status=sane_get_parameters(handle,&parms); + + /* This actually should not fail, but maybe the doc feeder + * jammed or something, so we break as well, if something + * is wrong. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now we check the announced parameters, if we can make use + * of the frame data. If not, we skip over to the next frame. + */ + if ( do_i_like_that(&parms) == NO ) continue; + + /* Set up for reading the data here. Mangle filenames, + * allocate memory, rewind multiframe files, ask user + * for confirmation, ... + */ + setup_for_transfer(...); + + /* Now we read in the frame data and process it. This should + * return SANE_STATUS_GOOD, until the frame is complete, + * what causes SANE_STATUS_EOF to be returned. + */ + while( SANE_STATUS_GOOD == ( status=sane_read(...) ) ) + read_in_and_process_data_as_required(); + + /* If transfer was broken due to anything but EOF, break out. */ + if (status != SANE_STATUS_EOF) { + break; + } + + /* Now loop until we have all frames of an image. */ + } while(!(parms.flag & SANE_PFLAG_LAST_FRAME)); + +/* O.K. - we now have a complete image. Fit it together, save it, + * flush buffers, transmit it, increment filenames, etc. + */ + +/* Now check for more pending images. If we have more, redo from start. + * Some backends might cheat here and send us for an extra round which + * will fail at sane_start, as they were not able to determine if they + * would have more data at the start of the last frame we read. + */ +} while(parms.flags & SANE_PFLAG_MORE_IMAGES); + +/* No more data. Fine. Reset the backend and go back to option-control + * loop. + */ + +sane_cancel(handle); +\end{verbatim} + +\end{changebar} + + +\section{Well-Known Options}\index{well-known options} + +While most backend options are completely self-describing, there are a +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +\subsection{Option Number Count}\index{option count} + +Option number 0 has an empty string as its name. The value of this +option is of type \code{SANE\_TYPE\_INT} and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a +frontend can directly read out the value of option number 0. + +\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option} + +\begin{changebar} +Option \code{resolution} is used to select the resolution at which an +image should be acquired. When the backend wants to allow different +values for x- and y-resolution it has to define the options +\code{x\_resolution} and \code{y\_resolution}. Note that only +the option \code{resolution} {\bf or} the options +\code{x\_resolution} {\bf and} \code{y\_resolution} may be active. + +The type of this option is either \code{SANE\_TYPE\_INT} or +\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\subsection{Preview Mode Option}\index{preview mode} + +The boolean option \code{preview} is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to \code{SANE\_TRUE}, +preview mode is in effect, when set to \code{SANE\_FALSE} image +acquisition should proceed in normal quality mode. The setting of +this option \emph{must not\/} affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option \code{resolution}). A backend is free to override the +\code{resolution} value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. +\begin{changebar} +When the \code{preview} option is set the backend should transfer +the image in frame type \code{SANE\_FRAME\_RAW} if possible. +\end{changebar} + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +\subsection{Scan Area Options}\index{scan area options} + +The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure~\ref{fig:area}. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the {\em smallest} and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the {\em largest}. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +\begin{figure}[tbp] + \begin{center} + \leavevmode + \psfig{file=figs/area.eps,height=0.3\textheight} + \caption{Scan area options} + \label{fig:area} + \end{center} +\end{figure} + +The names of the four options that define the scan area are given in +the table below: +\begin{center} +\begin{tabular}{ll} +{\bf Name} & {\bf Description} \\ +\code{\defn{tl-x}} & Top-left $x$ coordinate value \\ +\code{\defn{tl-y}} & Top-left $y$ coordinate value \\ +\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\ +\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\ +\end{tabular} +\end{center} +There are several rules that should be followed by front and backends +regarding these options: +\begin{itemize} + +\item Backends must attach a unit of either pixels + (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to + these options. The unit of all four options must be identical. + +\item Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +\item A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +\item A frontend must work properly with any or all of these options + missing. + +\end{itemize} + +\subsection{Depth option}\index{bit depth option} +\begin{changebar} +Option \code{depth} is used to select the image depth in bits/sample +in multi bit mode - (this means for 24 bit rgb mode this value must be 8). +The type of this option is \code{SANE\_TYPE\_INT}. +The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option \code{mode}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Gamma table options}\index{gamma table options} +\begin{changebar} +The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE} +of the type \code{SANE\_TYPE\_INT} which represent the gamma correction +table for gray. In color mode the \code{gamma-table} may be used to set +a common gamma correction for red, green and blue. The options +\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table} +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +\code{gamma-table} option, only the \code{red-}, \code{green-} and +\code{blue-gamma-table} or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +\begin{verbatim} +red_value = gamma-table(red-gamma-table(value)) +green_value = gamma-table(green-gamma-table(value)) +blue_value = gamma-table(blue-gamma-table(value)) +\end{verbatim} + +The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog\_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Mode options}\index{mode options} +\begin{changebar} +The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: \code{Color}, \code{Gray}, \code{Halftone} +and \code{Lineart}. \code{Color} and \code{Gray} are multi bit +modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart} +are single bit modes.\\ +This way a frontend can select e.g the mode \code{Gray} +for scanning a fax.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Source options}\index{source options} +\begin{changebar} +The option \code{source} is used to select the scansource +(e.g. Automatic Document Feeder). +It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and +\code{Automatic Document Feeder}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Threshold}\index{threshold option} +\begin{changebar} +The option \code{threshold} is used to define the threshold +for Lineart and may be Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It defines the minimum intensity to get a white point / full intensity +(image data bit = 0). The backend has to +scale the values in the following way:\\ +A value of 0.0 means all pixels get white /full intensity (all image data +bits are 0). A value of 50.0 means intensities brighter than medium gray +get white / full intensity (bit 0). A value of 100.0 means all pixels get +black (all image data bits are 1). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Analog gamma}\index{analog gamma option} +\begin{changebar} +The option \code{analog-gamma} is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_NONE}. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options \code{analog-gamma-red}, +\code{analog-gamma-green} and \code{analog-gamma-blue}. +It is not allowed to emulate an anlog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect to the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Shadow}\index{shadow options} +\begin{changebar} +The option \code{shadow} is used to define the shadow level / black point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). The backend has to scale the values in the following way:\\ +A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{shadow-red}, \code{shadow-green} +and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Highlight}\index{hightlight options} +\begin{changebar} +The option \code{highlight} is used to define the highlight level / white point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). The backend has to scale the values in the +following way:\\ +A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{highlight-red}, \code{highlight-green} +and \code{highlight-blue}, in this case \code{highlight} has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option} +\begin{changebar} +The option \code{lamp-on} is used to turn the lamp of the scanner on. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned on. + +The option \code{lamp-off} is used to turn the lamp of the scanner off. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned off. + +These options are not mandatory, but if a backend does support them, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Scanner buttons}\index{scanner button options} +\begin{changebar} +Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image.\\ + +A backend that does make available the scanner-buttons has to +implement the following options:\\ +\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\ +\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\ +\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\ +When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS} +or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined. + +A Frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +\begin{itemize} + +\item +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +\code{scanner-buttons-lock} to \code{SANE\_TRUE}. +While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE} +the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + + \begin{itemize} + \item + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \item + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \end{itemize} + +\item +The frontend does read the value of option \code{scanner-buttons-lock}. If +it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons. +If it is \code{SANE\_FALSE} then access has been denied. + +\item +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): + \begin{itemize} + \item + The frontend does set option \code{scanner-buttons-status-update}. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option \code{scanner-buttons-status}, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immedeatly and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE} + and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the \code{scanner-buttons-status} to 0. + + \item + The frontend does read the value of option \code{scanner-buttons-status} + \end{itemize} + +\item +When the frontend does exit or it does not want to use the buttons +it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of \code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\code{sane\_close()} should do the same as setting option +\code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\end{itemize} +\end{changebar} + + + +\input{net.tex} + +\chapter{Contact Information}\label{chap:contact} + +The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +\begin{quote}\index{mailing list} +\begin{verbatim} +majordomo@mostang.com +\end{verbatim} +\end{quote} +To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the +above address. + +A complete list of commands supported can be obtained by sending a +mail with a subject of ``\code{help}'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +\begin{quote} +\url{http://www.mostang.com/sane/} +\end{quote} + +\newpage +\input{sane.ind} + +\end{document} diff --git a/sane2/0.06/sane2-0.06.dvi.gz b/sane2/0.06/sane2-0.06.dvi.gz new file mode 100644 index 0000000000000000000000000000000000000000..5a33834418b52e609e628a2272449fc5aa949bc7 GIT binary patch literal 222928 zcmeFa3w&H)5!0X0oi8flZ#q(HfqNoJA^oy>%}G!1w| zV7W*_r$>g7iYZbN5HE|!%AmXGE|=DDsjiCPDl7t`zAtKbbrFI8_xpRE=bST>nIQwM z`u;b5KD(sJInVQ)-~Iml$v5qaEe{@XN(KIB{p#?!UBPqaMw5xbWMXdpf(7-p3mR+d znwHczG}L_>PfX)uZ}q=7@xN`pYu@|Sk!`Pc-+S3M-zUzvYGm6RpGbacBsKl4AM8G8 zM#E)4t(fzjODguoQZoh<1F=PkZ+AAgx2C7hKfg2Kj|BX&fPGf#^?U9J#^Rx9#Kt-7 z!B})K8uy3o1+@zn+BJ5}pX}+M-yQ7PFgn)sn>WVZ|B1ShEfqWbHMUme^0*bTv6e@}2^%e2pZ|EPtdqub|X z{39d$yj%Ub>gH}>EA9LCcvpWYZZC`WBnPnV<^w;0w|(EH&_% zK`NVXcyZ(AAN?7a1GUFfGk^Y~gQqF<2^CKkX$J6j9!<8}Q7;VE7DNjYSTThM%8{j8lkPt(Jf)b>#>hiM}yQI)yTd)E|F_XbkmiL7+r zRcz{_vr#KN>N%oOI|`7LGq+zbg~-2OM7k(-e^SV8bW|dct5xDse>|9r-pU`}Hih25 z5A+s7n^K)iqtS5CAMs)?ZW8hN zf|YuNFPX+hqO`FV?iG?U9fQG`AR(Tr_)2C93wsv}Ee;HD|W{T&oH6hfQ|WEDbO8XVUbOyu#Q9SG9;jHfEAuAAb+vTBAV z!&P2at)W)MtO_BA;xIZGj7*6`$1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gk_rAnvG62ledf)0r4F*f#=JcX$B(gCT0; zI)(dU2NG43KTBH(JHMHUS!7IRlb_*kyj|Cn8$&32SbAtg%*ChI)t3xujyBg*uMSVl zlC(v}EqfRKsUqI}mwi5a-2)#ul_qZdrP$}XH|_K5AFZ!gQgLdT=0C5kT=}`*9EJfE z(i3R$NMAa=X7sh{XI}o`cGoFrao^zRXzj|^mM^Zq{E3RiZtUnF$5zR&`-gsAD!=X* z`t`(*Ui@s_&C3o%X>=fZ?Sx-Gb4|h91R4|J*W=~agU}m*?TQw&T@ijgR(?J7zDtXK zJw}dUTN~M99DU5O%Wrne;TV}6IL1*2-qQPF|JT73emzp=4Q9~Qj*wpud+v;))eimm z<>%~M!Nc+YD*Fc0YhOD=4jcedfpf6@>hG2yd$;`Ruf<;v`sgbc?Qr{AgjunziZ{M9 ac8Dx4K40 D E +%EndDVIPSBitmapFont +/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60 +60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60 +60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37 +99.6264 /Courier rf +%DVIPSBitmapFont: Fd cmtt10 10.95 13 +/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F +A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F +A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65 +D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800 +A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69 +D78 D<90390FF803C0D97FFF13E048B512C74814 +F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C +91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900 +3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F +E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380 +253A7BB830>83 D +87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813 +03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00 +3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7 +13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F +90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712 +7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13 +07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0 +252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0 +91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339 +7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0 +4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C +14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01 +FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111 +D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC +4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F +9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC +03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48 +15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A +5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A +485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E +%EndDVIPSBitmapFont +/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37 +1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25 +3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35 +74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1 +49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1 +66.4176 /Times-Roman rf +%DVIPSBitmapFont: Fh cmmi10 10.95 16 +/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA +1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0 +EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC +EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F +F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED +3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC +17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F +C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED +01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F +F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC +07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB +FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72 +7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F +E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE +4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D +90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9 +FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0 +1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01 +1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8 +A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A +D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0 +387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848 +14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13 +074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F +5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0 +EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000 +157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0 +38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F +FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807 +031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13 +1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2 +ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7 +2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F +001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B +137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E +13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00 +1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0 +C648C9FC2A3B7EA72D>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmr8 8 3 +/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23 +>49 DII E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fj cmr10 10.95 12 +/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201 +5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E +123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB +01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12 +007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6 +14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12 +1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9 +FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC +EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713 +800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015 +C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F +90C7FCEB07F8243F7CBC2D>53 DI< +1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814 +1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301 +5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16 +7BA147>61 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fk cmsy10 10.95 5 +/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4 +EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100 +DI E +%EndDVIPSBitmapFont +/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25 +25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24 +90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33 +39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66 +55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50 +50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50 +99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53 +66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120 +86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86 +11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43 +119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76 +3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13 +172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86 +90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45 +66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 +40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61 +1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51 +1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45 +30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81 +90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45 +51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 +40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61 +66 66 61 66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23 +2[30 30 40[{TeXBase1Encoding ReEncodeFont}55 90.9091 +/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115 +103 115 172 57 115 1[57 115 103 69 92 115 92 115 103 +12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149 +23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559 +/Times-Bold rf /Ft 134[50 23[44 19[89 23[50 2[50 50 50 +3[25 44[{TeXBase1Encoding ReEncodeFont}8 99.6264 /Times-Roman +rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76 +86 76 86 76 10[124 2[96 4[124 8[105 3[124 10[86 3[86 +1[86 48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188 +/Times-Roman rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%BeginPaperSize: a4 +a4 +%%EndPaperSize + +%%EndSetup +%%Page: 1 1 +1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44 +b(2.0)f(proposal)i(0.06)e(-)g(rauch/beck)1672 2698 y +Ft(May)24 b(15,)h(2002)p eop +%%Page: 1 2 +1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430 +b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26 +b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 +b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91 +b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647 +y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24 +b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25 +b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n +(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639 +b(13)136 3593 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3764 y(4.2)96 +b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(14)345 3935 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(14)345 4106 y(4.2.2)110 b(Boolean)25 +b(T)-7 b(ype)41 b(.)k(.)g(.)g(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g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)345 5132 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7 +b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(17)1927 5381 y(1)p eop +%%Page: 2 3 +2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7 +b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(19)345 279 y(4.2.10)65 b(Internationalizatio)q(n)44 +b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(22)136 436 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)82 b(26)345 592 y(4.3.1)110 b Fp(sane)p 861 +592 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 749 +y(4.3.2)110 b Fp(sane)p 861 749 V 31 w(exit)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(26)345 905 y(4.3.3)110 b Fp(sane)p 861 905 +V 31 w(get)p 1057 905 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1062 +y(4.3.4)110 b Fp(sane)p 861 1062 V 31 w(open)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 1218 y(4.3.5)110 b Fp(sane)p 861 +1218 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1375 y(4.3.6)110 +b Fp(sane)p 861 1375 V 31 w(get)p 1057 1375 V 32 w(option)p +1419 1375 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(28)345 1532 y(4.3.7)110 b Fp(sane)p 861 1532 V 31 w(control)p +1277 1532 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(28)345 1688 y(4.3.8)110 b Fp(sane)p +861 1688 V 31 w(get)p 1057 1688 V 32 w(parameters)25 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(29)345 1845 y(4.3.9)110 b Fp(sane)p 861 1845 V 31 w(start)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(34)345 2001 y(4.3.10)65 b Fp(sane)p +861 2001 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(34)345 2158 +y(4.3.11)65 b Fp(sane)p 861 2158 V 31 w(cancel)33 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(35)345 2314 y(4.3.12)65 b Fp(sane)p 861 2314 +V 31 w(set)p 1057 2314 V 32 w(io)p 1199 2314 V 31 w(mode)78 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2471 y(4.3.13)65 b Fp(sane)p 861 2471 V 31 w(get)p +1057 2471 V 32 w(select)p 1419 2471 V 30 w(fd)37 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2627 y(4.3.14)65 b Fp(sane)p 861 2627 V 31 w(strstatus)73 +b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(37)136 2784 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2940 y(4.5)96 +b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(40)345 3097 y(4.5.1)110 b(Option)25 b(Number)e(Count)70 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3253 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3410 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3566 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(41)345 3723 y(4.5.5)110 b(Depth)24 b(option)71 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(43)345 3879 y(4.5.6)110 b(Gamma)23 +b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(43)345 4036 y(4.5.7)110 b(Scan)24 +b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(43)345 4192 y(4.5.8)110 b(Scan)24 +b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4349 y(4.5.9)110 b(Threshold)43 +b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4505 y(4.5.10)65 b(Analog)25 +b(gamma)56 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4662 y(4.5.11)65 b(Shado)n(w)51 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4818 y(4.5.12)65 +b(Highlight)e(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4975 y(4.5.13)65 +b(T)l(urn)24 b(lamp)f(on)h(and)g(of)n(f)48 b(.)d(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 5132 +y(4.5.14)65 b(Scanner)25 b(b)n(uttons)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(46)1927 5381 y(2)p eop +%%Page: 3 4 +3 3 bop 0 123 a Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989 +b(48)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(49)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24 +b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 638 y(5.1.2)110 b(T)-7 +b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 809 y(5.2)96 +b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 981 y(5.2.1)110 +b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(50)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153 +V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62 +b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(51)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p +1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 1496 y(5.2.4)110 +b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(51)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667 +V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p +1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(52)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p +1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 +2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057 +2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 2182 +y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182 +V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(53)345 2354 y(5.2.9)110 b Fp(SANE)p +861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345 +2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057 +2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(54)345 2697 y(5.2.11)65 b Fp(SANE)p +861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46 +b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(55)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871 +b(56)1927 5381 y Fq(3)p eop +%%Page: 4 5 +4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349 +y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45 +b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data) +g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g +(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2119 y(4.2)96 +b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(42)1927 5381 y(4)p eop +%%Page: 5 6 +5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349 +y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i +(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 +b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31 +w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p +Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036 +y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 +b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p +Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f +(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722 +y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139 +2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop +%%Page: 6 7 +6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0 +1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g +(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38 +b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e +(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i +(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0 +2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g +(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d +(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c +(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f +(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22 +b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 +2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g +(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119 +b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d +(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f +(an)e(application)k(that)d(requires)h(access)g(to)0 3135 +y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j +(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5 +b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0 +3248 y(implementations)35 b(of)c(SANE)f(components.)55 +b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g +(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o +(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c +(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0 +3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as) +d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i +(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l +(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29 +b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26 +b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i +(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement) +i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o +(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h +(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o +(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7 +b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g +(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o +(e)d(this:)1927 5381 y(6)p eop +%%Page: 7 8 +7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0 +1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace) +h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g +(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22 +b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one) +g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0 +2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e +(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f +(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 +b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23 +b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f +(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21 +b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n +(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29 +b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g +(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i +(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the) +f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i +(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h +(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f +(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0 +2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e +(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5 +b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51 +b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g +(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 +b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h +(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0 +3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21 +b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g +(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g +(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f +(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k +Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 +3812 y(back)o(ends.)1927 5381 y(7)p eop +%%Page: 8 9 +8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51 +b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g +(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32 +b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0 +1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e +(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44 +b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g +(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f +(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30 +b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25 +b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f +(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d +(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 +b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h +(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p +Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n +(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j +(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an) +h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g +(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 +2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f +(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30 +b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f +(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h +(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g +(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22 +b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h +Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e +(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f +(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back) +o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e +(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h +(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o +(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31 +b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h +(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227 +4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h +(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n +(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g +(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o +(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227 +4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e +(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227 +4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k +(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d +(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n +(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f +(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29 +b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o +(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f +(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4 +v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro) +o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h +(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f +(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n +(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i +(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927 +5381 y(8)p eop +%%Page: 9 10 +9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227 +310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g +Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p +2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p +Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i +(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n +(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227 +536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time) +f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136 +724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27 +b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i +(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227 +837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41 +b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e +(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d +(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o +(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30 +b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g +Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f +(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha) +n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got) +e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227 +1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f +(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6 +b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i +(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e +(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p +Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e +(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227 +1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d +(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30 +b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g +(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to) +227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.) +43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f +(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g +(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g +(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h +(that)f(scanner)-5 b(.)0 2479 y + currentpoint currentpoint translate 0.64821 0.64821 scale neg exch +neg exch translate + 0 2479 a 0 2479 a + gsave currentpoint currentpoint translate 270 neg rotate neg exch +neg exch translate + 0 2479 +a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550 +@rwi @setspecial +%%BeginDocument: figs/hierarchy.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: hierarchy.fig +%%Creator: fig2dev Version 3.1 Patchlevel 2 +%%CreationDate: Thu Jan 30 22:02:12 1997 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%Magnification: 1.00 +%%Orientation: Landscape +%%BoundingBox: 0 0 355 722 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-17.0 -17.0 translate + 90 rotate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n 0 612 m 0 0 l 792 0 l 792 612 l cp clip + 0.06000 0.06000 sc +% Polyline +n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr +% Polyline +n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr +15.000 slw +% Polyline +n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +11399 5182 m +gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +8099 5182 m +gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr +% Polyline +n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr +% Polyline +n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr +% Polyline +n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr +% Polyline +n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr +7.500 slw +% Polyline +n 2700 1800 m 1200 3000 l gs col-1 s gr +% Polyline +n 3000 1800 m 3000 3000 l gs col-1 s gr +% Polyline +n 3300 1800 m 4800 3000 l gs col-1 s gr +% Polyline +n 9600 1800 m 9600 2100 l gs col-1 s gr +% Polyline +n 9450 2700 m 8100 4800 l gs col-1 s gr +% Polyline +n 11400 4200 m 11400 4800 l gs col-1 s gr +% Polyline +n 1200 3600 m 1200 4200 l gs col-1 s gr +% Polyline +n 3000 3600 m 3000 4125 l gs col-1 s gr +% Polyline +n 7875 5400 m 7350 5850 l gs col-1 s gr +% Polyline +n 8250 5400 m 8775 5850 l gs col-1 s gr +% Polyline +n 11475 5400 m 11475 5850 l gs col-1 s gr +15.000 slw +% Polyline +n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr +% Polyline +n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr +7.500 slw +% Polyline +n 9750 2700 m 11400 3600 l gs col-1 s gr +% Interp Spline +gs n 4800 3600 m + 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto + 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto + 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto + 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto + 7224.0 624.7 8573.7 446.9 9450 900 curveto + 9524.5 938.5 9562.0 1013.5 9600 1200 curveto + gs col-1 s gr + gr + +/Helvetica ff 270.00 scf sf +1199 3382 m +gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 3382 m +gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +1200 4425 m +gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 4380 m +gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +7350 6165 m +gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +8925 6165 m +gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +11475 6135 m +gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 600 m +gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +9600 630 m +gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +4725 5850 m +gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 1582 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +4799 3382 m +gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 1582 m +gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 2482 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +11399 3982 m +gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs + +%%EndDocument + @endspecial 2958 2479 a + currentpoint grestore moveto + 2958 2479 a 0 2479 a + currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale +neg exch neg exch translate + 0 2479 +a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0 +4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h +(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44 +b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g +(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f +(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0 +5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h +(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i +(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop +%%Page: 10 11 +10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e +Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36 +b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d +(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o +(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51 +b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h +(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e +(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d +Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e +Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f +(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22 +b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f +(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f +(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i +(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i +(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g +(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0 +972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h +(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g +(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back) +o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e +(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0 +1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0 +1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815 +y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h +(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f +(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39 +b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation) +j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0 +2041 y(applications)f(and)c(de)n(vices.)59 b(While)34 +b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has) +f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i +(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g +(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0 +2266 y(accommodate)26 b(future)e(applications)k(or)23 +b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g +(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is) +f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n +(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0 +2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g +(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21 +b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n +(alues.)561 2585 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 561 2585 a 561 2585 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 561 2585 a 79 +x Fq(Each)g(sample)g(v)n(alue)g(represents)j(one)d(channel)h(\(e.g.,)e +(the)h(red)g(channel\).)2958 2664 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 2958 2664 a 2958 +2664 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 2958 2664 a 2958 2664 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 2958 2664 a 0 2836 a Fq(The)i(SANE)f +(API)g(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39 +b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0 +2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f +(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67 +b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34 +b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f +(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0 +3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g +(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g +(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f +(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0 +3307 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 3307 a 0 3307 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 3307 a 152 x Fq(When)30 b(transmitting)i(an) +e(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h +(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 3572 y(represents)e +(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31 +b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f +(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f(format)i(descriptor)-5 +b(.)1134 3685 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 1134 3685 a 1134 3685 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 1134 3685 a 1134 +3685 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 1134 3685 a 0 3704 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 3704 a 0 3704 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 3704 +a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f(of)e +(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e Fp(SANE)p +2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31 w(RAW)e +Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p +225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)18 +b(These)k(types)g(are)f(discussed)j(in)d(detail)h(in)f(the)g(follo)n +(wing)h(sections.)30 b(The)21 b(frame)g(types)h(used)g(by)0 +4082 y(v)o(ersion)e(1)d(of)h(this)h(standard)h(\()p Fp(SANE)p +1168 4082 V 31 w(FRAME)p 1474 4082 V 31 w(GRAY)p Fq(,)15 +b Fp(SANE)p 1983 4082 V 31 w(FRAME)p 2289 4082 V 30 w(RGB)p +Fq(,)h Fp(SANE)p 2743 4082 V 31 w(FRAME)p 3049 4082 V +30 w(RED)p Fq(,)g Fp(SANE)p 3503 4082 V 31 w(FRAME)p +3809 4082 V 30 w(GREEN)p Fq(,)0 4195 y(and)24 b Fp(SANE)p +379 4195 V 31 w(FRAME)p 685 4195 V 30 w(BLUE)p Fq(\))e(are)h(obsolete)j +(and)e(superseded)j(by)c Fp(SANE)p 2360 4195 V 31 w(FRAME)p +2666 4195 V 31 w(RAW)p Fq(.)2901 4195 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 2901 4195 a 2901 +4195 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 2901 4195 a 2901 4195 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 2901 4195 a 0 4215 a + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 +4215 a 0 4215 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 4215 a 288 x Fm(3.2.1)99 b(Pixel)24 +b(oriented)i(frames)0 4566 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 4566 a 0 4566 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 4566 +a 0 4566 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 4566 a 0 4566 a + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 4566 a 0 4566 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 4566 +a 170 x Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h(frames)e(is)g +Fp(SANE)p 1561 4736 28 4 v 31 w(FRAME)p 1867 4736 V 30 +w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g(channels)i +(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32 +b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f +(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0 +4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h +Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g +Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25 +b(type.)0 5075 y(See)e(section)i Fr(??)f Fq(on)g(page)g +Fr(??)g Fq(for)f(details)i(about)g(the)f(format)g(descriptions.)2472 +5075 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 2472 5075 a 2472 5075 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 2472 5075 a 2472 5075 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 2472 5075 a 0 5094 a + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 5094 a 0 5094 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 5094 a 0 5094 +a + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 5094 a 0 5094 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 5094 a 0 5094 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 5094 a 1905 5381 +a Fq(10)p eop +%%Page: 11 12 +11 11 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 32 a 91 x Fq(Each)24 +b(sample)h(v)n(alue)g(has)f(a)g(certain)h(bit)g(depth.)31 +b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g(entire)i(image)e +(and)h(can)f(be)g(as)g(small)g(as)0 236 y(one)f(bit.)29 +b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h(or)g(16)g(bits)g +(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5 b(s)25 +b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0 +349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n +(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f +(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d +(sample)h(v)n(alue)g(of)g(depth)g(8\).)1634 462 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 1634 +462 a 1634 462 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 1634 462 a 1634 462 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 1634 462 a 0 481 +a + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 481 a 0 481 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 481 a 141 x Fq(The)18 b(complete)h(image)g(may)e +(consist)j(of)e(se)n(v)o(eral)h(channels,)j(the)c(number)h(of)f +(channels)i(is)e(de\002ned)h(by)f(member)g Fp(channels)p +3998 622 28 4 v 30 w(per)p 4193 622 V 31 w(image)0 735 +y Fq(of)25 b Fp(SANE)p 325 735 V 31 w(Parameters)p Fq(.)k(The)24 +b(image)i(may)f(be)g(transmitted)j(in)d(an)g(arbitary)i(number)f(of)g +(frames)f(which)h(can)g(be)f(de-)0 848 y(termined)j(by)f(w)o(atching)h +(the)f Fp(last)p 1186 848 V 31 w(frame)d Fq(\003ag)i(in)h(said)g(type)h +(\(or)f(by)g(counting)i(the)e(channels\).)41 b(Note:)35 +b(This)27 b(frame)0 961 y(type)d(replaces)i(all)d(frame)h(types)h(of)e +(the)h(SANE)d(standard)26 b(v)o(ersion)f(1.)2271 961 +y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 2271 961 a 2271 961 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 2271 961 a 2271 961 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 2271 961 +a 0 1122 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i +(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48 +b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 1235 +y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f +(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f +(8\),)h(or)f(a)g(partial)h(sam-)0 1347 y(ple)j(v)n(alue)g(\(for)f(an)h +(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31 +b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g +(are)0 1460 y(transmitted)26 b(in)d(the)h(machine')-5 +b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 1621 +y Fr(Back)o(end)22 b(Implementation)i(Note)227 1767 y +Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h +(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f +(adjusted)227 1880 y(appropriately)32 b(if)c(necessary)-6 +b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i +(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 1993 +y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o +(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f +(then)f(apply)i(the)227 2105 y(adjustment)d(if)d(necessary)-6 +b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er) +n(-mak)o(es-right)q(\224)29 b(approach.)975 3247 y @beginspecial +0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial +%%BeginDocument: figs/xfer.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: xfer.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:30 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 362 182 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-134.0 370.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +15.000 slw +% Polyline +n 2400 3300 m 8100 3300 l gs col-1 s gr +n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3375 m 2400 3675 l gs col-1 s gr +15.000 slw +n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 3750 m 8100 3750 l gs col-1 s gr +n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3825 m 2400 4125 l gs col-1 s gr +15.000 slw +n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr +15.000 slw +% Polyline +n 2400 4200 m 8100 4200 l gs col-1 s gr +n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 4275 m 2400 4575 l gs col-1 s gr +15.000 slw +n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 4650 m 8100 4650 l gs col-1 s gr +n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1111 3443 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24 +b(order)h(of)e(image)h(data)g(bytes)0 3746 y(The)f(order)i(in)f(which)g +(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e +(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0 +3859 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g +(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e +(right-most)i(column.)30 b(The)0 3972 y(left-to-right,)35 +b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h +(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4085 +y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g +(e)o(xample\).)0 4246 y(If)d(a)g(frame)h(contains)h(multiple)g +(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f +(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0 +4359 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h +(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f +(bit-depth)j(of)d(8.)0 4519 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g +(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g +Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h +(depth)h(1)0 4632 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g +(interlea)n(v)o(ed)j(f)o(ashion.)1851 4553 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 1851 4553 +a 1851 4553 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 1851 4553 a 79 x Fq(The)c(\002rst)h(sample)h(of)f(each)g +(byte)h(is)f(represented)j(by)d(the)g(most)0 4745 y(signi\002cant)g +(bit.)548 4745 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 548 4745 a 548 4745 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 548 4745 a 548 +4745 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 548 4745 a 0 4906 a Fq(When)g(the)h(bit)f(depth)i(is)e(1)f +(there)i(are)g(only)g(tw)o(o)e(sample)i(v)n(alues)h(possible,)g(1)e +(represents)j(minimum)d(intensity)j(\(black\))0 5019 +y(and)19 b(0)g(represents)i(maximum)e(intensity)i(\(white\).)28 +b(F)o(or)18 b(all)h(other)h(bit)f(depths)i(a)d(sample)i(v)n(alue)f(of)g +(0)g(represents)i(minimum)0 5132 y(intensity)26 b(and)e(lar)n(ger)h(v)n +(alues)g(represent)h(increasing)g(intensity)-6 b(.)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 5151 a 0 5151 a + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 5151 a 0 +5151 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(11)p +eop +%%Page: 12 13 +12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx +93 @ury 3744 @rwi @setspecial +%%BeginDocument: figs/image-data.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: image-data.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:36 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 521 93 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-88.0 120.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +1875 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3225 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +4575 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l + 5850 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +2475 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 600 m +gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +5925 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +7275 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +8625 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l + 9900 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +6525 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 600 m +gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1950 m +gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1950 m +gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +6525 1950 m +gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1950 m +gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1950 m +gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2475 1950 m +gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +10050 1275 m +gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1125 m +gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23 +b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 1070 +a 0 1070 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0 +1243 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 1243 a 0 1243 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 1243 a 0 1243 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 1243 a 0 +1243 a + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 0 1243 a 0 1243 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 0 1243 a 151 x Fq(It)32 b(also)i(is)e +(possible)j(to)e(transmit)h(arbitary)g(\(not)g(necessaryly)i(pix)o(el)d +(oriented\))i(data.)57 b(This)33 b(allo)n(ws)g(transmission)i(of)0 +1507 y(compressed)26 b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.) +1402 1507 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 1402 1507 a 1402 1507 a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 1402 1507 a 1402 +1507 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 1402 1507 a 0 1527 a + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 1527 a 0 1527 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 1527 +a 152 x Fq(The)i(type)i(of)f(arbitrary)i(data)f(frames)f(is)g +Fp(SANE)p 1547 1679 28 4 v 31 w(FRAME)p 1853 1679 V 30 +w(MIME)p Fq(.)2144 1679 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 2144 1679 a 2144 1679 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 2144 +1679 a 2144 1679 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 2144 1679 a 25 w Fq(The)g(frame)g(contains)i +(arbitrary)g(data)f(of)e(the)i(MIME)0 1791 y(\(see)g(RFC)e(1521/1522\)) +30 b(type)e(that)f(is)f(gi)n(v)o(en)i(in)e(the)h Fp(format)p +2039 1791 28 4 v 30 w(desc)d Fq(member)j(of)g(the)g Fp(SANE)p +3096 1791 V 31 w(Parameters)21 b Fq(struc-)0 1904 y(tured)27 +b(type)g(\(see)g(See)f(section)i Fr(??)e Fq(on)g(page)h +Fr(??)q Fq(\).)36 b(As)26 b(such,)h(it)f(is)g(assumed)i(to)e(be)g +(incomprehensible)31 b(to)26 b(the)g(frontend,)0 2017 +y(e)o(xcept)i(for)e(selected)j(types)e(the)g(frontend)h(is)f +(speci\002cally)h(capable)g(of)f(handling)i(internally)-6 +b(.)40 b(The)26 b(frontend)i(is)e(free)h(to)0 2130 y(ignore)32 +b(those)g(frames,)g(or)f(emplo)o(y)h(an)o(y)e(appropriate)k(means)d(to) +g(otherwise)h(handle)g(this)f(data)h(\(lik)o(e)f(sa)n(ving)i(them)d(to) +0 2243 y(disk)24 b(or)g(spa)o(wning)h(an)e(e)o(xternal)i(vie)n(wer\).) +1905 5381 y(12)p eop +%%Page: 13 14 +13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51 +b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512 +y(Interface)e(\(API\))0 1879 y + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 1879 a 0 1879 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 1879 +a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f +(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y) +h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i +(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o +(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0 +2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h +(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e +(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d +(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33 +b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0 +2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109 +2682 y Fp(#include)51 b()0 2748 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 2748 +a 0 2748 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 2748 a 0 2748 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 2748 a 333 x Fn(4.1)119 +b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard) +25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28 +b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e +(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d +(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e +(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51 +b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30 +b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g +(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g +(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h +(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g +(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o +(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g +(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o +(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o +(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i +(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o +(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129 +y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f +(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n +(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f +(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n +(vision.)48 b(While)30 b(control)h(of)e(these)0 4406 +y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o +(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28 +b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e +(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38 +b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n +(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o +(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o +(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4 +v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29 +b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d +(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905 +5381 y(13)p eop +%%Page: 14 15 +14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p +868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p +Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g +(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e +(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g +(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p +Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f +Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o +(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g +(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14 +b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d +(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704 +y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g +(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427 +817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e +(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the) +427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427 +1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f +(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427 +1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f +(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and) +427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227 +1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V +30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h +(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427 +1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p +868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 +b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of) +427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p +868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18 +b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d +(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j +Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0 +2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23 +b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f +(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o +(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59 +b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52 +b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31 +w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g +(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f +(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c +Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n +(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f +Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068 +y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g +Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15 +b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j +Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in) +e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j +Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d +Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24 +b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e +(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i +Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33 +b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i +(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25 +b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p +Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o +(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j +(mapping.)1905 5381 y(14)p eop +%%Page: 15 16 +15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0 +356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n +(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v) +n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j +Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g +(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097 +436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type) +h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 +b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377 +b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 +y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias) +g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e +(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 +b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 +b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g +Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 +1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0 +1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y +Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h +(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h +Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e +Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 +b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0 +2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f +(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays) +f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672 +y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27 +b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f +Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0 +2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0 +3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326 +y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n +(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in) +f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p +Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e +Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27 +b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6 +b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103 +b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0 +4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p +940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22 +b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29 +b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f +(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p +Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26 +b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p +Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g +(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5 +b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24 +b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17 +b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36 +b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros) +h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g +(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p +0 4901 1560 4 v 105 4957 a Ff(1)134 4988 y Fe(This)19 +b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g +(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905 +5381 y Fq(15)p eop +%%Page: 16 17 +16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p +Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c +(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f +(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking) +h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f +Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427 +349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p +Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine) +f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427 +608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j +Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o +(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g +Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227 +1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48 +b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48 +b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i +(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6 +b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0 +1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw) +o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0 +2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29 +b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o +(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g +(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d +Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48 +b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x) +o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27 +b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f +(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0 +2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50 +b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to) +f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o +(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227 +3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23 +b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695 +V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f +(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27 +b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f +Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52 +b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e +(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h +Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d +Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f +(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23 +b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773 +y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26 +b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i +(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905 +5381 y(16)p eop +%%Page: 17 18 +17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7 +b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i +(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560 +356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32 +b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6 +b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0 +961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n +(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e +(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p +Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f +(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n +(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0 +1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f +(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether) +f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57 +b(If)31 b(an)h(operation)j(completes)e(successfully)-6 +b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56 +b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f +(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30 +b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0 +1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23 +b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p +2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f +(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385 +2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p +1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p +3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113 +v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p +1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p +2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6 +b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660 +2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p +1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25 +b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435 +2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627 +V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083 +2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661 +V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31 +w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p +1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n +(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V +435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021 +2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083 +2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p +3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966 +28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000 +4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n +(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113 +V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p +1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p +2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514 +3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4 +v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31 +w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100 +w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226 +V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31 +w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p +1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er) +e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p +660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161 +3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083 +3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514 +3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4 +v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31 +w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100 +w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435 +3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643 +V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4 +113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f +(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519 +3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0 +4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7 +b(ype)0 4346 y + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + 0 4346 a 0 4346 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 0 4346 a 151 x Fq(Each)27 +b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type) +g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26 +b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n +(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969 +y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + +0 5096 a 0 5096 a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 0 5096 a 0 5096 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 0 5096 a 1905 5381 +a Fq(17)p eop +%%Page: 18 19 +18 18 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 0 32 a 445 123 a Fp(SANE_String_Cons)o +(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445 +349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g +(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g +(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o +(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913 +y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026 +y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139 +y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445 +1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478 +y(SANE_Device;)0 1533 y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + 0 1533 a 0 1533 a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 0 1533 a 0 +1533 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f +(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p +Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0 +1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019 +1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h +(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39 +b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is) +h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o +(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o +(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique) +j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30 +b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k) +o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32 +b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0 +2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g +(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n +(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h +(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52 +b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f +Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e +(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h +(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n +(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0 +2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g +(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g +(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928 +a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965 +1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698 +b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588 +b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698 +b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643 +b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p +1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p +1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p +1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p +1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p +1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p +1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93 +b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753 +b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643 +b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p +1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115 +2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p +3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094 +4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094 +V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207 +V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320 +V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433 +V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p +3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p +3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p +3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p +3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p +3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24 +b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0 +5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26 +b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f +(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f +(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o +(endor)h(speci\002c)g(and)f(therefore)i(completely)1905 +5381 y(18)p eop +%%Page: 19 20 +19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i +(back)o(ends.)0 143 y + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 143 a 0 143 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 143 a 150 x Fq(The)i(back)o +(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p +1648 293 28 4 v 30 w(backend)p 2063 293 V 30 w(author)25 +b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0 +406 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f +(the)g(format:)0 649 y Fp(Firstname)50 b(Lastname)h()0 892 y Fq(The)33 b(string)j Fp(backend)p 805 892 +V 29 w(website)30 b Fq(has)k(to)g(be)g(set)g(up)g(by)g(the)g(back)o +(end)i(with)e(the)g(website)h(or)e(ftp)h(address)i(of)e(the)0 +1005 y(back)o(end)26 b(in)d(the)h(format:)0 1247 y Fp(http://www.doma)o +(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0 +1490 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h +Fp(device)p 1572 1490 V 30 w(location)18 b Fq(with)23 +b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g +(this)0 1603 y(de)n(vice,)h(the)g(te)o(xt)g(should)h(be)f(read)g(from)f +(the)h(back)o(end)i(con\002g)e(\002le.)k(This)23 b(could)i(e.g.)k(look) +24 b(lik)o(e)g(this:)0 1846 y Fp(building)51 b(93,)i(2nd)g(plane,)f +(room)h(2124)0 2088 y Fq(The)33 b(string)h Fp(comment)c +Fq(can)j(be)g(used)h(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user) +l(,)k(the)c(te)o(xt)h(should)h(be)e(read)h(from)f(the)0 +2201 y(back)o(end)26 b(con\002g)e(\002le.)0 2372 y(The)f(string)i +Fp(reserved)p 839 2372 V 29 w(string)20 b Fq(is)j(planed)i(for)f +(future)h(use,)f(the)f(back)o(end)j(has)e(to)g(set)f(this)h(string)h +(to)f(\224\224.)0 2542 y(W)l(ith)i(member)f Fp(backend)p +915 2542 V 30 w(version)p 1330 2542 V 29 w(code)e Fq(a)i(frontend)j +(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is) +g(connected)0 2655 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0 +2825 y(The)30 b(member)h Fp(backend)p 889 2825 V 29 w(capability)p +1468 2825 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g +(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0 +2938 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f +(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f +(de\002ned)i(when)f(there)g(is)0 3051 y(the)f(need)g(for)g(it.)k(The)23 +b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g +(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3222 y(The)d(member)h +Fp(reserved)p 926 3222 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g +(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g +(inte)o(ger)h(to)e(0.)3900 3222 y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 3900 3222 a 3900 3222 +a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 3900 3222 a 3900 3222 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 3900 3222 a 0 3528 a Fm(4.2.9)99 +b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3760 y Fq(Option)23 +b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h +(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30 +b(Options)0 3873 y(are)h(used)g(to)f(control)j(virtually)g(all)d +(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n +(wer)f(of)h(the)g(SANE)d(API)h(stems)0 3986 y(from)22 +b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f +(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g +(descriptor)-5 b(.)31 b(Thus,)0 4098 y(a)21 b(frontend)i(can)e(control) +i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n +(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 +4211 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 +b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i +(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4324 y(operates.)31 +b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p +1485 4324 28 4 v 31 w(Option)p 1846 4324 V 30 w(Descriptor)18 +b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 +4567 y Fp(typedef)52 b(struct)336 4680 y({)445 4793 y(SANE_String_Cons) +o(t)c(name;)445 4906 y(SANE_String_Cons)o(t)g(title;)445 +5019 y(SANE_String_Cons)o(t)g(desc;)445 5132 y(SANE_Value_Type)g(type;) +1905 5381 y Fq(19)p eop +%%Page: 20 21 +20 20 bop 445 123 a Fp(SANE_Unit)51 b(unit;)445 236 y(SANE_Int)g(size;) +445 349 y(SANE_Int)g(cap;)445 462 y(SANE_Constraint_)o(Ty)o(pe)d +(constraint_type)o(;)445 574 y(union)555 687 y({)664 +800 y(const)k(SANE_String_Con)o(st)c(*string_list;)664 +913 y(const)k(SANE_Word)e(*word_list;)664 1026 y(const)i(SANE_Range)e +(*range;)555 1139 y(})445 1252 y(constraint;)336 1365 +y(})227 1478 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0 +1782 y Fr(Option)23 b(Name)0 2015 y Fq(Member)k Fp(name)e +Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40 +b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n +(vice)0 2128 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n +(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).) +55 b(The)31 b(option)i(name)f(must)0 2241 y(consist)e(of)d(lo)n(wer)n +(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p +Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i +(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43 +b(The)27 b(\002rst)h(character)0 2354 y(must)c(be)f(a)g(lo)n(wer)n +(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g +(dash\).)0 2659 y Fr(Option)g(T)n(itle)0 2892 y Fq(Member)e +Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h +(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21 +b(should)i(typically)0 3005 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o +(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i +(of)d(the)h(option.)0 3309 y Fr(Option)f(Description)0 +3542 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e +(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to) +g(describe)i(the)e(option.)35 b(It)24 b(is)0 3655 y(the)g +(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h +(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e +(this)0 3768 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i +(breaks.)0 4072 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0 +4305 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the) +g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h +Fp(SANE)p 3217 4305 28 4 v 31 w(Value)p 3523 4305 V 31 +w(Type)c Fq(are)0 4418 y(described)26 b(in)e(T)-7 b(able)23 +b(4.3.)0 4723 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 4956 +y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h +(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20 +b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765 +4956 V 31 w(U-)0 5069 y(nit)e Fq(are)j(described)i(in)d(T)-7 +b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g +(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21 +b(is)g(entirely)1905 5381 y(20)p eop +%%Page: 21 22 +21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p +1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p +3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v +165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247 +V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281 +V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p +Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360 +28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113 +v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g +Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p +390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042 +506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h +(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165 +585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V +31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V +256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p +Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p +390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042 +1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f +(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option) +1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n +(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k +(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j +(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g +(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24 +b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5 +b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p +390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042 +1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this) +h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e +(group)1395 1376 y(logically)35 b(related)e(options.)56 +b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395 +1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j +(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if) +e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395 +1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d +Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395 +1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865 +3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24 +b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354 +2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0 +2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f +(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h +(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37 +b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j +(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i +(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f +(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903 +4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856 +V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525 +w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876 +V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4 +v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113 +v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j +(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548 +3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068 +V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102 +V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p +3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181 +28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4 +113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24 +b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328 +V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024 +3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000 +3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p +3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407 +28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4 +113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24 +b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V +497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p +1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p +2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p +3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632 +28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698 +3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24 +b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666 +V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29 +b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4 +v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22 +b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g +(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26 +b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0 +4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v) +n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703 +4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g +(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e +(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i +Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g +(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i +Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e +(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop +%%Page: 22 23 +22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p +703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31 +w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31 +b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e +(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i +(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437 +y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289 +437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452 +653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23 +b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486 +653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798 +V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p +1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43 +b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y +Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d +Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31 +b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n +(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f +(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i +(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h +(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227 +1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V +30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p +Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553 +1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427 +1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i +(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p +813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p +Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p +2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427 +2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g +Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8 +b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f +(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37 +b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0 +2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n +(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921 +2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003 +y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30 +b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h +(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h +(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n +(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p +3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d +(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7 +b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0 +3598 y + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 3598 a 0 3598 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o +(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26 +b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g +(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27 +b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i +(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g +(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o +(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h +Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f +(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526 +V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0 +4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227 +5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227 +5132 y(#endif)0 5135 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 0 5135 a 0 5135 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 0 5135 a 0 5135 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 0 5135 a 1905 5381 a Fq(22)p eop +%%Page: 23 24 +23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p +1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p +3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86 +784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31 +w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254 +w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f +(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p +3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862 +931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010 +28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31 +w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V +100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n +(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123 +y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39 +b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25 +b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32 +b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n +(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199 +1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462 +y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g +(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286 +4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p +507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160 +2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue) +g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43 +b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p +1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50 +b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513 +1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31 +w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability) +j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28 +b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p +3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026 +y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p +2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026 +V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139 +y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25 +b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252 +y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p +3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p +311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p +1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22 +b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not) +h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g +(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513 +2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g +(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f +(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34 +3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p +507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p +1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d +(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929 +y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f +(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d +(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513 +3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p +2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of) +1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099 +3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862 +3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311 +3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160 +3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e +(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently) +1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5 +b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513 +3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V +34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31 +w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v +349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h +(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513 +3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6 +b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946 +y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d +(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g +(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513 +4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n +(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f +(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828 +4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24 +b(Capabilities)1905 5381 y(23)p eop +%%Page: 24 25 +24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p +1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215 +V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235 +V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31 +w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v +614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.) +49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427 +y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5 +b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a +Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V +28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094 +V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f +(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6 +b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879 +766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30 +b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o +(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h +Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25 +b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107 +1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518 +y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325 +1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879 +2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e +(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n +(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41 +b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e +Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g +(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6 +b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d +(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51 +b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h +Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g +Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879 +2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e +Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27 +b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n +(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d +Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71 +3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877 +3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224 +4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d +(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879 +3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28 +b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399 +y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35 +b(descriptor)h(member)1879 3512 y Fp(constraint.word)p +2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o +(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40 +b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33 +b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28 +b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g +(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879 +3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j +(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n +(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o +(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303 +a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303 +V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565 +v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e +(applicable)i(to)e(string-v)n(alued)k(options)1879 4415 +y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e +(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i +(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641 +28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e +Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the) +e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p +3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23 +b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905 +5381 y(24)p eop +%%Page: 25 26 +25 25 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 32 a 91 x Fq(Y)-10 b(ou)33 +b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e +Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f +(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g +(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p +Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23 +b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o +(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f +(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746 +y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g +(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f +(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i +Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the) +h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o +(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that) +g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g +(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46 +b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24 +b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p +883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377 +V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549 +y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d +Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or) +f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f +(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j +(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g +(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h +Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0 +3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g +(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e +(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p +Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i +Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22 +b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538 +y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22 +b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h +Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0 +3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d +Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0 +3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34 +b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g +(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0 +4049 y(should)h(use)f(the)g(function)i Fp(gettext)19 +b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24 +b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0 +4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g +(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i +(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c +(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23 +b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g +(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0 +4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the) +g(gette)o(xt)h(tools.)2241 4843 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 2241 4843 a 2241 4843 +a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 2241 4843 a 2241 4843 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 2241 4843 a 1905 5381 a Fq(25)p +eop +%%Page: 26 27 +26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 385 y Fm(4.3.1)99 +b Fc(sane)p 545 385 30 4 v 35 w(init)0 611 y Fq(This)35 +b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d +(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h +(SANE)0 724 y(back)o(end)h(is)e(unde\002ned)i(if)e(this)h(function)i +(is)d(not)g(called)i(\002rst.)60 b(The)34 b(v)o(ersion)i(code)f(of)f +(the)g(back)o(end)j(is)d(returned)i(in)0 837 y(the)28 +b(v)n(alue)h(pointed)h(to)e(by)h Fp(version)p 1267 837 +28 4 v 29 w(code)p Fq(.)40 b(If)28 b(that)h(pointer)h(is)d +Fp(NULL)p Fq(,)f(no)i(v)o(ersion)i(code)e(is)g(returned.)45 +b(Ar)n(gument)0 950 y Fp(authorize)18 b Fq(is)23 b(either)i(a)e +(pointer)i(to)e(a)g(function)i(that)f(is)f(in)l(v)n(ok)o(ed)j(when)d +(the)h(back)o(end)h(requires)h(authentication)h(for)d(a)0 +1063 y(speci\002c)g(resource)i(or)e Fp(NULL)c Fq(if)k(the)g(frontend)h +(does)g(not)f(support)h(authentication.)227 1287 y Fp(SANE_Status)50 +b(sane_init)g(\(SANE_Int)h(*)j(version_code,)1482 1400 +y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o(ba)o(ck)48 b(authorize\);)0 +1625 y Fq(The)23 b(authorization)28 b(function)d(may)f(be)f(called)i +(by)f(a)f(back)o(end)i(in)f(response)i(to)d(an)o(y)h(of)f(the)h(follo)n +(wing)h(calls:)227 1849 y Fp(sane)p 452 1849 V 31 w(open)p +Fq(,)c Fp(sane)p 967 1849 V 31 w(control)p 1383 1849 +V 29 w(option)p Fq(,)f Fp(sane)p 2005 1849 V 31 w(start)0 +2074 y Fq(If)25 b(a)h(back)o(end)i(w)o(as)d(initialized)k(without)d +(authorization)k(function,)e(then)f(authorization)i(requests)f(that)e +(cannot)i(be)d(han-)0 2187 y(dled)k(by)g(the)g(back)o(end)i(itself)f +(will)e(f)o(ail)h(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n +(v)o(ented)i(from)d(accessing)k(protected)0 2300 y(resources.)66 +b(Back)o(ends)37 b(are)f(encouraged)i(to)d(implement)h(means)g(of)f +(authentication)40 b(that)35 b(do)h(not)f(require)i(user)f(as-)0 +2413 y(sistance.)64 b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f +(authenticates)j(users)e(through)h(a)d(login)i(process)g(a)e(back)o +(end)j(could)0 2526 y(automatically)27 b(lookup)e(the)f(apporpriate)i +(passw)o(ord)g(based)e(on)g(resource-)i(and)e(user)n(-name.)0 +2690 y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n +(wing)h(declaration:)227 2915 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o +(E_)o(LEN)157 b(128)227 3028 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o +(LEN)157 b(128)227 3254 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o +(on)o(_C)o(al)o(lba)o(ck)o(\))445 3367 y(\(SANE_String_Con)o(st)c +(resource,)500 3480 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o +(NAM)o(E_)o(LE)o(N])o(,)500 3592 y(SANE_Char)g(password[SANE_MA)o(X_)o +(PA)o(SS)o(WOR)o(D_)o(LE)o(N])o(\);)0 3817 y Fq(Three)31 +b(ar)n(guments)i(are)e(passed)h(to)f(the)g(authorization)j(function:)46 +b Fp(resource)26 b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h +(of)0 3930 y(the)24 b(resource)j(that)d(requires)i(authorization.)35 +b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d +(user)n(-prompt)k(requesting)0 4043 y(a)36 b(username)i(and)f(a)g +(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b +Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g +(array)g(of)0 4156 y Fp(SANE)p 225 4156 V 31 w(MAX)p +421 4156 V 31 w(USERNAME)p 892 4156 V 29 w(LEN)22 b Fq(and)i +Fp(SANE)p 1482 4156 V 31 w(MAX)p 1678 4156 V 32 w(PASSWORD)p +2150 4156 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6 +b(.)33 b(The)23 b(authorization)0 4269 y(call)k(should)h(place)f(the)f +(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38 +b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0 +4382 y(NUL)c(terminated.)0 4680 y Fm(4.3.2)99 b Fc(sane)p +545 4680 30 4 v 35 w(exit)0 4906 y Fq(This)26 b(function)i(must)e(be)g +(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38 +b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h +(handles)0 5019 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f +(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g +(through)g(a)d(call)h(to)g Fp(sane)p 3656 5019 28 4 v +31 w(clo-)0 5132 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d +(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f +(this)g(function\).)48 b(After)29 b(this)h(function)1905 +5381 y(26)p eop +%%Page: 27 28 +27 27 bop 0 123 a Fq(returns,)36 b(no)c(function)i(other)f(than)g +Fp(sane)p 1396 123 28 4 v 31 w(init\(\))28 b Fq(may)k(be)g(called)h +(\(re)o(gardless)h(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0 +236 y Fp(sane)p 225 236 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to) +f(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e +(being)g(released)i(properly)-6 b(.)227 482 y Fp(void)53 +b(sane_exit)d(\(void\);)0 789 y Fm(4.3.3)99 b Fc(sane)p +545 789 30 4 v 35 w(get)p 760 789 V 35 w(devices)0 1022 +y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g(list)f +(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30 b(If)21 +b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6 b(,)0 +1135 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h Fp(NULL)d +Fq(terminated)24 b(array)f(of)f(pointers)h(to)f Fp(SANE_Device)16 +b Fq(structures)25 b(in)d Fp(*device)p 3635 1135 28 4 +v 29 w(list)p Fq(.)0 1248 y(The)27 b(returned)i(list)f(is)f(guaranteed) +j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g(\(a\))f(another)i +(call)f(to)f(this)h(function)h(is)e(per)n(-)0 1361 y(formed)f(or)e +(\(b\))h(a)g(call)g(to)g Fp(sane)p 1056 1361 V 31 w(exit\(\))c +Fq(is)j(performed.)35 b(This)25 b(function)i(can)e(be)g(called)h +(repeatedly)h(to)e(detect)h(when)0 1474 y(ne)n(w)g(de)n(vices)j(become) +e(a)n(v)n(ailable.)41 b(If)27 b(ar)n(gument)h Fp(local)p +1899 1474 V 31 w(only)c Fq(is)j(true,)h(only)f(local)h(de)n(vices)g +(are)f(returned)i(\(de)n(vices)0 1587 y(directly)f(attached)h(to)d(the) +h(machine)h(that)f(SANE)d(is)i(running)j(on\).)37 b(If)27 +b(it)f(is)g(f)o(alse,)i(the)f(de)n(vice)g(list)g(includes)i(all)e +(remote)0 1699 y(de)n(vices)e(that)f(are)g(accessible)i(to)e(the)f +(SANE)f(library)-6 b(.)227 1945 y Fp(SANE_Status)50 b(sane_get_devic)o +(es)e(\(const)k(SANE_Device)d(***)54 b(device_list,)1864 +2058 y(SANE_Bool)c(local_only\);)0 2304 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g Fp(SANE)p 1242 2304 +V 31 w(STATUS)p 1603 2304 V 30 w(NO)p 1743 2304 V 31 +w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e(memory)h(is)f(a) +n(v)n(ailable.)1357 2574 y Fr(Back)o(end)f(Implementation)i(Note)227 +2725 y Fq(SANE)h(does)k(not)f(require)h(that)f(this)h(function)g(is)f +(called)h(before)g(a)e Fp(sane)p 2646 2725 V 31 w(open\(\))d +Fq(call)k(is)f(performed.)227 2838 y(A)32 b(de)n(vice)j(name)e(may)g +(be)g(speci\002ed)i(e)o(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h +(mak)o(e)g(it)f(unnecessary)j(and)227 2950 y(undesirable)31 +b(to)c(call)h(this)g(function)h(\002rst.)1619 2871 y + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + +1619 2871 a 1619 2871 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 1619 2871 a 79 x Fq(The)e(same)g(information)j +(about)e(a)f(de)n(vice)i(has)e(to)h(be)f(returned)227 +3063 y(when)d Fp(sane)p 672 3063 28 4 v 31 w(open)d Fq(is)i(called.) +1290 3063 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 1290 3063 a 1290 3063 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 1290 3063 a 1290 +3063 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 1290 3063 a 0 3371 a Fm(4.3.4)99 b Fc(sane)p 545 +3371 30 4 v 35 w(open)0 3604 y Fq(This)26 b(function)h(is)f(used)h(to)e +(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36 +b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0 +3717 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40 +b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33 +b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e +Fp(*h)p Fq(.)0 3751 y + -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch +pop /CBarY65 exch def + 0 3751 a 0 3751 a + 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint +exch pop /CBarY66 exch def + 0 3751 a 79 x +Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e +Fp(**device)p 2040 3830 28 4 v 29 w(description)p Fq(.)i(This)e(is)f +(the)i(same)f(description)j(that)0 3943 y(is)h(returned)j(in)d(the)h +(list)g(by)f Fp(sane)p 1144 3943 V 31 w(get)p 1340 3943 +V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g +Fp(*h)c Fq(and)j Fp(*device)p 3186 3943 V 30 w(description)23 +b Fq(is)0 4055 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid) +i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4055 V 30 w(close\(\))c +Fq(is)j(performed.)3231 4055 y + -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch +pop /CBarY67 exch def + 3231 4055 a 3231 4055 +a + 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint +exch pop /CBarY68 exch def + 3231 4055 a 3231 4055 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore + 3231 4055 a 28 w Fq(As)g(a)g(special)i(case,) +0 4168 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n +(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n +(vice)e(\(if)f(there)h(is)g(such)g(a)0 4281 y(de)n(vice\).)227 +4527 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k +(SANE_Handle)d(*)55 b(h,)227 4640 y(const)e(SANE_Device)c(**)54 +b(device_descrip)o(ti)o(on\))o(;)0 4886 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h +(status)g(codes.)227 5132 y Fp(SANE)p 452 5132 28 4 v +31 w(STATUS)p 813 5132 V 30 w(DEVICE)p 1173 5132 V 30 +w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(currently)j(b)n(usy)f +(\(in)f(use)f(by)h(somebody)i(else\).)1905 5381 y(27)p +eop +%%Page: 28 29 +28 28 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(STATUS)p +813 123 V 30 w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f +(not)h(v)n(alid.)227 269 y Fp(SANE)p 452 269 V 31 w(STATUS)p +813 269 V 30 w(IO)p 953 269 V 32 w(ERROR)p Fr(:)43 b +Fq(An)23 b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n +(vice.)227 415 y Fp(SANE)p 452 415 V 31 w(STATUS)p 813 +415 V 30 w(NO)p 953 415 V 32 w(MEM)p Fr(:)44 b Fq(An)23 +b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 +561 y Fp(SANE)p 452 561 V 31 w(STATUS)p 813 561 V 30 +w(ACCESS)p 1173 561 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 +b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n +(\002cient)427 674 y(or)24 b(in)l(v)n(alid)h(authentication.)0 +982 y Fm(4.3.5)99 b Fc(sane)p 545 982 30 4 v 35 w(close)0 +1215 y Fq(This)32 b(function)h(terminates)h(the)e(association)j +(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h +Fp(h)e Fq(and)h(the)g(de)n(vice)0 1328 y(it)h(represents.)59 +b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g +(to)g Fp(sane)p 2326 1328 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j +(\002rst.)57 b(After)33 b(this)0 1441 y(function)26 b(returns,)f +(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 +1712 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 +2020 y Fm(4.3.6)99 b Fc(sane)p 545 2020 30 4 v 35 w(get)p +760 2020 V 35 w(option)p 1155 2020 V 35 w(descriptor)0 +2253 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f +(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h +(descriptor)g(for)f(option)0 2366 y(number)i Fp(n)e Fq(of)h(the)h(de)n +(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36 +b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0 +2479 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g +(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de) +n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2592 y(includes)22 +b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i +(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p +Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 2705 +y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h +(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227 +2976 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48 +b(*)445 3089 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3397 y Fm(4.3.7)99 +b Fc(sane)p 545 3397 V 35 w(control)p 1000 3397 V 34 +w(option)0 3630 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g +(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e +Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 3743 +y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f +(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h +Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 3855 +y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6 +b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through) +g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 3968 y(is)21 b(a)f(pointer)j(to)e +(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29 +b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f +Fq(must)h(be)g(big)g(enough)0 4081 y(to)26 b(hold)g(the)g(entire)h +(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d +Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39 +b(The)0 4194 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h +(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e +(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4307 y Fp(v)33 +b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h +(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d +(\002rst)f Fp(NUL)0 4420 y Fq(terminator)c(in)e(the)g(string.)44 +b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p +Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o +(vide)i(details)g(on)e(ho)n(w)0 4533 y(well)23 b(the)h(request)h(has)f +(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d +(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227 +4779 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h +(h,)k(SANE_Int)e(n,)2027 4892 y(SANE_Action)f(a,)j(void)g(*v,)2027 +5005 y(SANE_Int)e(*)j(i\);)1905 5381 y Fq(28)p eop +%%Page: 29 30 +29 29 bop 185 35 3531 4 v 183 148 4 113 v 628 114 a Fr(Symbol)p +1363 148 V 1363 148 V 493 w(Code)p 1664 148 V 1664 148 +V 850 w(Description)p 3714 148 V 185 151 3531 4 v 185 +168 V 183 281 4 113 v 234 247 a Fp(SANE)p 459 247 28 +4 v 31 w(ACTION)p 820 247 V 30 w(GET)p 1015 247 V 32 +w(VALUE)p 1363 281 4 113 v 254 w Fq(0)p 1664 281 V 100 +w(Get)23 b(current)i(option)g(v)n(alue.)p 3714 281 V +183 619 4 339 v 234 360 a Fp(SANE)p 459 360 28 4 v 31 +w(ACTION)p 820 360 V 30 w(SET)p 1015 360 V 32 w(VALUE)p +1363 619 4 339 v 254 w Fq(1)p 1664 619 V 100 w(Set)e(option)i(v)n +(alue.)31 b(The)24 b(option)h(v)n(alue)g(passed)h(through)g(ar)n(-)1716 +473 y(gument)21 b Fp(v)d Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o +(end)i(if)e(the)g(v)n(alue)1716 585 y(cannot)25 b(be)e(set)h(e)o +(xactly)-6 b(.)p 3714 619 V 183 1184 4 565 v 234 698 +a Fp(SANE)p 459 698 28 4 v 31 w(ACTION)p 820 698 V 30 +w(SET)p 1015 698 V 32 w(AUTO)p 1363 1184 4 565 v 309 +w Fq(2)p 1664 1184 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 +b(Back)o(end)28 b(or)f(de)n(vice)g(will)g(au-)1716 811 +y(tomatically)39 b(select)g(an)e(appropriate)k(v)n(alue.)71 +b(This)38 b(mode)1716 924 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o +(v)o(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1037 +y(v)n(alue)22 b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h +Fp(v)e Fq(is)h(completely)1716 1150 y(ignored)j(in)f(this)g(case)g(and) +g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1184 V 185 1187 3531 +4 v 1168 1341 a(T)-7 b(able)24 b(4.7:)29 b(Action)24 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 1341 28 4 v +31 w(Action)p Fq(\))0 1714 y(The)d(w)o(ay)h(the)f(option)j(is)d(af)n +(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d(controlled)k(by)c +(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 +1827 y Fp(SANE)p 225 1827 V 31 w(Action)p Fq(.)k(The)e(possible)j(v)n +(alues)f(and)f(their)g(meaning)h(is)e(described)j(in)e(T)-7 +b(able)23 b(4.7.)0 1998 y(After)k(setting)h(a)e(v)n(alue)h(via)g(an)g +(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o +Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0 +2111 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e +Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h +(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0 +2224 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g +(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2396 y(This)g(function)j(may) +d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +2642 y Fp(SANE)p 452 2642 V 31 w(STATUS)p 813 2642 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h +(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427 +2755 y(option)e(number)-5 b(.)227 2901 y Fp(SANE)p 452 +2901 V 31 w(STATUS)p 813 2901 V 30 w(INVAL)p Fr(:)44 +b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227 +3047 y Fp(SANE)p 452 3047 V 31 w(STATUS)p 813 3047 V +30 w(IO)p 953 3047 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +3193 y Fp(SANE)p 452 3193 V 31 w(STATUS)p 813 3193 V +30 w(NO)p 953 3193 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3339 +y Fp(SANE)p 452 3339 V 31 w(STATUS)p 813 3339 V 30 w(ACCESS)p +1173 3339 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h +(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427 +3452 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3760 +y Fm(4.3.8)99 b Fc(sane)p 545 3760 30 4 v 35 w(get)p +760 3760 V 35 w(parameters)0 3993 y Fq(This)28 b(function)i(is)e(used)h +(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44 +b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0 +4106 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h +(started)h(\()p Fp(sane)p 2070 4106 28 4 v 31 w(start\(\))19 +b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0 +4219 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6 +b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates) +e(of)g(what)f(the)g(parameters)0 4332 y(will)23 b(be)g(when)g +Fp(sane)p 716 4332 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32 +b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i +(started)g(allo)n(ws,)0 4445 y(for)c(e)o(xample,)h(to)e(get)h(an)g +(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27 +b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0 +4558 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f +(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer) +j Fp(p)c Fq(to)i(a)g(parameter)0 4671 y(structure.)k(The)23 +b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n +(w)-6 b(.)227 4942 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e +(\(SANE_Handle)h(h,)2027 5055 y(SANE_Parameters)f(*)54 +b(p\);)1905 5381 y Fq(29)p eop +%%Page: 30 31 +30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046 +a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746 +1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103 +1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a +Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p +1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21 +b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g +(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h +(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j +(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797 +1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h +(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i +(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d +(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797 +1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49 +b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f +(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797 +2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32 +b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31 +b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28 +b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e +(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h +(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455 +V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4 +v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30 +w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133 +V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n +(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f +(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797 +2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g +Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j +(should)e(reload)g(all)f(options.)1797 2986 y(This)36 +b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one) +1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923 +4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p +628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444 +3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g +(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797 +3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p +2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797 +3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f +(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26 +b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if) +1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30 +b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33 +b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797 +3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4 +791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29 +b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option) +1905 5381 y(30)p eop +%%Page: 31 32 +31 31 bop 0 123 a Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e +(a)f(structure)k(of)d(type)g Fp(SANE)p 2314 123 28 4 +v 31 w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0 +236 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910 +157 y + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 910 157 a 910 157 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 910 157 a 227 456 a Fp(typedef)52 +b(struct)336 569 y({)445 682 y(SANE_Frame)e(format;)445 +795 y(SANE_Int)h(flags;)445 908 y(SANE_Int)g(lines;)445 +1021 y(SANE_Int)g(depth;)445 1134 y(SANE_Int)g(pixels_per_line;)445 +1247 y(SANE_Int)g(bytes_per_line;)445 1360 y(SANE_Int)g +(channels_per_ima)o(ge)o(;)445 1473 y(SANE_String)f(format_desc;)445 +1586 y(SANE_String)g(proposed_filena)o(me)o(;)445 1698 +y(SANE_Int)h(dpi_x;)445 1811 y(SANE_Int)g(dpi_y;)445 +1924 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j +(*/)336 2037 y(})227 2150 y(SANE_Parameters)o(;)0 2371 +y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f(the)g +(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 b(possible)i(v)n +(alues)f(for)f(type)0 2484 y Fp(SANE)p 225 2484 28 4 +v 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7 b(able)28 +b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e(described) +i(in)f(more)f(detail)h(in)f(Sec-)0 2597 y(tion)d(3.2.)0 +2691 y + -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch +pop /CBarY73 exch def + 0 2691 a 0 2691 a + 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint +exch pop /CBarY74 exch def + 0 2691 a 217 2694 3466 4 v 215 +2807 4 113 v 535 2773 a Fr(Symbol)p 1144 2807 V 1144 +2807 V 368 w(Code)p 1446 2807 V 1446 2807 V 100 w(SANE)d(standard)p +2159 2807 V 2159 2807 V 586 w(Description)p 3681 2807 +V 217 2810 3466 4 v 217 2827 V 215 2940 4 113 v 267 2906 +a Fp(SANE)p 492 2906 28 4 v 31 w(FRAME)p 798 2906 V 31 +w(GRAY)p 1144 2940 4 113 v 230 w Fq(0)p 1446 2940 V 318 +w(v)o(ersion)k(1)p 2159 2940 V 240 w(Band)f(co)o(v)o(ering)h(human)f +(visual)h(range.)p 3681 2940 V 215 3052 V 267 3019 a +Fp(SANE)p 492 3019 28 4 v 31 w(FRAME)p 798 3019 V 31 +w(RGB)p 1144 3052 4 113 v 285 w Fq(1)p 1446 3052 V 318 +w(v)o(ersion)g(1)p 2159 3052 V 240 w(Pix)o(el-interlea)n(v)o(ed)i +(red/green/blue)h(bands.)p 3681 3052 V 215 3165 V 267 +3132 a Fp(SANE)p 492 3132 28 4 v 31 w(FRAME)p 798 3132 +V 31 w(RED)p 1144 3165 4 113 v 285 w Fq(2)p 1446 3165 +V 318 w(v)o(ersion)d(1)p 2159 3165 V 240 w(Red)e(band)i(of)e(a)g +(red/green/blue)28 b(image.)p 3681 3165 V 215 3278 V +267 3244 a Fp(SANE)p 492 3244 28 4 v 31 w(FRAME)p 798 +3244 V 31 w(GREEN)p 1144 3278 4 113 v 175 w Fq(3)p 1446 +3278 V 318 w(v)o(ersion)d(1)p 2159 3278 V 240 w(Green)f(band)g(of)g(a)f +(red/green/blue)28 b(image.)p 3681 3278 V 215 3391 V +267 3357 a Fp(SANE)p 492 3357 28 4 v 31 w(FRAME)p 798 +3357 V 31 w(BLUE)p 1144 3391 4 113 v 230 w Fq(4)p 1446 +3391 V 318 w(v)o(ersion)d(1)p 2159 3391 V 240 w(Blue)e(band)i(of)e(a)g +(red/green/blue)28 b(image.)p 3681 3391 V 215 3504 V +267 3470 a Fp(SANE)p 492 3470 28 4 v 31 w(FRAME)p 798 +3470 V 31 w(RAW)p 1144 3504 4 113 v 285 w Fq(5)p 1446 +3504 V 318 w(v)o(ersion)d(2)p 2159 3504 V 240 w(Arbitrary)g(pix)o(el)f +(property)i(transmission.)p 3681 3504 V 215 3617 V 267 +3583 a Fp(SANE)p 492 3583 28 4 v 31 w(FRAME)p 798 3583 +V 31 w(MIME)p 1144 3617 4 113 v 230 w Fq(6)p 1446 3617 +V 318 w(v)o(ersion)f(2)p 2159 3617 V 240 w(Data)e(described)j(by)e(a)f +(mime)g(descriptor)-5 b(.)p 3681 3617 V 217 3620 3466 +4 v 1194 3774 a(T)e(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p +Fp(SANE)p 2377 3774 28 4 v 31 w(Frame)p Fq(\))0 3889 +y + -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch +pop /CBarY75 exch def + 0 3889 a 0 3889 a + 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint +exch pop /CBarY76 exch def + 0 3889 a 0 3889 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore + 0 3889 a 255 x +Fq(The)e Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h +(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g +(de\002ned,)h(all)f(unused)i(bits)0 4257 y(ha)n(v)o(e)g(to)g(be)f(set)h +(to)f(0:)136 4499 y Fk(\017)46 b Fp(SANE)p 452 4499 28 +4 v 31 w(PFLAG)p 758 4499 V 31 w(LAST)p 1009 4499 V 31 +w(FRAME)27 b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g +(if)g(and)h(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227 +4612 y(being)23 b(acquired)i(\(or)d(the)g(frame)g(that)g(will)g(be)g +(acquired)i(ne)o(xt)e(if)g(there)h(is)f(no)g(current)h(frame\))g(is)f +(the)g(last)g(frame)g(of)227 4725 y(a)g(multi)h(frame)g(image)g +(\(e.g.,)f(the)h(current)h(frame)f(is)f(the)h(blue)g(component)i(of)e +(a)f(red,)h(green,)g(blue)h(image\).)29 b(Note,)227 4838 +y(that)24 b(it)g(is)f(possible)j(to)d(transmit)i(multiple)g(images)f +(in)f(succession.)136 5019 y Fk(\017)46 b Fp(SANE)p 452 +5019 V 31 w(PFLAG)p 758 5019 V 31 w(MORE)p 1009 5019 +V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\))e(is)g(set)g(to)g +(1)f(to)h(indicate)i(further)f(pending)h(images.)40 b(It)26 +b(is)227 5132 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f(1)g +(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g(determined)i +(at)e(a)g(v)o(ery)g(early)h(time,)f(where)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 +5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 5151 a 1905 5381 +a Fq(31)p eop +%%Page: 32 33 +32 32 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 32 a 227 123 a Fq(it)21 +b(might)g(not)h(be)f(detectable,)i(if)e(there)h(actually)h(are)e(more)g +(images)h(to)f(transfer)h(\(e.g.)28 b(you)22 b(will)e(usually)j(not)e +(kno)n(w)227 236 y(if)31 b(the)h(document)h(feeder)g(contains)g +(further)g(pages)g(when)e(starting)i(to)f(scan)g(the)f(current)i(one.) +53 b(Thus)31 b(you)h(are)227 349 y(allo)n(wed)25 b(to)e(set)h(that)g +(bit)g(b)n(ut)g(later)g(f)o(ail)g(at)f Fp(sane)p 1808 +349 28 4 v 31 w(start\(\))p Fq(.)136 536 y Fk(\017)46 +b Fp(SANE)p 452 536 V 31 w(PFLAG)p 758 536 V 31 w(NEW)p +954 536 V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h +(to)g(1)f(to)h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g +(a)227 649 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g +(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group) +h(multi-image)227 762 y(scans.)136 949 y Fk(\017)46 b +Fp(SANE)p 452 949 V 31 w(PFLAG)p 758 949 V 31 w(BACKSIDE)18 +b Fq(\(bit)24 b(3,)e(bitv)n(alue)j(8\))e(tell)g(if)g(the)g(current)i +(image)e(w)o(as)g(acquired)i(from)e(the)g(front)h(\(0\))227 +1062 y(or)j(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g +(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n +(ws)g(to)f(group)227 1175 y(and)e(order)h(multi-image)g(transfers)h(re) +o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h +(\002rst/back)g(\002rst\).)0 1444 y(Note,)d(that)h(\003ags)e(is)h +(compatible)j(to)c(member)i Fp(last)p 1715 1444 V 31 +w(frame)18 b Fq(of)k Fp(SANE)p 2356 1444 V 31 w(Parameters)17 +b Fq(of)22 b(SANE)e(standard)k(v)o(ersion)0 1557 y(1)f(\(same)h(size)g +(and)g(only)g(bit)g(0)f(\(bitv)n(alue)j(1\))d(w)o(as)h(used)g(with)f +(same)h(function\).)0 1728 y(Member)33 b Fp(lines)d Fq(speci\002es)35 +b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.) +57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 +1841 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the) +h(frontend)h(should)g(call)f Fp(sane)p 2572 1841 V 31 +w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0 +1954 y Fp(SANE)p 225 1954 V 31 w(STATUS)p 586 1954 V +30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f(transferring)k +(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i(inband,)h(it)c(is)0 +2067 y(recommended)23 b(to)e(set)g(that)g(member)l(,)h(if)f(a)n(v)n +(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h(applicable,)i +(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0 2238 +y(Member)31 b Fp(bytes)p 618 2238 V 30 w(per)p 813 2238 +V 32 w(line)d Fq(speci\002es)k(the)f(number)h(of)f(bytes)h(that)f +(comprise)i(one)e(scan)g(line.)52 b(If)30 b(bytes)p 3585 +2238 V 35 w(per)p 3735 2238 V 34 w(line)0 2351 y(is)e(set)g(to)g(0,)g +(which)h(can)f(currently)i(only)f(be)f(the)g(case)h(for)f +Fp(SANE)p 2150 2351 V 31 w(FRAME)p 2456 2351 V 30 w(MIME)p +Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0 2464 +y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i(simply)e +(try)h(to)f(read)h(until)g Fp(SANE)p 2490 2464 V 31 w(STATUS)p +2851 2464 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h(block)0 +2576 y(length.)0 2747 y(Member)f Fp(depth)c Fq(speci\002es)27 +b(the)f(number)g(of)g(bits)g(per)g(sample.)35 b(Note,)26 +b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g(n*8)0 +2860 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23 b(with)h(other)g +(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6 +b(.)0 3031 y(Member)24 b Fp(pixels)p 666 3031 V 30 w(per)p +861 3031 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g +(that)g(comprise)h(one)f(scan)g(line.)0 3203 y(Assume)k +Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then) +h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f +Fp(depth)p Fq(\))e(and)0 3315 y(the)e(number)i(of)e(pix)o(els)h(per)f +(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h +Fp(pixels)p 2416 3315 V 30 w(per)p 2611 3315 V 31 w(line)p +Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 +3428 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h +Fp(bytes)p 1675 3428 V 31 w(per)p 1871 3428 V 31 w(line)p +Fq(\))d(as)j(follo)n(ws:)1214 3694 y Fh(c)i(>)p Fj(=)1445 +3550 y Fb(\()1554 3637 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p +Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 3750 +y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h +Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g +Fj(1)0 3956 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g +(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by) +f(the)g(right)g(side)g(of)0 4068 y(this)c(equation.)31 +b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f +(such)i(\223padded\224)h(image)e(formats.)0 4240 y(Member)f +Fp(channels)p 775 4240 V 29 w(per)p 969 4240 V 31 w(image)d +Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the)e(image)f(consists) +j(of.)j(When)23 b(the)g(image)0 4352 y(is)29 b(transmitted)i(in)e(more) +g(than)g(one)h(frame)f Fp(channels)p 1869 4352 V 29 w(per)p +2063 4352 V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g +(frames)h(for)f(this)0 4465 y(image.)0 4636 y(Member)d +Fp(format)p 668 4636 V 30 w(desc)e Fq(is)h(used)i(for)f(the)h(ne)n(w)e +(frametypes)j Fp(SANE)p 2310 4636 V 31 w(FRAME)p 2616 +4636 V 30 w(RAW)c Fq(and)j Fp(SANE)p 3212 4636 V 31 w(FRAME)p +3518 4636 V 30 w(MIME)p Fq(.)c(Its)0 4749 y(meaning)i(dif)n(fers)g +(between)f(the)g(tw)o(o)f(types:)136 5019 y Fk(\017)46 +b Fp(SANE)p 452 5019 V 31 w(FRAME)p 758 5019 V 31 w(RAW)p +Fq(:)26 b(The)h Fp(format)p 1503 5019 V 30 w(desc)e Fq(contains)30 +b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f(an)g(optional)227 +5132 y(depth)d(information)h(separated)g(by)e(a)f(colon\(:\).)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 5151 a 1905 +5381 a Fq(32)p eop +%%Page: 33 34 +33 33 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 32 a 227 123 a Fq(A)23 +b(plane)h(is)g(descibed)h(by)f(one)g(channel,)h(e.g.)k(\224)p +Fp(gray)p Fq(\224)21 b(or)j(\224)p Fp(gray:12)p Fq(\224.)227 +273 y(Channel)c(interlea)n(v)o(ed)h(data)d(is)g(described)j(by)d(a)g +(comma)g(separated)i(list)f(of)f(channel)i(descriptions,)i(e.g.)27 +b(\224)p Fp(red,green,blue)p Fq(\224)227 386 y(or)d(\224)p +Fp(red:8,green:8,b)o(lu)o(e:)o(8)p Fq(\224,)17 b(the)24 +b(channel)h(data)f(is)g(sent)g(in)f(the)h(gi)n(v)o(en)g(order)-5 +b(.)227 536 y(The)24 b(depth)i(information)h(does)e Fr(not)f +Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f(data,)g +(it)e(is)g(only)h(an)g(informa-)227 649 y(tion)f(for)g(the)g(frontend.) +31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f(the)h(size)g +(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227 799 y(W)-7 +b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p Fq(,)h +Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p Fq(.)55 +b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel)227 +912 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared)j +(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24 +b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1025 y(description)e(lik)o(e)e +Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g +(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h +(with)227 1138 y(usefull)f(colors.)227 1288 y(Note)30 +b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d +(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227 +1401 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f +(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27 +b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1514 y(is)e(prefered)i(to)e +(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d +(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227 +1627 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d +(de\002ned)i(in)e(member)h Fp(channels)p 2756 1627 28 +4 v 29 w(per)p 2950 1627 V 31 w(image)p Fq(.)136 1815 +y Fk(\017)46 b Fp(SANE)p 452 1815 V 31 w(FRAME)p 758 +1815 V 31 w(MIME)p Fq(:)27 b(The)i Fp(format)p 1561 1815 +V 30 w(desc)e Fq(contains)32 b(the)e(MIME)e(type/subtype)34 +b(*\(;parameter\))e(\002elds)e(as)227 1928 y(described)i(in)c(RFC)f +(1521,)k(4.)44 b(The)28 b(Content-T)-7 b(ype)31 b(Header)f(Field,)f +(without)h(the)f(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227 +2041 y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i +(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g +(possible,)k(please)227 2154 y(stick)28 b(to)f(the)h(IAN)m(A)d +(assigned)30 b(MIME)25 b(types,)k(and)f(mak)o(e)f(sure)h(the)f +(datastream)j(is)d(compliant)i(with)e(the)g(corre-)227 +2266 y(sponding)32 b(speci\002cation.)49 b(When)30 b(data)g(is)f +(transmitted)j(with)d(the)h(frame)g(type)g Fp(SANE)p +3051 2266 V 31 w(FRAME)p 3357 2266 V 30 w(MIME)d Fq(all)j(data)227 +2379 y(has)h(to)f(be)g(transmitted)j(within)d(one)h(frame,)h(multiple)f +(frames)g(are)f(not)h(allo)n(wed)g(\(so)f(the)h(\003ag)e +Fp(last)p 3601 2379 V 31 w(frame)227 2492 y Fq(has)24 +b(to)e(be)h(set)g(when)g(using)i(this)e(frame)g(type\).)30 +b(A)21 b(fully)j(compliant)h(SANE)20 b(back)o(end)26 +b(is)c(required)j(to)e(transmit)h(in)227 2605 y(either)29 +b(SANE)d(nati)n(v)o(e)i(frametypes,)j(or)d(in)g(a)f(MIME)g(type,)i(for) +g(which)f(a)f(con)l(v)o(erting)k(middleend)f(e)o(xists)f(and)f(is)227 +2718 y(freely)d(a)n(v)n(ailable)h(for)e(all)f(platforms.)227 +2868 y(Other)k(formats)g(may)g(be)f(transmitted,)k(b)n(ut)d(the)g(only) +g(thing)h(the)e(a)n(v)o(erage)j(frontend)f(can)f(do)g(with)f(them,)h +(is)g(sa)n(v)o(e)227 2981 y(them.)44 b(This)29 b(is)f(not)h(considered) +j(a)c(good)h(option,)j(as)c(it)h(does)g(not)g(f)o(acilitate)i +(transmitting)g(the)e(data)g(to)g(a)f(client)227 3094 +y(application)i(that)d(may)g(be)f(running)j(the)e(frontend.)40 +b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g(transferred)j(by)c(the)h +(back)o(end)i(is)e(not)227 3207 y(an)k(image)f(in)g(nature,)k(it)c(w)o +(ouldn')n(t)i(mak)o(e)e(sense)i(to)e(try)g(con)l(v)o(erting)k(it)c(an)o +(yw)o(ay)-6 b(,)32 b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227 +3320 y(simple)22 b Fp(SANE)p 715 3320 V 31 w(FRAME)p +1021 3320 V 31 w(MIME)c Fq(transfer)24 b(for)d(that)h(case.)29 +b(But)21 b(e)n(v)o(en)g(then,)h(try)g(to)f(stick)h(to)g(well)f(kno)n +(wn)g(stuf)n(f)h(with)227 3433 y(freely)j(e)o(xisting)g(standards)h +(and)e(vie)n(wers)h(as)e(well.)0 3704 y(The)g(member)g +Fp(proposed)p 929 3704 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e +(suggest)i(a)e(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o +(xtension)j(in)0 3817 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g +(such)h(a)e(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g +(database.)30 b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0 +3930 y(set)k(the)g(\002eld)f(to)g(\224\224.)0 4102 y(In)28 +b(the)h(case)g(of)f(non-MIME)h(frames,)h(this)f(is)f(e)o(xpected)j(to)d +(hold)h(the)g(basename)h(for)f(the)f(image,)i(with)e(the)h(e)o +(xtension)0 4215 y(determined)i(by)f(the)f(sa)n(v)o(e)h(function)h(of)e +(the)h(frontend,)i(as)e(the)f(frontend)i(can)f(fully)g(understand)i +(the)e(data)g(and)f(is)g(thus)0 4327 y(able)24 b(to)g(encode)h(it)e(in) +h(an)o(y)f(format)h(it)g(wishes.)0 4499 y(F)o(or)f(MIME)f(frames)i(it)f +(can)h(contain)h(either:)136 4770 y Fk(\017)46 b Fq(A)23 +b(name)h(with)g(a)g(leading)i(dot,)e(which)g(is)g(considered)j(to)d(be) +g(a)g(proposed)j(\002lename)d(e)o(xtension.)32 b(This)24 +b(could)i(also)227 4883 y(be)e(gotten)h(from)e(the)h(mime)f(database,)i +(b)n(ut)f(for)g(systems)h(lacking)g(it,)e(this)h(might)g(be)g(con)l(v)o +(enient.)32 b(Or:)136 5071 y Fk(\017)46 b Fq(A)23 b(complete)i +(\002lename,)e(including)j(e)o(xtension.)0 5091 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 5091 +a 0 5091 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 5091 a 0 5091 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 5091 a 1905 5381 a Fq(33)p +eop +%%Page: 34 35 +34 34 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 32 a 91 x Fq(Note,)31 +b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g(parse)g(a)f(gi)n(v) +o(en)i(MIME)d(type)i(internally)-6 b(,)34 b(it)29 b(is)g(perfectly)j +(permissible)g(to)0 236 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g +(the)g(proposed)i(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h +(basename,)h(when)f(using)g(internal)0 349 y(sa)n(v)o(e)g(algorithms)i +(for)d(dif)n(ferent)j(formats.)0 510 y(In)34 b(an)o(y)g(case,)k(if)c +(the)g(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f +(frontend)h(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0 +623 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g +(local)g(\002lesystem)h(restrictions.)0 785 y(Special)i(care)g(should)g +(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o +(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all) +g(path)0 898 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o +(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h +(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0 +1011 y(a)n(v)n(oiding)c(to)c(o)o(v)o(erwrite)i(e)o(xisting)h(\002les.)j +(\(Creating)d(of)e(leading)h(dot)g(\002les)e(-)g(lik)o(e)i(.rhosts)g(-) +e(is)h(not)g(an)g(issue)h(here,)f(because)0 1124 y(that')-5 +b(s)25 b(only)f(a)f(propose)j(\002lename)e(e)o(xtension)h(as)f +(mentioned)h(abo)o(v)o(e.)0 1285 y(The)j(string)h Fp(proposed)p +848 1285 28 4 v 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f(transmit)i +(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in)e(the)0 +1398 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of)n(fer)-5 +b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h(information)i +(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0 1511 +y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j +(enganged)f(\002lters,)f(etc.)0 1673 y(The)34 b(members)g +Fp(dpi)p 711 1673 V 32 w(x,)53 b(dpi)p 1071 1673 V 32 +w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h +(resolution.)63 b(Note,)37 b(that)d(multiple-image)0 +1786 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c +(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j +(resolution)g(between)0 1899 y(frames)24 b(of)g(the)f(same)h(image.)0 +2061 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g +(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h +(unchanged)j(when)c(future)0 2173 y(e)o(xtensions)j(are)e(done.)30 +b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e +(to)g(0.)2484 2173 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 2484 2173 a 2484 2173 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 2484 2173 +a 2484 2173 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 2484 2173 a 0 2467 a Fm(4.3.9)99 b Fc(sane)p +545 2467 30 4 v 35 w(start)0 2690 y Fq(This)23 b(function)j(initiates)g +(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i +(by)c(handle)i Fp(h)p Fq(.)227 2906 y Fp(SANE_Status)50 +b(sane_start)g(\(SANE_Handle)f(h\);)0 3121 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h +(status)g(codes.)227 3337 y Fp(SANE)p 452 3337 28 4 v +31 w(STATUS)p 813 3337 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 +b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g +Fp(sane)p 3297 3337 V 31 w(cancel)p Fq(.)227 3474 y Fp(SANE)p +452 3474 V 31 w(STATUS)p 813 3474 V 30 w(DEVICE)p 1173 +3474 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6 +b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5 +b(.)227 3612 y Fp(SANE)p 452 3612 V 31 w(STATUS)p 813 +3612 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g +(jammed.)227 3750 y Fp(SANE)p 452 3750 V 31 w(STATUS)p +813 3750 V 30 w(NO)p 953 3750 V 32 w(DOCS)p Fr(:)44 b +Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +3888 y Fp(SANE)p 452 3888 V 31 w(STATUS)p 813 3888 V +30 w(COVER)p 1118 3888 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4025 y Fp(SANE)p +452 4025 V 31 w(STATUS)p 813 4025 V 30 w(IO)p 953 4025 +V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 4163 y Fp(SANE)p +452 4163 V 31 w(STATUS)p 813 4163 V 30 w(NO)p 953 4163 +V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)0 4457 y Fm(4.3.10)99 +b Fc(sane)p 595 4457 30 4 v 35 w(read)0 4680 y Fq(This)19 +b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n +(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20 +b Fp(buf)e Fq(is)h(a)g(pointer)0 4793 y(to)27 b(a)g(memory)g(area)h +(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41 +b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f +Fp(*len)p Fq(.)37 b(A)0 4906 y(back)o(end)d(must)d(set)h(this)g(to)g +(zero)g(when)g(the)g(call)g(f)o(ails)g(\(i.e.,)h(when)f(a)f(status)i +(other)f(than)h Fp(SANE)p 3205 4906 28 4 v 30 w(STATUS)p +3565 4906 V 30 w(GOOD)c Fq(is)0 5019 y(returned\).)50 +b(When)29 b(the)h(call)h(succeeds,)i(the)d(number)g(of)g(bytes)h +(returned)g(can)f(be)g(an)o(ywhere)h(in)f(the)g(range)g(from)g(0)f(to)0 +5132 y Fp(maxlen)20 b Fq(bytes.)1905 5381 y(34)p eop +%%Page: 35 36 +35 35 bop 227 123 a Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f(h,) +54 b(SANE_Byte)c(*)55 b(buf,)1482 236 y(SANE_Int)c(maxlen,)g(SANE_Int)g +(*)j(len\);)0 482 y Fq(F)o(or)28 b(ef)n(\002cienc)o(y)i(reasons,)h +(medium)e(to)g(lar)n(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h +(fe)n(w)f(kilobytes\))j(should)g(be)d(used.)46 b(Re-)0 +595 y(turning)29 b(short)g(reads)g(is)e(allo)n(wed)i(to)e(allo)n(w)h +(for)g(small)g(b)n(uf)n(fers)h(in)e(the)h(back)o(end.)43 +b(If)28 b(this)g(function)i(is)d(called)i(when)f(no)0 +708 y(data)c(is)g(a)n(v)n(ailable,)h(one)f(of)g(tw)o(o)f(things)i(may)e +(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h(that)g(is)f(in)g(ef)n +(fect)i(for)f(handle)h Fp(h)p Fq(.)114 954 y(1.)45 b(If)24 +b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e(mode)g(\(the)h(def)o +(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f(at)f(least)h(one)g +(data)f(byte)h(is)227 1067 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g +(error)g(occurs\).)114 1255 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e +(in)h(non-blocking)j(I/O)c(mode,)k(the)d(call)g(returns)h(immediately)g +(with)e(status)i Fp(SANE)p 3656 1255 28 4 v 31 w(STA-)227 +1368 y(TUS)p 397 1368 V 32 w(GOOD)21 b Fq(and)j(with)f +Fp(*len)e Fq(set)j(to)f(zero.)0 1614 y(The)g(I/O)g(mode)h(of)f(handle)i +Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f(call)h(to)f Fp(sane)p +2024 1614 V 31 w(set)p 2220 1614 V 31 w(io)p 2361 1614 +V 32 w(mode\(\))p Fq(.)0 1786 y(This)g(function)j(may)d(f)o(ail)h(with) +g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +2032 y Fp(SANE)p 452 2032 V 31 w(STATUS)p 813 2032 V +30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j +(through)f(a)e(call)h(to)g Fp(sane)p 3297 2032 V 31 w(cancel)p +Fq(.)227 2178 y Fp(SANE)p 452 2178 V 31 w(STATUS)p 813 +2178 V 30 w(EOF)p Fr(:)45 b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n +(ailable)j(for)e(the)g(current)h(frame.)44 b(If)28 b +Fp(sane)p 3199 2178 V 31 w(read)e Fq(sends)427 2291 y(back)f(an)o(y)e +(image)h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g(return)g(with)g +Fp(SANE)p 2540 2291 V 31 w(STATUS)p 2901 2291 V 30 w(EOF)p +Fq(.)227 2437 y Fp(SANE)p 452 2437 V 31 w(STATUS)p 813 +2437 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g +(jammed.)227 2583 y Fp(SANE)p 452 2583 V 31 w(STATUS)p +813 2583 V 30 w(NO)p 953 2583 V 32 w(DOCS)p Fr(:)44 b +Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +2729 y Fp(SANE)p 452 2729 V 31 w(STATUS)p 813 2729 V +30 w(COVER)p 1118 2729 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 2876 y Fp(SANE)p +452 2876 V 31 w(STATUS)p 813 2876 V 30 w(IO)p 953 2876 +V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 3022 y Fp(SANE)p +452 3022 V 31 w(STATUS)p 813 3022 V 30 w(NO)p 953 3022 +V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 3168 y Fp(SANE)p +452 3168 V 31 w(STATUS)p 813 3168 V 30 w(ACCESS)p 1173 +3168 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h +(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 +3281 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3589 +y Fm(4.3.11)99 b Fc(sane)p 595 3589 30 4 v 35 w(cancel)0 +3822 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f +(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g +(operation)g(of)e(the)0 3934 y(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)227 4181 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);) +0 4427 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h +(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i +(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 4540 +y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f +(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j +(asynchronously)i(\(e.g.,)0 4653 y(from)37 b(within)g(a)f(signal)j +(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f +(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h +Fq(imply)0 4766 y(that)g(the)f(currently)i(pending)g(operation)h(has)d +(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e +(cancellation)i(has)d(been)0 4879 y Fl(initiated)p Fq(.)68 +b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d +(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0 +4992 y Fp(SANE)p 225 4992 28 4 v 31 w(STATUS)p 586 4992 +V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j +(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0 +5105 y(this)i(implies)h(that)f(a)f(frontend)i(must)f +Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g +(cancelled)i(operation)g(has)e(returned.)1905 5381 y(35)p +eop +%%Page: 36 37 +36 36 bop 0 123 a Fm(4.3.12)99 b Fc(sane)p 595 123 30 +4 v 35 w(set)p 810 123 V 35 w(io)p 965 123 V 35 w(mode)0 +350 y Fq(This)21 b(function)j(is)e(used)g(to)f(set)h(the)g(I/O)f(mode)h +(of)f(handle)i Fp(h)p Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i +(blocking)h(or)d(non-blocking.)0 463 y(If)i(ar)n(gument)j +Fp(m)c Fq(is)h Fp(SANE)p 833 463 28 4 v 31 w(TRUE)p Fq(,)e(the)j(mode)f +(is)h(set)g(to)f(non-blocking)28 b(mode,)23 b(otherwise)i(it')-5 +b(s)24 b(set)g(to)f(blocking)j(mode.)227 691 y Fp(SANE_Status)50 +b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 b(SANE_Bool)c(m\);)0 +920 y Fq(By)33 b(def)o(ault,)38 b(ne)n(wly)c(opened)h(handles)h +(operate)g(in)d(blocking)j(mode.)60 b(A)33 b(back)o(end)j(may)d(elect)i +(not)f(to)g(support)h(non-)0 1032 y(blocking)29 b(I/O)c(mode.)38 +b(In)26 b(such)h(a)f(case)h(the)f(status)i(v)n(alue)f +Fp(SANE)p 2107 1032 V 31 w(STATUS)p 2468 1032 V 30 w(UNSUPPORTED)20 +b Fq(is)27 b(returned.)39 b(Blocking)0 1145 y(I/O)32 +b(must)g(be)h(supported)i(by)d(all)h(back)o(ends,)k(so)32 +b(calling)i(this)f(function)i(with)d(ar)n(gument)i Fp(m)d +Fq(set)i(to)f Fp(SANE)p 3509 1145 V 31 w(FALSE)d Fq(is)0 +1258 y(guaranteed)e(to)c(complete)i(successfully)-6 b(.)0 +1424 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h +(follo)n(wing)h(status)g(codes:)227 1652 y Fp(SANE)p +452 1652 V 31 w(STATUS)p 813 1652 V 30 w(INVAL)p Fr(:)44 +b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227 +1794 y Fp(SANE)p 452 1794 V 31 w(STATUS)p 813 1794 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)0 2093 y Fm(4.3.13)99 b +Fc(sane)p 595 2093 30 4 v 35 w(get)p 810 2093 V 35 w(select)p +1205 2093 V 34 w(fd)0 2320 y Fq(This)25 b(function)j(is)e(used)g(to)g +(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d +(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 +2433 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h +(a)f(call)h(to)f Fp(sane)p 1850 2433 28 4 v 31 w(read\(\))d +Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29 +b(If)21 b(the)h(call)0 2546 y(completes)j(successfully)-6 +b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d +Fp(*fd)p Fq(.)227 2775 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 3003 y Fq(This)37 +b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g +Fp(sane)p 2056 3003 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed) +h(and)f(the)g(returned)0 3116 y(\002le-descriptor)j(is)c(guaranteed)k +(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h +(image)f(acquisition)j(\(i.e.,)g(un-)0 3229 y(til)e Fp(sane)p +339 3229 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 3229 +V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h +Fp(sane)p 2810 3229 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0 +3342 y Fp(SANE)p 225 3342 V 31 w(STATUS)p 586 3342 V +30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i +(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the) +0 3454 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p +962 3454 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h +Fp(SANE)p 2202 3454 V 31 w(STATUS)p 2563 3454 V 30 w(EOF)p +Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 3567 +y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f +(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p +3167 3567 V 31 w(read\(\))p Fq(.)0 3733 y(A)30 b(back)o(end)k(may)e +(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31 +b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0 +3846 y Fp(SANE)p 225 3846 V 31 w(STATUS)p 586 3846 V +30 w(UNSUPPORTED)p Fq(.)0 4012 y(Note)25 b(that)h(the)g(only)g +(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c +(a)g(host)i(operating-system)i(dependent)0 4125 y(test)23 +b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h +(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18 +b Fq(or)23 b Fp(poll\(\))0 4238 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f +(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l +(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0 +4351 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals) +f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g +(until)g(a)f(call)g(to)0 4464 y Fp(sane)p 225 4464 V +31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i +(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this) +g(operation)i(is)d(strongly)0 4577 y(encouraged)27 b(as)c(it)g(permits) +i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g +(acquisition)j(is)c(in)h(progress.)0 4742 y(This)f(function)j(may)d(f)o +(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227 +4971 y Fp(SANE)p 452 4971 V 31 w(STATUS)p 813 4971 V +30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.) +227 5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112 +V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)1905 5381 y(36)p eop +%%Page: 37 38 +37 37 bop 0 123 a Fm(4.3.14)99 b Fc(sane)p 595 123 30 +4 v 35 w(strstatus)0 356 y Fq(This)28 b(function)i(can)f(be)f(used)h +(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i +(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 469 +y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h +(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f +(\(full-stop\).)32 b(The)22 b(function)j(is)0 582 y(guaranteed)k(to)c +(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g +(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this) +g(function)h(is)0 695 y(performed.)227 941 y Fp(const)53 +b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g +(status\);)0 1292 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0 +1558 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i +(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b +Fp(sane)p 2797 1558 28 4 v 31 w(init\(\))17 b Fq(and)22 +b Fp(sane)p 3547 1558 V 31 w(exit\(\))0 1671 y Fq(initialize)j(and)d(e) +o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31 +b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f +(initialization)j(and)d(before)0 1784 y(e)o(xiting)i(the)f(back)o(end.) +536 4453 y @beginspecial 0 @llx 0 @lly 601 @urx 542 @ury +3060 @rhi @setspecial +%%BeginDocument: figs/flow.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: flow.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Tue Dec 3 22:09:10 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 601 542 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-161.0 577.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr +% Polyline +n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr +% Polyline +n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr +% Polyline +n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 6600 m +gs 1 -1 sc (image acquisition) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 3825 m +gs 1 -1 sc (device setup) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 7515 m +gs 1 -1 sc (- go back to) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5775 7515 m +gs 1 -1 sc (sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +7275 7515 m +gs 1 -1 sc (if more frames desired) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 3300 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 5100 m +gs 1 -1 sc (- sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 4500 m +gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 4080 m +gs 1 -1 sc (sane_control_option\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 3600 m +gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 5700 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 6900 m +gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6000 m +gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6450 m +gs 1 -1 sc (sane_read\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 8100 m +gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 1200 m +gs 1 -1 sc (- sane_init\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 9300 m +gs 1 -1 sc (- sane_exit\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +3600 1800 m +gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 2700 m +gs 1 -1 sc (- sane_open\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 8700 m +gs 1 -1 sc (- sane_close\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4800 2175 m +gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1549 4649 a(Figure)h(4.1:)k(Code)23 b(\003o)n(w)0 +4961 y(Function)k Fp(sane)p 573 4961 V 31 w(get)p 769 +4961 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h +(after)g Fp(sane)p 2572 4961 V 31 w(init\(\))c Fq(has)k(been)h(called.) +36 b(It)26 b(returns)0 5074 y(the)32 b(list)f(of)h(the)f(de)n(vices)i +(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 +b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)1905 +5381 y(37)p eop +%%Page: 38 39 +38 38 bop 0 123 a Fq(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n +(f)h(or)f(a)f(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g +(dif)n(ferent)h(calls.)30 b(It)21 b(should)j(be)0 236 +y(noted)i(that)f(this)g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n +(w)d(since)h(it)g(requires)h(contacting)h(all)e(con\002gured)h(de)n +(vices)g(\(some)f(of)0 349 y(which)h(may)f(be)h(on)g(remote)g(hosts\).) +36 b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i +(the)f(ability)h(for)f(a)f(user)i(to)e(directly)0 462 +y(select)g(a)e(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h +(to)g(this)g(function.)0 633 y(Once)e(a)g(de)n(vice)h(has)g(been)g +(chosen,)h(it)e(is)g(opened)i(using)f(a)f(call)g(to)h +Fp(sane)p 2352 633 28 4 v 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices) +f(can)g(be)f(open)h(at)0 746 y(an)o(y)i(gi)n(v)o(en)h(time.)34 +b(A)24 b(SANE)f(back)o(end)k(must)f(not)f(impose)h(arti\002cial)h +(constraints)h(on)e(ho)n(w)e(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 +859 y(at)e(an)o(y)h(gi)n(v)o(en)g(time.)0 1031 y(An)f(opened)i(de)n +(vice)g(can)f(be)f(setup)i(through)g(the)f(corresponding)k(de)n(vice)d +(handle)g(using)f(functions)j Fp(sane)p 3460 1031 V 30 +w(get)p 3655 1031 V 32 w(opt-)0 1144 y(ion)p 170 1144 +V 31 w(descriptor\(\))k Fq(and)38 b Fp(sane)p 1280 1144 +V 31 w(control)p 1696 1144 V 29 w(option\(\))p Fq(.)66 +b(While)37 b(setting)i(up)e(a)g(de)n(vice,)42 b(obtaining)e(option)0 +1256 y(descriptors)d(and)e(setting)h(and)f(reading)h(of)e(option)i(v)n +(alues)g(can)e(be)h(mix)o(ed)f(freely)-6 b(.)62 b(It)34 +b(is)g(typical)i(for)f(a)f(frontend)i(to)0 1369 y(read)g(out)f(all)h(a) +n(v)n(ailable)h(options)g(at)e(the)h(be)o(ginning)h(and)f(then)g(b)n +(uild)h(a)d(dialog)j(\(either)g(graphical)g(or)e(a)g(command-)0 +1482 y(line)27 b(oriented)i(option)g(list\))e(that)g(allo)n(ws)g(to)g +(control)i(the)e(a)n(v)n(ailable)i(options.)40 b(It)27 +b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0 1595 +y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29 +b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f +(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0 +1708 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary) +h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34 +b(While)24 b(setting)i(up)0 1821 y(the)i(de)n(vice,)h(it)e(is)g(also)h +(admissible)h(to)e(call)h Fp(sane)p 1655 1821 V 31 w(get)p +1851 1821 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i +(of)e(what)g(the)h(image)0 1934 y(parameters)e(will)d(look)h(lik)o(e)g +(once)h(image)f(acquisition)i(be)o(gins.)0 2106 y(The)36 +b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e +(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p +3186 2106 V 31 w(set)p 3382 2106 V 31 w(io)p 3523 2106 +V 32 w(mode\(\))p Fq(.)0 2218 y(De)n(vices)30 b(are)f(required)i(to)e +(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g(mode\),) +h(b)n(ut)e(support)i(for)e(non-blocking)0 2331 y(I/O)23 +b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d(such)h(as)e +(UNIX.)0 2503 y(After)g(the)g(de)n(vice)g(is)g(setup)h(properly)-6 +b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f(a)f(call)h(to) +g Fp(sane)p 3077 2503 V 30 w(start\(\))p Fq(.)i(The)d(back-)0 +2616 y(end)33 b(calculates)h(the)f(e)o(xact)f(image)h(parameters)h(at)e +(this)g(point.)56 b(So)31 b(future)i(calls)g(to)f Fp(sane)p +3023 2616 V 31 w(get)p 3219 2616 V 31 w(parameters\(\))0 +2729 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h +(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i +(starts)f(at)f(this)0 2842 y(point)41 b(or)e(during)i(the)e(\002rst)h +(call)f(to)h Fp(sane)p 1450 2842 V 31 w(read\(\))35 b +Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking) +44 b(I/O)0 2955 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e +(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h +Fp(sane)p 2949 2955 V 31 w(set)p 3145 2955 V 31 w(io)p +3286 2955 V 32 w(mode\(\))c Fq(and/or)0 3068 y Fp(sane)p +225 3068 V 31 w(get)p 421 3068 V 31 w(select)p 782 3068 +V 30 w(fd\(\))c Fq(at)i(this)h(point.)30 b(Either)24 +b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f(the)h(back)o(end)h +(does)g(not)e(support)0 3180 y(the)h(requested)i(operation.)0 +3200 y + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 3200 a 0 3200 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 3200 a 152 x Fq(Image)k(data)h(is)f +(collected)i(by)e(repeatedly)j(calling)f Fp(sane)p 1914 +3352 28 4 v 30 w(read\(\))27 b Fq(until)k(this)f(function)i(will)e +(return)h(an)f(end-of-\002le)0 3465 y(status)40 b(\()p +Fp(SANE)p 500 3465 V 31 w(STATUS)p 861 3465 V 30 w(EOF)p +Fq(\).)c(This)i(indicates)j(the)e(end)g(of)f(the)h(current)h(frame.)74 +b(If)38 b(the)g(frontend)j(e)o(xpects)f(ad-)0 3578 y(ditional)e(frames) +f(\(e.g.,)h(the)e(indi)n(vidual)j(channels)f(of)e(a)g(red/green/blue)k +(image)d(or)e(multiple)j(images\),)i(it)35 b(can)i(call)0 +3691 y Fp(sane)p 225 3691 V 31 w(start\(\))20 b Fq(again.)31 +b(If)24 b(the)h Fp(SANE)p 1349 3691 V 31 w(PFLAG)p 1655 +3691 V 30 w(LAST)p 1905 3691 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g +Fp(flags)p Fq(,)d(the)k(current)h(image)e(is)g(com-)0 +3804 y(plete.)60 b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38 +b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 3804 +V 31 w(PFLAG)p 2715 3804 V 31 w(MORE)p 2966 3804 V 31 +w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 3917 y(further)e(calls)e +(to)g Fp(sane)p 794 3917 V 31 w(start\(\))c Fq(can)30 +b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30 +b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 4030 y(be)f(set)g(at)f +(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g +(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d +(no)0 4142 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.) +34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set) +f(this)h(bit,)g(and)g(then)g(later)0 4255 y(at)33 b(the)g(actual)h +(call)f(to)f Fp(sane)p 980 4255 V 31 w(start\(\))d Fq(return)34 +b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 4255 V 31 w(STATUS)p +2749 4255 V 30 w(NO)p 2889 4255 V 31 w(DOCS)p Fq(.)c(Such)j(a)f +(sequence)j(is)0 4368 y(permitted)27 b(to)f(transmit)h(multiple)g +(images)g(from)e(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j +(pages.)36 b(This)26 b(beha)n(viour)j(should)0 4481 y(be)21 +b(controlled)i(by)e(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n +(w)h(single-page)i(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 +4594 y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g +(all)d(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p +2933 4594 V 31 w(PFLAG)p 3239 4594 V 31 w(LAST)p 3490 +4594 V 30 w(FRAME)e Fq(on)0 4707 y(and)29 b Fp(SANE)p +384 4707 V 31 w(PFLAG)p 690 4707 V 31 w(MORE)p 941 4707 +V 31 w(IMAGES)c Fq(of)n(f)k(is)f(encountered,)34 b(or)28 +b(an)h(error)h(other)g(than)f Fp(SANE)p 3085 4707 V 31 +w(STATUS)p 3446 4707 V 30 w(EOF)e Fq(occurs)0 4820 y(in)21 +b(a)g(SANE)e(function.)30 b(Note)21 b(that)h Fp(SANE)p +1342 4820 V 31 w(STATUS)p 1703 4820 V 30 w(NO)p 1843 +4820 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)o(ay)f(for)h(the) +f(back)o(end)j(to)d(indicate)0 4933 y(the)j(end)g(of)f(a)g(multiple)i +(image)f(scan.)0 5104 y(A)c(frontend)k(may)d(choose)i(to)e(skip)i +(frames)f(\(e.g.)28 b(because)23 b(it)e(cannot)i(parse)g(them\),)e +(which)h(is)f(accomplished)k(by)c(simply)0 5124 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 5124 +a 0 5124 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 5124 a 0 5124 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 5124 a 1905 5381 a Fq(38)p +eop +%%Page: 39 40 +39 39 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 32 a 91 x Fq(calling)30 +b Fp(sane)p 500 123 28 4 v 31 w(start)25 b Fq(again,)30 +b(which)f(will)f(get)h(you)g(to)f(the)h(ne)o(xt)f(frame,)i(without)f +(ha)n(ving)i(to)d(read)h(and)g(discard)h(the)0 236 y(current)25 +b(one.)0 407 y(In)d(order)h(to)f(prematurely)i(stop)f(scanning)h(and)f +(to)e(reset)i(the)f(back)o(end)j(state,)d Fp(sane)p 2707 +407 V 31 w(cancel\(\))c Fq(can)k(be)g(called)h(at)f(an)o(y)0 +520 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d(well)h(after)g +(normal)g(termination)i(of)e(a)f(multiple)h(image)g(scan)h(as)e +(described)j(abo)o(v)o(e.)0 692 y(When)33 b(done)g(using)g(the)g(de)n +(vice,)i(the)e(handle)h(should)g(be)e(closed)i(by)e(a)g(call)h(to)f +Fp(sane)p 2875 692 V 31 w(close\(\))p Fq(.)51 b(Finally)-6 +b(,)35 b(before)0 805 y(e)o(xiting)e(the)f(application,)37 +b(function)d Fp(sane)p 1443 805 V 31 w(exit\(\))29 b +Fq(must)j(be)g(called.)55 b(It)31 b(is)h(important)i(not)e(to)g(for)n +(get)h(to)f(call)h(this)0 918 y(function)26 b(since)e(otherwise)h(some) +f(resources)i(\(e.g.,)d(temporary)i(\002les)f(or)f(locks\))i(may)e +(remain)i(unclaimed.)0 1089 y(The)e(follo)n(wing)i(C)d(sample)j(code)f +(implements)h(a)e(reference)j(loop)e(for)g(acquiring)i(multiple)f +(images:)0 1361 y Fp(SANE_Parameters)48 b(parms;)0 1474 +y(SANE_Status)268 b(status;)0 1699 y(do)0 1812 y({)109 +1925 y(do)109 2038 y({)218 2151 y(/*)54 b(Now)f(start)f(acquiring)f +(the)i(next)g(frame.)e(*/)218 2264 y(status=sane_sta)o(rt)o(\(ha)o(nd)o +(le)o(\);)218 2490 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h +(problem,)d(and)i(no)h(more)e(frames)g(can)h(be)273 2603 +y(*)h(read)f(at)g(this)g(time.)f(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o +(GE)o(S)49 b(still)273 2716 y(*)54 b(being)e(clear,)g(this)h(will)f +(break)h(out)g(of)g(_BOTH_)f(loops.)273 2828 y(*/)218 +2941 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48 +b(break;)218 3167 y(/*)54 b(Now)f(let)g(us)h(see)f(what)g(the)g(next)g +(frame)f(brings.)f(*/)218 3280 y(status=sane_get)o(_p)o(ara)o(me)o(te)o +(rs)o(\(h)o(and)o(le)o(,&)o(pa)o(rm)o(s\);)218 3506 y(/*)j(This)f +(actually)d(should)i(not)h(fail,)g(but)g(maybe)f(the)h(doc)h(feeder)273 +3619 y(*)g(jammed)e(or)h(something,)d(so)k(we)g(break)e(as)h(well,)g +(if)g(something)273 3732 y(*)h(is)f(wrong.)273 3845 y(*/)218 +3958 y(if)h(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48 +b(break;)218 4183 y(/*)54 b(Now)f(we)h(check)e(the)h(announced)e +(parameters,)e(if)54 b(we)f(can)h(make)e(use)273 4296 +y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g +(the)g(next)g(frame.)273 4409 y(*/)218 4522 y(if)h(\()g +(do_i_like_that\()o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;) +218 4748 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle) +g(filenames,)273 4861 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e +(files,)i(ask)h(user)273 4974 y(*)h(for)f(confirmation,)c(...)273 +5087 y(*/)0 5094 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 5094 a 0 5094 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 5094 a 0 5094 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 5094 a 1905 5381 a Fq(39)p eop +%%Page: 40 41 +40 40 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 32 a 218 123 a Fp(setup_for_trans)o +(fe)o(r\(.)o(..)o(\);)218 349 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f +(frame)f(data)h(and)g(process)f(it.)h(This)g(should)273 +462 y(*)h(return)e(SANE_STATUS_GO)o(OD)o(,)c(until)53 +b(the)g(frame)f(is)i(complete,)273 574 y(*)g(what)f(causes)e +(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273 687 y(*/)218 +800 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54 b(\()g(status=sane_rea)o +(d\()o(..)o(.\))48 b(\))54 b(\))545 913 y(read_in_and_proc)o(es)o(s_)o +(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)o(\(\))o(;)218 1139 +y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f(anything)e(but)i(EOF,) +g(break)f(out.)h(*/)218 1252 y(if)h(\(status)d(!=)j(SANE_STATUS_EO)o +(F\))48 b({)436 1365 y(break;)218 1478 y(})218 1704 y(/*)54 +b(Now)f(loop)g(until)f(we)i(have)e(all)i(frames)d(of)j(an)g(image.)d +(*/)109 1817 y(})j(while\(!\(parms.f)o(la)o(g)49 b(&)54 +b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0 2042 y(/*)g(O.K.)e(-)i +(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h(it)h(together,)c(save) +j(it,)55 2155 y(*)h(flush)e(buffers,)f(transmit)g(it,)i(increment)d +(filenames,)g(etc.)55 2268 y(*/)0 2494 y(/*)k(Now)f(check)f(for)h(more) +g(pending)e(images.)h(If)h(we)h(have)f(more,)f(redo)h(from)f(start.)55 +2607 y(*)i(Some)e(backends)f(might)i(cheat)f(here)h(and)g(send)f(us)i +(for)f(an)h(extra)e(round)g(which)55 2720 y(*)i(will)e(fail)h(at)h +(sane_start,)49 b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c +(if)k(they)55 2833 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start) +f(of)i(the)f(last)g(frame)f(we)i(read.)55 2946 y(*/)0 +3059 y(})g(while\(parms.fla)o(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA) +o(GE)o(S\);)0 3284 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h +(backend)e(and)j(go)f(back)g(to)h(option-control)55 3397 +y(*)g(loop.)55 3510 y(*/)0 3736 y(sane_cancel\(han)o(dl)o(e\))o(;)0 +3847 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 3847 a 0 3847 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 3847 a 0 3847 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 3847 a 340 +x Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31 b(Options)0 4453 +y Fq(While)c(most)f(back)o(end)j(options)f(are)f(completely)i +(self-describing,)i(there)c(are)g(a)f(cases)h(where)g(a)f(user)h +(interf)o(ace)i(might)0 4566 y(w)o(ant)24 b(to)g(special-case)k(the)c +(handling)j(of)d(certain)i(options.)32 b(F)o(or)24 b(e)o(xample,)h(the) +f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g(four)0 +4678 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e +(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33 +b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 4791 y(w)o(ould)25 +b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g +(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will) +d(w)o(ant)h(to)0 4904 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g +(\(lo)n(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h +(or)d(a)h(high\(er\))h(resolution)i(scan)d(of)0 5017 +y(a)h(subpart)i(of)e(the)g(scanner)i(surf)o(ace\))h(and)d(let)h(the)f +(user)h(pick)g(the)f(scan)h(area)g(by)f(dragging)j(a)d(rectangle)i +(into)f(the)f(desired)1905 5381 y(40)p eop +%%Page: 41 42 +41 41 bop 0 123 a Fq(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f +(SANE)e(API)g(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e +(that)g(ha)n(v)o(e)h(well-de\002ned)0 236 y(meanings.)0 +539 y Fm(4.5.1)99 b(Option)25 b(Number)h(Count)0 769 +y Fq(Option)e(number)h(0)e(has)h(an)f(empty)h(string)h(as)e(its)h +(name.)29 b(The)23 b(v)n(alue)h(of)g(this)g(option)h(is)e(of)g(type)i +Fp(SANE)p 3306 769 28 4 v 30 w(TYPE)p 3556 769 V 31 w(INT)d +Fq(and)0 882 y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g +(options)h(a)n(v)n(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the) +f(count)g(includes)i(option)e(number)h(0\).)0 995 y(This)23 +b(means)h(that)f(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d +(number)h(of)f(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d +(either)i(c)o(ycle)0 1108 y(through)h(all)d(option)i(numbers)g +(starting)h(at)d(one)h(until)h Fp(sane)p 1963 1108 V +31 w(get)p 2159 1108 V 31 w(option)p 2520 1108 V 30 w(descriptor\(\))17 +b Fq(returns)25 b Fp(NULL)p Fq(,)c(or)j(a)0 1220 y(frontend)i(can)e +(directly)h(read)f(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 +1524 y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 +1605 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 1605 a 0 1605 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 1605 a 149 x Fq(Option)33 +b Fp(resolution)28 b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j +(at)c(which)i(an)e(image)h(should)i(be)d(acquired.)59 +b(When)33 b(the)0 1866 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g +(dif)n(ferent)j(v)n(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h +(to)f(de\002ne)h(the)g(options)h Fp(x)p 3327 1866 28 +4 v 33 w(resolution)0 1979 y Fq(and)40 b Fp(y)p 230 1979 +V 33 w(resolution)p Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i +Fp(resolution)34 b Fr(or)40 b Fq(the)g(options)i Fp(x)p +3142 1979 V 32 w(resolution)34 b Fr(and)0 2092 y Fp(y)p +60 2092 V 32 w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0 +2261 y(The)k(type)h(of)g(this)g(option)h(is)e(either)i +Fp(SANE)p 1417 2261 V 31 w(TYPE)p 1668 2261 V 31 w(INT)c +Fq(or)j Fp(SANE)p 2212 2261 V 31 w(TYPE)p 2463 2261 V +31 w(FIXED)p Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460 +2261 V 30 w(UNIT)p 3710 2261 V 31 w(DPI)0 2374 y Fq(\(dots/inch\).)0 +2542 y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2655 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 2655 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + +955 2655 a 955 2655 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 955 2655 a 955 2655 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 955 2655 +a 0 2958 a Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0 +3188 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f +(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g +(acquisition)j(should)0 3301 y(be)e(optimized)i(for)e(speed,)i(rather)g +(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41 +b(When)27 b(set)g(to)g Fp(SANE)p 3003 3301 28 4 v 31 +w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 3414 y(in)e(ef)n(fect,)g +(when)g(set)g(to)g Fp(SANE)p 1012 3414 V 31 w(FALSE)d +Fq(image)j(acquisition)j(should)f(proceed)f(in)f(normal)h(quality)g +(mode.)33 b(The)25 b(setting)0 3527 y(of)c(this)h(option)h +Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e(other)i(option.)29 +b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f +(concerned,)i(the)e(pre)n(vie)n(w)0 3640 y(mode)i(is)g(completely)i +(side)e(ef)n(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that) +f(the)g(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0 +3753 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f +(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e +(free)h(to)f(o)o(v)o(erride)0 3865 y(the)j Fp(resolution)21 +b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h +(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice) +g(to)f(the)0 3978 y(frontend)35 b(where)n(v)o(er)e(possible.)1081 +3899 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 1081 3899 a 1081 3899 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 1081 3899 a 79 x Fq(When)f(the)h +Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f +(transfer)g(the)f(image)f(in)0 4091 y(frame)24 b(type)g +Fp(SANE)p 639 4091 28 4 v 31 w(FRAME)p 945 4091 V 30 +w(RAW)e Fq(if)h(possible.)1584 4091 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 1584 4091 a 1584 +4091 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 1584 4091 a 1584 4091 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 1584 4091 a 0 4260 a Fq(This)j(option)i +(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 4373 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +4676 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 4906 +y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g(are)f +(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29 +b(The)22 b(scan)i(area)f(is)f(de\002ned)0 5019 y(by)h(tw)o(o)f(points)j +(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e +(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0 +5132 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e +(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e +(the)h(scan)g(surf)o(ace)h(as)1905 5381 y(41)p eop +%%Page: 42 43 +42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221 +@urx 205 @ury 1836 @rhi @setspecial +%%BeginDocument: figs/area.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: area.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Wed Dec 4 19:19:37 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 221 205 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-59.0 231.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% Polyline +n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr +/Helvetica findfont 180.00 scalefont setfont +2550 2302 m +gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +7.500 slw +% Polyline +n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr +n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr +n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3375 3150 m +gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1500 m +gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2700 1050 m +gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1050 3600 m +gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +4425 525 m +gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1080 585 m +gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 1725 1650 m 1725 1800 l gs col-1 s gr +% Polyline +n 1650 1725 m 1800 1725 l gs col-1 s gr +% Polyline +n 3375 2700 m 3375 2850 l gs col-1 s gr +% Polyline +n 3300 2775 m 3450 2775 l gs col-1 s gr +15.000 slw +% Polyline +n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23 +b(area)h(options)0 2132 y(seen)h(by)g(the)g(sensor)h(\(which)f +(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i(surf)o(ace)g +(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 b(this)h(reason,)0 +2245 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i(for)e(which)g(the) +g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f(simultaneously)k(the)c +Fl(smallest)0 2358 y Fq(and)f(the)f(bottom-right)k(corner)d(is)g(the)f +(corner)i(for)f(which)f(the)h(abscissa)h(and)f(ordinate)i(v)n(alues)e +(are)g(simulatenously)j(the)0 2471 y Fl(lar)m(g)o(est)p +Fq(.)h(If)22 b(this)i(coordinate)h(system)f(is)f(not)g(natural)h(for)f +(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g(the)g(job)g(of)f(the)h(back)o +(end)i(to)e(perform)h(the)0 2584 y(necessary)i(con)l(v)o(ersions.)0 +2754 y(The)d(names)h(of)g(the)f(four)i(options)g(that)f(de\002ne)g(the) +g(scan)g(area)g(are)g(gi)n(v)o(en)g(in)f(the)h(table)h(belo)n(w:)1200 +2991 y Fr(Name)100 b(Description)1200 3104 y Fp(tl-x)107 +b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue)1200 +3217 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n +(alue)1200 3330 y Fp(br-x)107 b Fq(Bottom-right)25 b +Fh(x)e Fq(coordinate)j(v)n(alue)1200 3443 y Fp(br-y)107 +b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0 +3677 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e +(follo)n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g +(options:)136 3919 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h +(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p +2091 3919 28 4 v 31 w(UNIT)p 2342 3919 V 31 w(PIXEL)p +Fq(\))20 b(or)k(millimeters)h(\()p Fp(SANE)p 3484 3919 +V 31 w(UNIT)p 3735 3919 V 31 w(MM)p Fq(\))227 4032 y(to)f(these)g +(options.)31 b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h +(identical.)136 4219 y Fk(\017)46 b Fq(Whene)n(v)o(er)25 +b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h +(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136 +4406 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g +(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h +(options)h(ha)n(v)o(e)f(range)227 4518 y(constraints)i(associated.)51 +b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f +(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 4631 +y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f +(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o +(ace)g(size.)136 4818 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o +(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i +(missing.)136 5005 y Fk(\017)46 b Fq(A)21 b(frontend)i(may)f +(temporarily)i(set)d(the)h(v)n(alues)h(in)e(a)g(w)o(ay)h(that)g +Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f Fp(br-x)d Fq(and)j +Fp(tl-y)d Fq(is)j(lar)n(ger)227 5118 y(than)j Fp(br-y)p +Fq(.)1905 5381 y(42)p eop +%%Page: 43 44 +43 43 bop 0 123 a Fm(4.5.5)99 b(Depth)26 b(option)0 204 +y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 204 a 0 204 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 204 a 146 x Fq(Option)k Fp(depth)c +Fq(is)k(used)g(to)f(select)i(the)e(image)h(depth)h(in)e(bits/sample)j +(in)d(multi)h(bit)f(mode)h(-)f(\(this)h(means)g(for)g(24)f(bit)0 +463 y(r)n(gb)23 b(mode)g(this)g(v)n(alue)g(must)f(be)h(8\).)28 +b(The)22 b(type)h(of)g(this)g(option)h(is)e Fp(SANE)p +2319 463 28 4 v 31 w(TYPE)p 2570 463 V 31 w(INT)p Fq(.)e(The)i(unit)h +(is)f Fp(SANE)p 3437 463 V 31 w(UNIT)p 3688 463 V 31 +w(BIT)p Fq(.)0 576 y(F)o(or)h(1)g(bit)h(modes)g(\(Lineart)g(or)g +(Halftone\))h(this)f(option)h(has)f(to)f(be)h(inacti)n(v)o(e.)30 +b(F)o(or)22 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0 +689 y(Halftone\))h(the)f(back)o(end)i(should)f(use)f(the)g(well-kno)n +(wn)g(option)h Fp(mode)p Fq(.)0 968 y(This)h(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +1081 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1194 +y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 1194 a 0 1194 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 1194 a 0 1194 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 1194 a 300 x +Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 1576 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 1576 +a 0 1576 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 1576 a 145 x Fq(The)30 b Fp(gamma-table)24 +b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 1721 +28 4 v 31 w(CONSTRAINT)p 2225 1721 V 29 w(RANGE)d Fq(of)j(the)h(type)g +Fp(SANE)p 3208 1721 V 31 w(TYPE)p 3459 1721 V 31 w(INT)d +Fq(which)0 1834 y(represent)c(the)d(gamma)g(correction)j(table)e(for)g +(gray)-6 b(.)28 b(In)22 b(color)g(mode)f(the)h Fp(gamma-table)15 +b Fq(may)21 b(be)h(used)g(to)f(set)g(a)g(com-)0 1947 +y(mon)d(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28 +b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12 +b Fp(green-gamma-tab)o(le)0 2060 y Fq(and)32 b Fp(blue-gamma-table)24 +b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g +(correction)k(for)d(each)h(color)g(separately)-6 b(.)0 +2173 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h +(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f +Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 2286 y Fp(blue-gamma-tabl)o(e)19 +b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options) +h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0 +2399 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f +(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h +(reduce)g(\(if)0 2512 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g +(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45 +b(This)29 b(should)h(e.g.)44 b(look)0 2625 y(lik)o(e)24 +b(this:)0 2854 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o +(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 2967 y(green_value)c(=)k +(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\)) +o(\))0 3080 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o +(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 3309 y Fq(The)24 +b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e +(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h +(shado)n(w)-6 b(,)0 3422 y(contrast,)24 b(brightness,)i(threshold,)f +(analog)p 1379 3422 V 35 w(gamma.)j(These)22 b(functions)j(are)e +(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0 +3535 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0 +3814 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3927 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4039 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 +4039 a 0 4039 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 4039 a 0 4039 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 4039 a 301 x Fm(4.5.7)99 +b(Scan)26 b(Mode)f(options)0 4421 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 4421 a 0 4421 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + +0 4421 a 146 x Fq(The)d(option)i Fp(mode)19 b Fq(de\002nes)k(a)f +Fp(SANE)p 1222 4567 28 4 v 31 w(CONSTRAINT)p 1803 4567 +V 28 w(STRING)p 2161 4567 V 30 w(LIST)e Fq(of)i(type)h +Fp(SANE)p 2926 4567 V 31 w(TYPE)p 3177 4567 V 31 w(STRING)p +Fq(.)18 b(It)k(is)g(used)0 4680 y(to)34 b(select)i(the)e(scanmode)i +(\(e.g.)61 b(Color)34 b(or)g(Gray\).)61 b(W)-7 b(ell)34 +b(kno)n(wn)h(modes)g(are:)50 b Fp(Color)p Fq(,)34 b Fp(Gray)p +Fq(,)g Fp(Halftone)c Fq(and)0 4793 y Fp(Lineart)p Fq(.)46 +b Fp(Color)27 b Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g +(or)f(16)h(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 +b Fp(Lineart)c Fq(are)0 4906 y(single)e(bit)f(modes.)0 +5019 y(This)f(w)o(ay)h(a)f(frontend)i(can)f(select)h(e.g)e(the)h(mode)g +Fp(Gray)d Fq(for)j(scanning)h(a)f(f)o(ax.)0 5132 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 +5132 a 0 5132 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 5132 a 0 5132 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 5132 a 1905 5381 +a Fq(43)p eop +%%Page: 44 45 +44 44 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 32 a 91 x Fq(This)26 +b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o +(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e +(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +349 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 349 a 0 349 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 349 a 0 349 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 349 a 308 x Fm(4.5.8)99 +b(Scan)26 b(Sour)n(ce)g(options)0 738 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 738 a 0 738 +a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 738 a 152 x Fq(The)36 b(option)j Fp(source)33 b Fq(is)k(used)h(to)f +(select)h(the)f(scansource)j(\(e.g.)69 b(Automatic)38 +b(Document)g(Feeder\).)69 b(It)37 b(de\002nes)h(a)0 1002 +y Fp(SANE)p 225 1002 28 4 v 31 w(CONSTRAINT)p 806 1002 +V 28 w(STRING)p 1164 1002 V 30 w(LIST)20 b Fq(of)j(type)g +Fp(SANE)p 1930 1002 V 31 w(TYPE)p 2181 1002 V 31 w(STRING)p +Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b +Fp(Flatbed)p Fq(,)0 1115 y Fp(Transparancy)49 b(Adapter)20 +b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0 +1400 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1513 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1626 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 +1626 a 0 1626 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 1626 a 0 1626 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 1626 a 308 x Fm(4.5.9)99 +b(Thr)n(eshold)0 1996 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 1996 a 0 1996 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 1996 a 171 +x Fq(The)29 b(option)j Fp(threshold)25 b Fq(is)30 b(used)g(to)g +(de\002ne)h(the)f(threshold)i(for)e(Lineart)h(and)f(may)g(be)g +(Halftone)h(mode.)48 b(In)30 b(multi)0 2280 y(bit)36 +b(modes)g(this)g(option)i(should)f(be)f(set)g(inacti)n(v)o(e.)67 +b(The)35 b(type)h(of)g(this)g(option)i(is)d Fp(SANE)p +2975 2280 28 4 v 31 w(TYPE)p 3226 2280 V 31 w(FIXED)p +Fq(.)d(The)k(unit)0 2392 y(is)g Fp(SANE)p 321 2392 V +31 w(UNIT)p 572 2392 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g +(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68 +b(It)36 b(de\002nes)g(the)g(minimum)0 2505 y(intensity)27 +b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data) +h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v) +n(alues)i(in)e(the)0 2618 y(follo)n(wing)h(w)o(ay:)0 +2731 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white) +g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40 +b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 2844 y(intensities)e(brighter)g +(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e +(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0 +2957 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29 +b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f +(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0 +3070 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14 +b(.)g(.)g(70)23 b(percent\).)0 3242 y(This)j(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3354 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3467 +y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 0 3467 a 0 3467 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 0 3467 a 0 3467 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 0 3467 a 308 x +Fm(4.5.10)99 b(Analog)24 b(gamma)0 3857 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 3857 a 0 +3857 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 3857 a 151 x Fq(The)37 b(option)i Fp(analog-gamma)31 +b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h +(analog)h(gamma)e(function)i(of)f(the)0 4121 y(scanner)33 +b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g +(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31 +b(type)h(of)f(this)h(option)g(is)0 4234 y Fp(SANE)p 225 +4234 28 4 v 31 w(TYPE)p 476 4234 V 31 w(FIXED)p Fq(.)27 +b(The)k(unit)g(is)g Fp(SANE)p 1486 4234 V 30 w(UNIT)p +1736 4234 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g +(de\002ned)g(by)g(the)g(back)o(end)i(as)0 4347 y(supported.)38 +b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37 +b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f +(correction)k(has)d(no)0 4460 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n +(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29 +b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0 +4573 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g +Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n +(wed)g(to)g(em-)0 4686 y(ulate)31 b(an)e(anlog)i(gamma)e(function)j(by) +d(a)h(digital)h(gamma)e(table.)48 b(The)29 b(back)o(end)j(has)e(to)f +(disable)j(\(or)d(not)h(de\002ne\))h(this)0 4799 y(option)25 +b(when)f(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o +(are\))h(gamma)d(function.)0 4970 y(When)37 b(analog)i(gamma,)h +(highlight)f(and)f(shado)n(w)f(functions)j(are)d(a)n(v)n(ailable)j(at)d +(the)g(same)g(time)g(then)h(the)f(back)o(end)0 5083 y(author)32 +b(has)g(to)e(care)i(about)g(the)f(order)h(in)e(which)i(the)f(functions) +i(are)e(implemented)i(in)e(the)g(scanner)i(hardw)o(are.)52 +b(The)0 5103 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 0 5103 a 0 5103 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 0 5103 a 0 5103 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 0 +5103 a 1905 5381 a Fq(44)p eop +%%Page: 45 46 +45 45 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 32 a 91 x Fq(SANE)27 +b(standard)32 b(e)o(xpects)g(that)e(changing)j(the)d(analog)h(gamma)e +(v)n(alue)i(has)f(no)g(ef)n(fect)h(to)f(the)g(shado)n(w)g(and)h +(highlight)0 236 y(function.)59 b(When)33 b(the)g(analog)i(gamma)d +(function)j(is)e(e)o(x)o(ecuted)i(in)d(the)i(scanner)g(hardw)o(are)h +(before)f(the)f(shado)n(w)h(and)0 349 y(highlight)d(functions)g(then)e +(the)g(back)o(end)i(should)f(do)e(a)g(compensation.)47 +b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g(highlight)i(v)n(alues)0 +462 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g(corrected)j(with)d(the)h(rele)n +(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 622 y(It)e(is)h(not)g(allo)n +(wed)g(to)g(emulate)g(an)g(analog)h(gamma)e(function)j(by)e(a)f +(digital)i(gamma)e(table.)29 b(The)21 b(back)o(end)j(has)e(to)f +(disable)0 735 y(\(or)j(not)g(de\002ne\))g(this)g(option)h(when)f(the)f +(scanner)j(does)e(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(gamma)d(function.)0 895 y(This)j(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +1008 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1121 +y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 0 1121 a 0 1121 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 0 1121 a 0 1121 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 0 1121 a 292 x +Fm(4.5.11)99 b(Shado)o(w)0 1476 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 0 1476 a 0 1476 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 0 +1476 a 159 x Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g +(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v) +o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h(is)0 +1748 y Fp(SANE)p 225 1748 28 4 v 31 w(TYPE)p 476 1748 +V 31 w(FIXED)p Fq(.)26 b(The)k(unit)g(is)g Fp(SANE)p +1482 1748 V 30 w(UNIT)p 1732 1748 V 31 w(PERCENT)p Fq(.)c(The)j(v)n +(alue)i(range)g(should)g(be)f(0.0.)14 b(.)g(.)g(100.0)29 +b(if)g(pos-)0 1861 y(sible.)47 b(It)29 b(is)h(used)g(to)f(de\002ne)h +(the)g(maximum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(an)e(image) +h(data)g(v)n(alue)g(of)g(0)f(\(black\).)48 b(The)0 1973 +y(back)o(end)26 b(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f +(follo)n(wing)i(w)o(ay:)0 2086 y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h +(that)g(the)f(sensiti)n(vity)k(range)d(is)f(not)h(reduced,)k(only)c +(the)f(minimum)h(intensity)h(produces)h(an)0 2199 y(image)30 +b(data)g(v)n(alue)h(of)e(0)h(\(black\).)48 b(A)29 b(v)n(alue)h(of)g +(50.0)g(means)g(that)g(that)g(a)f(medium)h(intensity)i(and)e(e)n(v)o +(erything)i(that)e(is)0 2312 y(dark)o(er)e(produces)h(an)e(image)g +(data)h(v)n(alue)f(of)g(0)f(\(black\).)41 b(A)25 b(v)n(alue)j(of)e +(100.0)i(means)f(the)g(sensiti)n(vity)j(range)e(is)e(reduced)0 +2425 y(to)i(0,)g(all)g(image)g(data)g(v)n(alues)h(are)f(0)g(\(black\).) +43 b(If)28 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o(v)o(er)h(the)h +(full)f(range)h(the)f(back)o(end)i(has)0 2538 y(to)25 +b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35 +b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e +(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0 +2651 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p +Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31 +b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0 +2764 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g +(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g +(disable)i(\(or)e(not)h(de\002ne\))0 2877 y(this)24 b(option)h(when)f +(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(shado)n(w)e(function.)0 3037 y(This)i(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3150 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3263 +y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 0 3263 a 0 3263 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 0 3263 a 0 3263 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 0 3263 a 292 x +Fm(4.5.12)99 b(Highlight)0 3637 y + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 0 3637 a 0 3637 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 0 +3637 a 140 x Fq(The)26 b(option)i Fp(highlight)21 b Fq(is)26 +b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f(white)g +(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g(is)0 +3890 y Fp(SANE)p 225 3890 28 4 v 31 w(TYPE)p 476 3890 +V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p +1461 3890 V 31 w(UNIT)p 1712 3890 V 31 w(PERCENT)p Fq(.)d(The)j(v)n +(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 +b(if)h(possi-)0 4002 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h +(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e +(maximum)h(possible)h(image)f(data)g(v)n(alue)0 4115 +y(\(white/full)c(intensity\).)31 b(The)23 b(back)o(end)j(has)e(to)f +(scale)i(the)e(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0 +4228 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h(sensiti)n(vity)i(range)e +(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h(ha)n(v)o(e)g(maximum)f +(v)n(alue)h(\(white)f(/)g(full)0 4341 y(intensity\).)31 +b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a)f(medium)h(intensity)i +(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j(produces)f(the)f(max-) +0 4454 y(imum)f(possible)j(image)e(data)g(v)n(alue)h(\(white)f(/)f +(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e(100.0)i(means)f(that)g +(the)g(sensiti)n(vity)j(range)d(is)0 4567 y(not)d(reduced,)j(only)d +(the)h(maximum)f(intensity)i(produces)h(an)d(image)g(data)h(with)f +(maximum)g(possible)i(v)n(alue)f(\(white)f(/)g(full)0 +4680 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h(able)g(to)f +(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has)f(to)f +(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 4793 y(\(e.g.)35 +b(30.)14 b(.)g(.)g(70)25 b(percent\).)38 b(In)25 b(color)i(mode)f +(there)h(can)f(be)g(options)h Fp(highlight-red)p Fq(,)20 +b Fp(highlight-gree)o(n)f Fq(and)0 4906 y Fp(highlight-blue)p +Fq(,)g(in)26 b(this)h(case)g Fp(highlight)21 b Fq(has)26 +b(to)g(be)g(disabled.)39 b(It)26 b(is)g(not)g(allo)n(wed)h(to)f +(emulate)h(a)f(highlight)0 5019 y(function)h(by)f(a)f(digital)i(gamma)d +(table.)35 b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h +(de\002ne\))g(this)g(option)g(when)g(the)f(scanner)0 +5132 y(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(highlight)g(function.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 0 5151 +a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(45)p eop +%%Page: 46 47 +46 46 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 0 32 a 91 x Fq(This)26 +b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o +(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e +(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +349 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 0 349 a 0 349 a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 0 349 a 0 349 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 0 349 a 308 x Fm(4.5.13)99 +b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0 738 y + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 +738 a 0 738 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 738 a 152 x Fq(The)18 b(option)h Fp(lamp-on)14 +b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h(scanner)h(on.)27 +b(The)17 b(type)i(of)f(this)h(option)g(is)f Fp(SANE)p +3431 890 28 4 v 31 w(TYPE)p 3682 890 V 31 w(BUTTON)p +Fq(.)0 1002 y(The)23 b(unit)h(is)g Fp(SANE)p 637 1002 +V 31 w(UNIT)p 888 1002 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e +(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(on.)0 +1174 y(The)18 b(option)h Fp(lamp-off)14 b Fq(is)k(used)h(to)f(turn)g +(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.)27 b(The)18 +b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p 3499 1174 +V 31 w(TYPE)p 3750 1174 V 30 w(BUTTON)p Fq(.)0 1287 y(The)23 +b(unit)h(is)g Fp(SANE)p 637 1287 V 31 w(UNIT)p 888 1287 +V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g(the)g +(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0 +1459 y(These)33 b(options)h(are)f(not)g(mandatory)-6 +b(,)37 b(b)n(ut)c(if)f(a)g(back)o(end)j(does)e(support)i(them,)f(it)e +(must)h(implement)h(it)e(in)g(a)g(manner)0 1572 y(consistent)26 +b(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0 1684 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 +1684 a 0 1684 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 1684 a 0 1684 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 1684 a 308 x Fm(4.5.14)99 +b(Scanner)26 b(b)n(uttons)0 2056 y + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 2056 a 0 2056 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + +0 2056 a 169 x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which) +e(state)h(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5 +b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 2338 +y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g +(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to) +d(the)g(same)0 2451 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f +(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h +(w)o(ould)f(be)g(implemented:)0 2564 y(Fi)n(v)o(e)25 +b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e +(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o +(ant)f(to)0 2677 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i +(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n +(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0 +2790 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g +(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n +(utton\).)47 b(F)o(or)0 2903 y(three)24 b(people)i(the)d(image)h(is)g +(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g +(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0 +3187 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e +(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n +(wing)i(options:)0 3300 y Fp(scanner-buttons)o(-l)o(oc)o(k)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 3300 28 4 v 31 +w(TYPE)p 1951 3300 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25 +b(=)e Fp(SANE)p 2813 3300 V 31 w(FALSE)0 3413 y(scanner-buttons)o(-s)o +(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809 +3413 V 31 w(TYPE)p 2060 3413 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0 +3526 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 3526 V 31 w(TYPE)p +2442 3526 V 30 w(BUTTON)0 3639 y Fq(When)18 b(setting)i(these)f +(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p +2091 3639 V 31 w(INFO)p 2342 3639 V 31 w(RELOAD)p 2703 +3639 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 3639 V 31 +w(INFO)p 3696 3639 V 31 w(RELOAD)p 4057 3639 V 30 w(PARAMS)0 +3752 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 3923 +y(A)33 b(Frontend)j(has)f(to)f(disable)i(the)f(usage)g(of)g(the)f +(scanner)n(-b)n(uttons)40 b(by)34 b(def)o(ault.)63 b(This)35 +b(is)f(important)i(because)g(other)0 4036 y(frontends)26 +b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g +(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25 +b(important)g(thing)0 4149 y(is)f(that)h(some)f(scanners)i(do)f(not)f +(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g +(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0 +4262 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g +(scanner\).)136 4533 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o +(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f +(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31 +b(this)h(it)227 4646 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o +(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 4646 V 31 w(TRUE)p +Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227 +4759 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b +Fp(SANE)p 1667 4759 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h +(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-)227 +4872 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28 +b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e) +n(v)o(ery)g(user)g(has)g(read)h(and)227 4985 y(write)24 +b(access)h(to.)0 4986 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 4986 a 0 4986 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 4986 a 0 +4986 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 4986 a 1905 5381 a Fq(46)p eop +%%Page: 47 48 +47 47 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 32 a 336 123 a Fr(\226)46 +b Fq(If)20 b(the)h(lock\002le)g(does)g(not)f(e)o(xist)h(then)g(the)f +(back)o(end)j(creates)f(the)e(lock\002le)h(and)g(writes)f(the)h +(process)h(ID)d(\(PID\))427 236 y(of)f(the)h(back)o(end)h(to)e(the)g +(\002le.)27 b(Button)18 b(access)i(is)e(allo)n(wed:)27 +b(the)18 b(v)n(alue)h(of)f(option)i Fp(scanner-buttons)o(-l)o(oc)o(k) +427 349 y Fq(is)k(set)f(to)h Fp(SANE)p 953 349 28 4 v +31 w(TRUE)336 495 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o +(xist)g(and)h(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g +(then)h(the)g(back)o(end)i(has)e(to)g(check)g(if)427 +608 y(the)f(process)i(with)d(the)h(PID)f(stored)i(in)e(the)h +(lock\002le)h(still)f(is)g(running.)46 b(If)28 b(yes)h(then)h(the)f(b)n +(utton)h(access)g(is)427 721 y(not)i(allo)n(wed:)47 b(the)32 +b(v)n(alue)h(of)e(option)j Fp(scanner-button)o(s-)o(loc)o(k)25 +b Fq(is)31 b(set)h(to)g Fp(SANE)p 3340 721 V 31 w(FALSE)p +Fq(.)c(If)k(not)427 834 y(then)c(the)e(lock\002le)i(is)e(recreated)j +(and)e(the)g(PID)e(of)h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g +(lock\002le,)h(b)n(utton)g(access)427 946 y(is)c(allo)n(wed:)30 +b(the)23 b(v)n(alue)i(of)e(option)i Fp(scanner-buttons-)o(lo)o(ck)16 +b Fq(is)23 b(set)h(to)g Fp(SANE)p 3194 946 V 30 w(TRUE)136 +1159 y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n +(alue)i(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p +Fq(.)37 b(If)28 b(it)g(is)h Fp(SANE)p 3472 1159 V 31 +w(TRUE)c Fq(then)227 1272 y(the)f(frontend)i(has)e(access)h(to)e(the)h +(scanner)h(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p +2400 1272 V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136 +1460 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n +(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f +(once)g(per)g(second)g(\(while)g(not)227 1572 y(scanning\):)336 +1760 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h +Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o +Fq(.)35 b(The)27 b(back)o(end)j(checks)427 1873 y(if)37 +b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i +(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427 +1986 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h +(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option) +427 2099 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20 +b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f +(means)g(the)h(b)n(utton)h(is)427 2212 y(not)23 b(pressed,)h(a)d(v)n +(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30 +b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427 +2325 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f +(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42 +b(The)27 b(back)o(end)427 2438 y(has)c(to)f(implement)h(a)f(timeout)h +(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h +(within)f(a)e(prede\002ned)j(time)427 2550 y(\(e.g.)50 +b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50 +b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427 +2663 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b +Fp(SANE)p 1862 2663 V 31 w(FALSE)d Fq(and)j(does)h(set)f +Fp(SANE)p 2881 2663 V 31 w(INFO)p 3132 2663 V 31 w(RELOAD)p +3493 2663 V 30 w(OPTIONS)427 2776 y Fq(to)20 b(inform)g(the)g(frontend) +i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n +(-b)n(utton)k(functions.)30 b(If)20 b(access)427 2889 +y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o +(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 3035 y Fr(\226)46 +b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i +Fp(scanner-buttons-)o(st)o(at)o(us)136 3223 y Fk(\017)46 +b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g +(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g +Fp(scanner-buttons-)o(lo)o(ck)227 3336 y Fq(to)34 b Fp(SANE)p +556 3336 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g +(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f +(same.)227 3449 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es) +g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g +Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 3562 y Fp(SANE)p +452 3562 V 31 w(FALSE)p Fq(.)227 3712 y Fp(sane)p 452 +3712 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g +(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11 +b Fq(to)18 b Fp(SANE)p 3601 3712 V 31 w(FALSE)p Fq(.)0 +3831 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 3831 a 0 3831 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 3831 a 0 3831 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 3831 a 1905 +5381 a Fq(47)p eop +%%Page: 48 49 +48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51 +b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g +(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h +(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895 +y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e +(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f +(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h +(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e +(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h +(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367 +y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e +(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5 +b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480 +y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g +(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i +(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h +(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g +(access)g(to)g(the)g(system.)227 2743 y(Controlling)34 +b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e) +n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227 +2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges) +i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i +(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36 +b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d +(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47 +b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n +(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227 +3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i +(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g +(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that) +g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f +(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g +(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i +(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24 +b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n +(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22 +b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l +(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f +(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834 +y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h +(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h +(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19 +b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e +(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws) +227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices) +h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44 +b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24 +b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g +(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i +(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g +(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740 +y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i +(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114 +4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client) +h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o +(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p +eop +%%Page: 49 50 +49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f +(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e +(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i +(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45 +b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h +(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227 +536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k +(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o +(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0 +896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h +(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h +(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0 +1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0 +1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7 +b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g +(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0 +2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44 +b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28 +b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h +(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n +(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44 +b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30 +b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c +(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).) +0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29 +b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10 +b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227 +2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g +(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h +(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43 +b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g +Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37 +b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227 +3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e +Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6 +b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43 +b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40 +b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f +(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g +(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d +(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227 +3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o +(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues) +g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f +(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g +(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47 +b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0 +4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378 +y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C) +e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e +(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737 +y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w) +o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g +(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28 +b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g +(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f +(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h +(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop +%%Page: 50 51 +50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded) +j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g +(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227 +236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29 +b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f +(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0 +526 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by) +e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g +(in)e(which)i(the)o(y)227 639 y(appear)25 b(in)f(the)g(corresponding)j +(C)c(type)h(declaration.)0 816 y Fa(union)p Fr(:)45 b +Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e +(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i +(members)e(is)227 929 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30 +b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j +(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1042 y(of)g(the)g +(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1251 y(Note)25 +b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e +(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f +(constructed)0 1364 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g +(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of) +d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1524 +y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h +(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h +(protocol.)0 1858 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h +(Requests)0 2112 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g +(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\)) +f(protocol.)34 b(This)24 b(means)h(that)0 2225 y(all)h(acti)n(vity)h +(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back) +o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0 +2338 y(by)d(the)f(client.)0 2628 y Fm(5.2.1)99 b Fc(SANE)p +545 2628 30 4 v 35 w(NET)p 760 2628 V 35 w(INIT)0 2849 +y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e +(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20 +b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0 +2962 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g +(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g +(belo)n(w:)744 3165 y Fr(r)n(equest:)941 b(r)n(eply:)744 +3278 y Fp(SANE)p 969 3278 28 4 v 31 w(Word)52 b(version)p +1657 3278 V 30 w(code)98 b(SANE)p 2225 3278 V 31 w(Word)52 +b(status)744 3391 y(SANE)p 969 3391 V 31 w(String)g(user)p +1602 3391 V 30 w(name)153 b(SANE)p 2225 3391 V 31 w(Word)52 +b(version)p 2913 3391 V 30 w(code)0 3591 y Fq(The)32 +b Fp(version)p 563 3591 V 30 w(code)e Fq(ar)n(gument)35 +b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36 +b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3704 +y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39 +b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i +(code)f(is)f(used)g(to)g(hold)0 3817 y(the)c(netw)o(ork)h(protocol)h(v) +o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h +(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0 +3930 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f +(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e +(the)g(netw)o(ork)0 4043 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o +(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g +(compatible\).)33 b(The)24 b Fp(user)p 3656 4043 V 31 +w(name)0 4156 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h +(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59 +b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4269 y(cannot)26 +b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e +Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h +(be)f(placed)h(in)e(the)0 4382 y(authenticity)30 b(of)c(this)i(user)n +(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o +(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5 +b(.)39 b(E.g.,)25 b(it)0 4495 y(could)g(be)e(used)i(as)e(the)h(def)o +(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0 +4654 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 4654 V 31 w(STA-)0 4767 y(TUS)p 170 4767 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g +(unde\002ned)i(v)n(alues.)2384 4734 y Fg(1)2457 4767 +y Fq(The)d Fp(version)p 3013 4767 V 30 w(code)e Fq(ar)n(gument)28 +b(returns)0 4880 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw) +o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g +(pre)n(vious)i(paragraph)h(on)0 4993 y(the)d(meaning)h(of)e(the)h(b)n +(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p +0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19 +b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak) +g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5 +b(.)1905 5381 y Fq(50)p eop +%%Page: 51 52 +51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0 +356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f +(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055 +596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196 +b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822 +y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822 +V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h +(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6 +b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344 +V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has) +g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p +2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0 +1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f +Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765 +y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p +760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open) +i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760 +2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p +985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V +30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071 +2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577 +y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y +Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k +(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0 +2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099 +V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has) +e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d +Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23 +b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31 +b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j +(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p +Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g +(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0 +3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g +(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0 +3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p +760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077 +4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p +1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252 +4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d +Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h +(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905 +5381 y(51)p eop +%%Page: 52 53 +52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p +1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h +(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706 +705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97 +b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28 +w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h +(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29 +b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h +(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50 +b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n +(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A) +o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445 +1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 +1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 +4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V +34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i +(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i +(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694 +y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p +1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187 +2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040 +2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31 +w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294 +b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033 +V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p +1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 +b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 +3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 +b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371 +V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e +Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f +(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23 +b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the) +g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34 +b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40 +b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75 +b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c +Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945 +y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080 +3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p +1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h +Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p +Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V +31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058 +V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28 +b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g +(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f +(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n +(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c +Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31 +b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h +Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32 +b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v) +o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37 +b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g +(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f +(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o +(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622 +y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24 +b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g +(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call) +0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p +Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned) +h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f +(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26 +b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36 +b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f +Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p +Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h +(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p +eop +%%Page: 53 54 +53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on) +d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i +(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0 +236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f +(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946 +236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V +31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h +(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28 +b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462 +y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply) +i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i +(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28 +b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that) +f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0 +687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545 +995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V +35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886 +1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p +1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061 +1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061 +1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b +Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e +(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0 +2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40 +b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g +(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j +Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g +(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750 +30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).) +940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y +Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p +2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p +2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116 +3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891 +3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913 +y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g +(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h +(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23 +b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19 +b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e +(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33 +b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g +(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section) +g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d +(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31 +b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0 +4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073 +4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28 +b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n +(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27 +b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data) +g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0 +4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g +(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5 +b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g +(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50 +b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.) +0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence) +j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted) +j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j +(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f +(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905 +5381 y(53)p eop +%%Page: 54 55 +54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25 +b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g +(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31 +w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j +(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f +(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0 +349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g +(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i +(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18 +b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g +(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35 +b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36 +b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33 +b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742 +y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g +(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j +(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i +(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o +(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0 +968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31 +b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6 +b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v) +o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i +(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0 +1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j +(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i +(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h +(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609 +30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f +(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635 +b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30 +w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53 +b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f +(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0 +2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p +810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h +(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854 +b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31 +w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53 +b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967 +3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006 +y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g +(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31 +b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string) +h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24 +b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j +(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17 +b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j +(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0 +4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512 +y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o +(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n +(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g +(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo) +n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0 +4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g +(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i +(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22 +b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e +(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0 +5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905 +5381 y(54)p eop +%%Page: 55 56 +55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b +Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20 +b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30 +b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f +(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j +(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0 +349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26 +b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f +(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f +(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31 +w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p +Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v +35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g +(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5 +b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i +(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h +(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o +(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y +Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e +Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop +%%Page: 56 57 +56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51 +b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28 +b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.) +35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0 +1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g +(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h +(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0 +2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h +(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18 +b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e +(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c +(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0 +2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g +(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j +(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o +(an)o(e/)1905 5381 y Fq(56)p eop +%%Page: 57 58 +57 57 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6 b(,)24 +b(36)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6 b(,)24 +b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0 1713 +y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021 y(enumeration)i +(types,)f(35)0 2217 y(image)f(data)g(format,)g(8)0 2413 +y(mailing)h(list,)e(42)0 2609 y(netw)o(ork)i(authorization,)i(40)0 +2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031 +y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031 +V 36 w(Array)-6 b(,)23 b(38)0 3227 y(passw)o(ord,)i(22)0 +3340 y(pointer)l(,)g(35)0 3453 y(pre)n(vie)n(w)f(mode,)f(32)0 +3649 y(resolution)j(option,)f(32)0 3845 y(SANE)p 244 +3845 V 31 w(Action,)f(24)0 3957 y(SANE)p 244 3957 V 31 +w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12 +b(ALUE,)20 b(24)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p +616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21 +b(24)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616 +4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(24)0 +4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296 +V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0 +4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(35)0 4635 +y(sane)p 165 4635 V 34 w(cancel,)h(28)0 4748 y(SANE)p +244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19 +b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V +32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p +244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19 +b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V +32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095 +1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h +(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125 +V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095 +1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p +2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p +2339 1351 V 31 w(Char)l(,)k(14,)f(35)2095 1463 y(sane)p +2260 1463 V 35 w(close,)h(23)2095 1576 y(SANE)p 2339 +1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095 +1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689 +V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31 +w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V +31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915 +V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095 +2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028 +V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095 +2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V +35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p +2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339 +2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480 +V 35 w(e)o(xit,)f(22)2095 2593 y(SANE)p 2339 2593 V 31 +w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V +31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095 +2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32 +w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095 +3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(26)2095 3157 +y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(26) +2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270 +V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(26)2095 3383 y(SANE)p +2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(26)2095 +3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31 +w(RED,)f(10,)h(26)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p +2685 3609 V 31 w(RGB,)f(9,)h(26)2095 3722 y(sane)p 2260 +3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095 +3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p +2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p +2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(26)2095 +4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p +2643 4060 V 35 w(fd,)d(29)2095 4173 y(SANE)p 2339 4173 +V 31 w(Handle,)h(15,)g(35)2095 4286 y(SANE)p 2339 4286 +V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(25)2095 +4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32 +w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(25)2095 4512 +y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32 w(RELO)m(AD)p +2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(25)2095 4625 y(sane)p +2260 4625 V 35 w(init,)j(19)2095 4738 y(SANE)p 2339 4738 +V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851 V 31 w(NET)p +2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(40)2095 4964 y(SANE)p +2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(40)2095 +5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(37)1905 +5381 y(57)p eop +%%Page: 58 59 +58 58 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(NET)p +453 123 V 32 w(CONTR)l(OL)p 913 123 V 30 w(OPTION,)21 +b(38)0 236 y(SANE)p 244 236 V 31 w(NET)p 453 236 V 32 +w(EXIT)-7 b(,)21 b(41)0 349 y(SANE)p 244 349 V 31 w(NET)p +453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(37)0 462 +y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p 663 +462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(38)0 +574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p +663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(39)0 687 y(SANE)p +244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(36)0 +800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(37)0 +913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8 +b(AR)j(T)e(,)19 b(39)0 1026 y(sane)p 165 1026 V 34 w(open,)24 +b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139 +V 34 w(Descriptor)l(,)i(16)0 1252 y(SANE)p 244 1252 V +31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21 +b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365 +V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0 +1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(26)0 +1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p +165 1704 V 34 w(read,)g(27)0 1817 y(sane)p 165 1817 V +34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0 +1929 y(sane)p 165 1929 V 34 w(start,)g(27)0 2042 y(SANE)p +244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155 +V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p +975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268 +V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19 +b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p +603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21 +b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p +603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21 +b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p +603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720 +V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15)0 +2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833 +V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31 +w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32 +w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8 +b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171 +y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V +30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p +244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p +765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397 +V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5 +b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24 +b(14,)f(35)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496 +3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34 +w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21 +b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962 +V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p +504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244 +4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301 +y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10 +b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504 +4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526 +V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p +244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V +31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p +493 4865 V 32 w(BIT)-7 b(,)22 b(18)0 4978 y(SANE)p 244 +4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(18)0 5091 y(SANE)p +244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(18)2095 +123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(18)2095 +236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(18)2095 +349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7 +b(,)20 b(18)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p +2588 462 V 32 w(PIXEL,)h(18)2095 574 y(SANE)p 2339 574 +V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(17)2095 +687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31 +w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p +2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913 +V 31 w(W)-7 b(ord,)24 b(12,)f(35)2095 1026 y(scan)i(area)f(options,)h +(32)2095 1139 y(scan)g(resolution,)h(32)2095 1252 y(structure,)g(36) +2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095 +1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(36)2095 +1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095 +2374 y(well-kno)n(wn)h(options,)g(31)1905 5381 y(58)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/sane2/0.06/sane2-0.06.tex.gz b/sane2/0.06/sane2-0.06.tex.gz new file mode 100644 index 00000000..858035ec --- /dev/null +++ b/sane2/0.06/sane2-0.06.tex.gz @@ -0,0 +1,2645 @@ +\documentclass[11pt,DVIps]{report} + +\usepackage{times,epsfig,changebar,html} + +\setlength{\parindent}{0pt} +\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex} +\setlength{\textwidth}{6.5in} +\setlength{\textheight}{8.5in} +\setlength{\marginparwidth}{0pt} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\marginparsep}{0pt} +\addtolength{\topmargin}{-0.75in} + +\title{\huge SANE Standard Version 2.0 proposal 0.06 - rauch/beck} +\author{} +\date{May 15, 2002} + +\makeindex + +\begin{document} + +\newcommand{\filename}[1]{{\tt #1}} +\newcommand{\code}[1]{{\tt #1}} +\newcommand{\var}[1]{{\it #1}} +\newcommand{\defn}[1]{#1\index{#1}} + +\begin{latexonly} + \setcounter{changebargrey}{0} % black change bars +\end{latexonly} + +\maketitle +\tableofcontents +\listoffigures +\listoftables + + +\chapter{Preface} + +The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +\ref{chap:contact}. + +The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + + +\section{About This Document} + +This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +The remainder of this document is organized as follows. +Chapter~\ref{chap:intro} provides introductional material. +Chapter~\ref{chap:environ} presents the environment SANE is designed +for. Chapter~\ref{chap:api} details the SANE Application Programmer +Interface. Chapter~\ref{chap:net} specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter~\ref{chap:contact} gives information on how +to join the SANE development process. + +\subsection{Typographic Conventions} + +Changes since the last revision of this document are highlighted +like this: + +% \begin{changebar} +% Paragraphs that changed since the last revision of the documention +% are marked like this paragraph. +% \end{changebar} + +\chapter{Introduction}\label{chap:intro} + +SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +\section{Terminology} + +An application that uses the SANE interface is called a SANE {\em + frontend}. A driver that implements the SANE interface is called a +SANE {\em backend}. A {\em meta backend\/} provides some means to +manage one or more other backends. + + +\chapter{The SANE Environment}\label{chap:environ} + +SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE {\em option\/}. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +\code{brightness} whose value is an integer in the range from 0 to +255. + +With self-describing options, a backend need not be concerned with +{\em presentation\/} issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the {\em meaning\/} of each option. It simply provides +means to present and alter the options defined by the backend. + + +\section{Attaching to a SANE backend} + +The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +\begin{itemize} + +\item {\bf Static linking:} A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called \code{be} + would normally export a function called \code{sane\_read()}. If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend \code{be} include a + header file that has lines of the form: + \begin{quote} +\begin{verbatim} +#define sane_read be_sane_read +\end{verbatim} + \end{quote} + With definitions of this kind, backend \code{be} will export + function name \code{be\_sane\_read()}. Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +\item {\bf Dynamic linking:} A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix \code{sane\_}), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + + More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends {\em on demand}. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +\item {\bf Network connection:} Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +\end{itemize} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth} + \caption{Example SANE Hiearchy} + \label{fig:hierarchy} + \end{center} +\end{figure} + +The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine +A uses a dynamic-linking based meta backend called \code{dll} to +access the backends called \code{pnm}, \code{mustek}, and \code{net}. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called \code{saned}. The \code{saned} in +turn has access to the \code{hp} and \code{autolum} backends through +another instance of the \code{dll} backend. The \code{autolum} meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called \code{qcam}. + +Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + + +\section{Image Data Format}\label{sec:imageformat}\index{image data format} + +Arguably the most important aspect of an image acquisition system is how +images are represented. The SANE approach is to define a simple yet powerful +representation that is sufficient for vast majority of applications and +devices. While the representation is simple, the interface has been defined +carefully to allow extending it in the future without breaking backwards +compatibility. Thus, it will be possible to accommodate future applications or +devices that were not anticipated at the time this standard was created. + +A SANE image is a rectangular area. The rectangular area is subdivided into a +number of rows and columns. At the intersection of each row and column is a +(preferable quadratic) pixel. A pixel consists of one or more sample values. +\begin{changebar} + Each sample value represents one channel (e.g., the red channel). +\end{changebar} + +The SANE API transmits an image as a sequence of frames. Each frame covers +the same rectangular area as the entire image, but may contain only a subset +of the channels in the final image. For example, a red/green/blue image could +either be transmitted as a single frame that contains the sample values for +all three channels or it could be transmitted as a sequence of three frames: +the first frame containing the red channel, the second the green channel, and +the third the blue channel. + +\begin{changebar} + When transmitting an image frame by frame, the frontend needs to know what + part of the image a frame represents (and how many frames it should expect). + For that purpose, the SANE API tags every frame with a type and a format + descriptor. +\end{changebar} + +\begin{changebar} + There are two different types of frames: pixel oriented frames + \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames + \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the + following sections. The frame types used by version~1 of this standard + (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}}, + \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and + \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by + \code{\defn{SANE\_FRAME\_RAW}}. +\end{changebar} + +\begin{changebar} + \subsection{Pixel oriented frames} +\end{changebar} + +\begin{changebar} + The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The + frame contains one or more channels of data in a channel-interleaved format, + that represents sample values from a property of the individual pixels that + is subject to further description in the \code{format\_desc} member of the + \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparams} + on page~\pageref{sec:sanegetparams} for details about the format + descriptions. +\end{changebar} + +\begin{changebar} + Each sample value has a certain bit depth. The bit depth is fixed for the + entire image and can be as small as one bit. Valid bit depths are 1, 8, or + 16 bits per sample. If a device's natural bit depth is something else, it is + up to the driver to scale the sample values appropriately (e.g., a 4 bit + sample could be scaled by a factor of four to represent a sample value of + depth 8). +\end{changebar} + +\begin{changebar} + The complete image may consist of several channels, the number of channels + is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}. + The image may be transmitted in an arbitary number of frames which can be + determined by watching the \code{last\_frame} flag in said type (or by + counting the channels). Note: This frame type replaces all frame types of + the SANE standard version 1. +\end{changebar} + +Conceptually, each pixel oriented frame is transmitted +a byte at a time. Each byte may contain 8 sample values (for an image +bit depth of 1), one full sample value (for an image bit depth of 8), +or a partial sample value (for an image bit depth of 16 or bigger). +In the latter case, the bytes of each sample value are transmitted in +the machine's native byte order. +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +\end{quote} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/xfer.eps,width=0.5\textwidth} + \caption{Transfer order of image data bytes} + \label{fig:xfer} + \end{center} +\end{figure} + +The order in which the sample values in a frame are transmitted is illustrated +in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by +row and each row is transmitted from left-most to right-most column. The +left-to-right, top-to-bottom transmission order applies when the image is +viewed in its normal orientation (as it would be displayed on a screen, for +example). + +If a frame contains multiple channels, then the channels are transmitted in an +interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case +where a frame contains a complete red/green/blue image with a bit-depth of 8. + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/image-data.eps,width=0.8\textwidth} + \caption{Bit and byte order of image data} + \label{fig:pixels} + \end{center} +\end{figure} + +For a bit depth of 1, each byte contains 8 sample values of a {\em single\/} +channel. In other words, a bit depth 1 frame is transmitted in a byte +interleaved fashion. +\begin{changebar} + The first sample of each byte is represented by the most significant bit. +\end{changebar} + +When the bit depth is 1 there are only two sample values possible, 1 +represents minimum intensity (black) and 0 represents maximum intensity +(white). For all other bit depths a sample value of 0 represents minimum +intensity and larger values represent increasing intensity. + +\begin{changebar} + \subsection{Arbitrary data frames} +\end{changebar} + +\begin{changebar} + It also is possible to transmit arbitary (not necessaryly pixel oriented) + data. This allows transmission of compressed images like jpeg, tiff, etc. +\end{changebar} + +\begin{changebar} +The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}. +\end{changebar} +The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is +given in the \code{format\_desc} member of the \code{SANE\_Parameters} +structured type (see See section~\ref{sec:sanegetparams} on +page~\pageref{sec:sanegetparams}). As such, it is assumed to be +incomprehensible to the frontend, except for selected types the frontend is +specifically capable of handling internally. The frontend is free to ignore +those frames, or employ any appropriate means to otherwise handle this data +(like saving them to disk or spawning an external viewer). + +\chapter{The SANE Application Programmer Interface (API)}\label{chap:api} + +\begin{changebar} +This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called \filename{sane/sane-2.h}. This file should +normally be included via a C pre-processor directive of the form: +\begin{verbatim} + #include +\end{verbatim} +\end{changebar} + + +\section{Version Control} + +The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +The SANE API provides the following five macros to manage version +numbers. +\begin{quote} + \begin{description} + \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the + number of the SANE standard that the interface implements. + + \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:] + \label{sec:saneversioncode} + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (\var{maj}), the minor version number \var{min}, + and the build revision of a backend (\var{bld}). The major and + minor version numbers must be in the range 0\ldots255 and the + build revision must be in the range 0\ldots65535. + + Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + + Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + + \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the + major version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the + minor version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the + build revision component of the version code passed in argument + \var{vc}. + \end{description} +\end{quote} + + +\section{Data Types} + +\subsection{Base Types} + +The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +\begin{quote} + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\ + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};} +\end{quote} +\verb|SANE_Byte| must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. \verb|SANE_Word| must be +capable of holding any of the following: +\begin{itemize} + \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE| + \item signed integers in the range $-2^{31}\ldots2^{31}-1$ + \item fixed point values in the range $-32768\ldots32767.9999$ with + a resolution of $1/65536$ + \item 32 bits (for bit sets) +\end{itemize} +Note that the SANE standard does not define what C type +\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some +platforms, the latter may map to \verb|long int| whereas on others it +may map to \verb|int|. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +\subsection{Boolean Type} + +\code{\defn{SANE\_Bool}} is used for variables that can take one of +the two truth values \code{\defn{SANE\_FALSE}} and +\code{\defn{SANE\_TRUE}}. The former value is defined to be 0, +whereas the latter is 1.\footnote{This is different from ANSI C where + any non-zero integer value represents logical TRUE.} The C +declarations for this type are given below. +\begin{quote} +\begin{verbatim} +#define SANE_FALSE 0 +#define SANE_TRUE 1 +typedef SANE_Word SANE_Bool; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Bool| whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +\subsection{Integer Type} + +\code{\defn{SANE\_Int}} is used for variables that can take integer +values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is +given below. +\begin{quote} +\begin{verbatim} +typedef SANE_Word SANE_Int; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Int| whenever a given variable or formal argument has a +fixed interpretation as an integer object. + + +\subsection{Fixed-point Type} + +\code{\defn{SANE\_Fixed}} is used for variables that can take fixed +point values in the range $-32768$ to $32767.9999$ with a resolution +of $1/65535$. The C declarations relating to this type are given +below. +\begin{quote} +\begin{verbatim} +#define SANE_FIXED_SCALE_SHIFT 16 +typedef SANE_Word SANE_Fixed; +\end{verbatim} +\end{quote} +The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of $1/65536$. + +Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Fixed| whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE + fixed-point value that is smaller than the double value \var{d}. + No range checking is performed. If the value of \var{d} is out of + range, the result is undefined. + + \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest + double machine number that corresponds to fixed-point value + \var{w}. + + \end{description} +\end{quote} +SANE does {\em not\/} require that the following two expressions hold +true (even if the values of \var{w} and \var{d} are in range): +\begin{quote} +\begin{verbatim} +SANE_UNFIX(SANE_FIX(d)) == d +SANE_FIX(SANE_UNFIX(w)) == w +\end{verbatim} +\end{quote} +In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + + +\subsection{Text} + +\subsubsection{Character Type} + +Type \code{\defn{SANE\_Char}} represents a single text character or +symbol. At present, this type maps directly to the underlying C +\verb|char| type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +\verb|sizeof(SANE_Char)==sizeof(char)|. +\begin{quote} +\begin{verbatim} +typedef char SANE_Char; +\end{verbatim} +\end{quote} + +\subsubsection{String Type} + +Type \code{\defn{SANE\_String}} represents a text string as a sequence +of C \verb|char| values. The end of the sequence is indicated by a +\verb|'\0'| (\defn{NUL}) character. +\begin{quote} +\begin{verbatim} +typedef SANE_Char *SANE_String; +typedef const SANE_Char *SANE_String_Const; +\end{verbatim} +\end{quote} +The type \code{\defn{SANE\_String\_Const}} is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +\begin{quote} +\begin{verbatim} +const SANE_String str; +\end{verbatim} +\end{quote} +declares a string pointer that is constant (not a string pointer that +points to a constant value). + + +\subsection{Scanner Handle Type} + +Access to a scanner is provided through an opaque type called +\code{\defn{SANE\_Handle}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef void *SANE_Handle; +\end{verbatim} +\end{quote} +While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a \verb|SANE_Handle|. In +particular, SANE does not require that a value of this type is a legal +pointer value. + + +\subsection{Status Type} + +Most SANE operations return a value of type \code{\defn{SANE\_Status}} +to indicate whether the completion status of the operation. If an +operation completes successfully, \verb|SANE_STATUS_GOOD| is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table \ref{tab:status}. It is recommended to use function +\code{sane\_strstatus()} to convert status codes into a legible +string. + +\begin{table}[htbp] + \begin{center} + \begin{tabular}{|l|r|l|} + \hline + \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} & + \multicolumn{1}{c|}{\bf Description} \\ + \hline\hline +\code{\defn{SANE\_STATUS\_GOOD}} + & 0 & Operation completed succesfully. \\ +\code{\defn{SANE\_STATUS\_UNSUPPORTED}} + & 1 & Operation is not supported. \\ +\code{\defn{SANE\_STATUS\_CANCELLED}} + & 2 & Operation was cancelled. \\ +\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}} + & 3 & Device is busy---retry later. \\ +\code{\defn{SANE\_STATUS\_INVAL}} + & 4 & Data or argument is invalid. \\ +\code{\defn{SANE\_STATUS\_EOF}} + & 5 & No more data available (end-of-file). \\ +\code{\defn{SANE\_STATUS\_JAMMED}} + & 6 & Document feeder jammed. \\ +\code{\defn{SANE\_STATUS\_NO\_DOCS}} + & 7 & Document feeder out of documents. \\ +\code{\defn{SANE\_STATUS\_COVER\_OPEN}} + & 8 & Scanner cover is open. \\ +\code{\defn{SANE\_STATUS\_IO\_ERROR}} + & 9 & Error during device I/O. \\ +\code{\defn{SANE\_STATUS\_NO\_MEM}} + & 10 & Out of memory. \\ +\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}} + & 11 & Access to resource has been denied. \\ + \hline + \end{tabular} + \caption{Status Codes}\label{tab:status} + \end{center} +\end{table} + + +\subsection{Device Descriptor Type} +\begin{changebar} + +Each SANE device is represented by a structure of type +\code{\defn{SANE\_Device}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const vendor; + SANE_String_Const model; + SANE_String_Const type; + SANE_String_Const email_backend_author; + SANE_String_Const backend_website; + SANE_String_Const device_location; + SANE_String_Const comment; + SANE_String_Const reserved_string; + SANE_Int backend_version_code; + SANE_Int backend_capablity_flags; + SANE_Int reserved_int; + } +SANE_Device; +\end{verbatim} +\end{quote} +\end{changebar} +\index{device-name} +The structure provides the unique name of the scanner in member +\code{name}. It is this unique name that should be passed in a call +to \code{sane\_open()}. The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is {\em recommended\/} that backends keep +unique names below 32 characters in length. However, applications +{\em must\/} be able to cope with arbitrary length unique names. + +The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members \code{vendor}, \code{model}, and \code{type} are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +\begin{table}[htbp] + \begin{center} + \leavevmode + \hspace{\fill} + \begin{tabular}[t]{|ll|} + \hline + \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\ + \hline\hline + \code{AGFA} & \code{Microtek} \\ + \code{Abaton} & \code{Minolta} \\ + \code{Acer} & \code{Mustek} \\ + \code{Apple} & \code{NEC} \\ + \code{Artec} & \code{Nikon} \\ + \code{Avision} & \code{Plustek} \\ + \code{CANON} & \code{Polaroid} \\ + \code{Connectix} & \code{Ricoh} \\ + \code{Epson} & \code{Sharp} \\ + \code{Fujitsu} & \code{Siemens} \\ + \code{Hewlett-Packard} & \code{Tamarack} \\ + \code{IBM} & \code{UMAX} \\ + \code{Kodak} & \code{Noname} \\ + \code{Logitech} & \\ + \hline + \end{tabular} + \hspace{\fill} + \begin{tabular}[t]{|l|} + \hline + \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\ + \hline\hline + \code{film scanner} \\ + \code{flatbed scanner} \\ + \code{frame grabber} \\ + \code{handheld scanner} \\ + \code{multi-function peripheral} \\ + \code{sheetfed scanner} \\ + \code{still camera} \\ + \code{video camera} \\ + \code{virtual device} \\ + \hline + \end{tabular} + \hspace{\fill} + \caption{Predefined Device Information Strings} + \label{tab:devinfo} + \end{center} +\end{table} +Note that vendor string \code{Noname} can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +\begin{changebar} +The backend has to set up the string \code{email\_backend\_author} +with the name and the email address of the backend author or a contact person +in the format: +\begin{verbatim} +Firstname Lastname +\end{verbatim} + +The string \code{backend\_website} has to be set up by the backend +with the website or ftp address of the backend in the format: +\begin{verbatim} +http://www.domain.org/sane-hello/index.html +\end{verbatim} + +The backend should fill the string \code{device\_location} with a +text that describes where a user can find this device, the text +should be read from the backend config file. This could e.g. look +like this: +\begin{verbatim} +building 93, 2nd plane, room 2124 +\end{verbatim} + +The string \code{comment} can be used to display any comment to the user, +the text should be read from the backend config file. + +The string \code{reserved\_string} is planed for future use, the backend +has to set this string to "". + +With member \code{backend\_version\_code} a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +The member \code{backend\_capability\_flags} contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +The member \code{reserved\_int} is planned for future use, the backend has +to set the value of the integer to 0. +\end{changebar} + +\subsection{Option Descriptor Type}\label{sec:odesc} + +Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +\code{\defn{SANE\_Option\_Descriptor}} type is given below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const title; + SANE_String_Const desc; + SANE_Value_Type type; + SANE_Unit unit; + SANE_Int size; + SANE_Int cap; + SANE_Constraint_Type constraint_type; + union + { + const SANE_String_Const *string_list; + const SANE_Word *word_list; + const SANE_Range *range; + } + constraint; + } +SANE_Option_Descriptor; +\end{verbatim} +\end{quote} + +\subsubsection{Option Name} + +Member \code{name} is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (\code{a}--\code{z}), +digits (\code{0}--\code{9}), or the dash character (\code{-}) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +\subsubsection{Option Title} + +Member \code{title} is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +\subsubsection{Option Description} + +Member \code{desc} is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +\subsubsection{Option Value Type} + +Member \code{type} specifies the type of the option value. The +possible values for type \code{\defn{SANE\_Value\_Type}} are described +in Table \ref{tab:valuetype}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|p{0.6\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type + \verb|SANE_Bool|. \\ + +\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type + \verb|SANE_Int|. \\ + +\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type + \verb|SANE_Fixed|. \\ + +\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type + \verb|SANE_String|. \\ + +\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper. \\ + +\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members \code{title} and +\code{type} are valid in the option descriptor. \\ + + \hline + \end{tabular} + \caption{Option Value Types (\code{SANE\_Value\_Type})} + \label{tab:valuetype} + \end{center} +\end{table} + +\subsubsection{Option Value Unit} + +Member \code{unit} specifies what the physical unit of the option +value is. The possible values for type \code{\defn{SANE\_U\-nit}} are +described in Table \ref{tab:units}. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\ +\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\ +\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\ +\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\ +\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\ +\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\ +\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\ + +\hline + \end{tabular} + \caption{Physical Units (\code{SANE\_Unit})} + \label{tab:units} + \end{center} +\end{table} + +\subsubsection{Option Value Size}\label{sec:valuesize} + +Member \code{size} specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +\begin{quote} + \begin{description} + \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating \code{NUL} character is considered to be part of the + string. Note that the terminating \code{NUL} character must + always be present in string option values. + \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size + must be a positive integer multiple of the size of a + \verb|SANE_Word|. The option value is a vector of length + \[ \code{size}/\code{sizeof(SANE\_Word)}. \] + \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to + \code{sizeof(SANE\_Word)}. + \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The + option size is ignored. + \end{description} +\end{quote} + +\subsubsection{Option Capabilities} + +Member \code{cap} describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table \ref{tab:capabilities}. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro + returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is currently active. + + \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This + macro returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is software settable. + \end{description} +\end{quote} + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.59\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option + value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\ + +\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both + simultaneously). \\ + +\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option + value can be detected by software. If + \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/} + be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability + may or may not be set. If this capability is set but neither + \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT} + are, then there is no way to control the option. That is, the + option provides read-out of the current value only. \\ + +\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option. \\ + +\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling \code{sane\_control\_option()} + with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\ + +\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value). \\ + +\code{\defn{SANE\_CAP\_ADVANCED}} & 64 & + If set, this capability indicates that the option should be + considered an ``advanced user option.'' A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). + \\ + +\hline + \end{tabular} + \caption{Option Capabilities} + \label{tab:capabilities} + \end{center} +\end{table} + +\subsubsection{Option Value Constraints} + +It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member \code{constraint\_type} indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member \code{constraint}. The possible values of type +\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the +\code{constraint} union is described in Table~\ref{tab:constraints}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained. + The option can take any of the values possible for the option's + type. \\ + + \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member \code{constraint.range} points to + a range of the type \code{\defn{SANE\_Range}}. This type is illustrated + below: + \begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Word min; + SANE_Word max; + SANE_Word quant; + } +SANE_Range; +\end{verbatim} + \end{quote} + All three members in this structure are interpreted according to the + option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). + Members \code{min} and \code{max} specify the minimum and maximum + values, respectively. If member \code{quant} is non-zero, it + specifies the quantization value. If $l$ is the minimum value, $u$ + the maximum value and $q$ the (non-zero) quantization of a range, + then the legal values are $v=k\cdot q+l$ for all non-negative + integer values of $k$ such that $v<=u$. \\ + +\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + \code{constraint.word\_list} points to a list of words that + enumerates the legal values. The first element in that list is an + integer (\verb|SANE_Int|) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\ + +\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated + list of strings that enumerate the legal values for the option + value. +\\\hline + \end{tabular} + \caption{Option Value Constraints} + \label{tab:constraints} + \end{center} +\end{table} + + +\subsection{Internationalization}\label{sec:i18n} +\begin{changebar} +All backend texts should be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +\subsubsection{How is a text marked for translation} + +The keyword \code{SANE\_I18N} is used to mark a text for translation. +\code{SANE\_I18N} has to be defined as a dummy prototype: + + \begin{quote} +\begin{verbatim} +#ifndef SANE_I18N +# define SANE_I18N(text) text +#endif +\end{verbatim} + \end{quote} + +You should not mark prototypes or variables with \code{SANE\_I18N} +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and +variables (\verb|SANE_I18N(option[7].name)|). + +A correct marked text can look like this:\\ +\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\ +or\\ +\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\ +It also is allowed to mark texts in structs because the +prototype \code{SANE\_I18N} has no effect to the compiler. + +\subsubsection{Which texts shall be marked for translation?} +All option texts that are visible for the user should be marked for +translation. This is: +\begin{itemize} +\item +member \code{title} +\item +member \code{desc} +\item +member \code{string\_list} +\end{itemize} +of \code{SANE\_Option\_Descriptor}. + +It is not allowed to mark/translate member \code{name}. +Please also do not mark any error or debug messages that are +displayed by the backend. + +\subsubsection{File formats and translation functions} +The recommended file formats for translation tables are the \code{po} files +and \code{mo} or \code{gmo} files. +The po file contains the original text marked with the keyword \code{msgid} +and the translated text marked with the keyword \code{msgstr}. +A \code{po} file that contains all needed \code{msgid}s can be created +e.g. by the gnu gettext tool \verb|xgettext| with the option +\verb|-k SANE_I18N|. +The translator adds the translated texts to the \code{po} files. +The gettext tool \code{msgfmt} converts the \code{po} files to the +\code{mo} or \code{gmo} files.\\ + +Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function \code{gettext} +to translate the texts. This e.g. can look like this:\\ +\verb|snprintf(buf, sizeof(buf), gettext("english text"));| + +If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the \code{po} files to create its +own translation tables from it.\\ + +Note that it is strongly recommended to use the gettext tools. +\end{changebar} + + +\section{Operations} + +\subsection{\code{sane\_init}} + +This function must be called before any other SANE function can be +called. The behavior of a SANE backend is undefined if this function +is not called first. The version code of the backend is returned in +the value pointed to by \code{version\_code}. If that pointer is +\code{NULL}, no version code is returned. + Argument \code{authorize} is either a pointer to a function that is + invoked when the backend requires authentication for a specific + resource or \code{NULL} if the frontend does not support + authentication. +\begin{quote}\index{sane\_init} +\begin{verbatim} +SANE_Status sane_init (SANE_Int * version_code, + SANE_Authorization_Callback authorize); +\end{verbatim} +\end{quote} + +The authorization function may be called by a backend in response to +any of the following calls: +\begin{quote} + \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start} +\end{quote} +If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +The authentication function type has the following declaration: +\begin{quote}\index{SANE\_Authorization\_Callback} + \index{domain}\index{username}\index{password} +\begin{verbatim} +#define SANE_MAX_USERNAME_LEN 128 +#define SANE_MAX_PASSWORD_LEN 128 + +typedef void (*SANE_Authorization_Callback) + (SANE_String_Const resource, + SANE_Char username[SANE_MAX_USERNAME_LEN], + SANE_Char password[SANE_MAX_PASSWORD_LEN]); +\end{verbatim} +\end{quote} +Three arguments are passed to the authorization function: +\code{resource} is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The \code{username} +and \code{password} arguments are (pointers to) an array of +\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN} +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +{\em must\/} be ASCII-NUL terminated. + +\subsection{\code{sane\_exit}} + +This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to \code{sane\_clo\-se()}, but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than \code{sane\_init()} may be called (regardless +of the status value returned by \code{sane\_exit()}. Neglecting to +call this function may result in some resources not being released +properly. +\begin{quote}\index{sane\_exit} +\begin{verbatim} +void sane_exit (void); +\end{verbatim} +\end{quote} + + +\subsection{\code{sane\_get\_devices}} + +This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a \code{NULL} terminated array of pointers to \verb|SANE_Device| +structures in \code{*device\_list}. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to \code{sane\_exit()} is performed. This +function can be called repeatedly to detect when new devices become +available. If argument \code{local\_only} is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +\begin{quote}\index{sane\_get\_devices} +\begin{verbatim} +SANE_Status sane_get_devices (const SANE_Device *** device_list, + SANE_Bool local_only); +\end{verbatim} +\end{quote} + +This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an +insufficient amount of memory is available. + +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + SANE does not require that this function is called before a + \code{sane\_open()} call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. +\begin{changebar} + The same information about + a device has to be returned when \code{sane\_open} is called. +\end{changebar} +\end{quote} + + +\subsection{\code{sane\_open}} + +This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +\code{name}. If the call completes successfully, a handle for the +device is returned in \code{*h}. +\begin{changebar} +The description of the device +is returned in \code{**device\_description}. This is the +same description that is returned in the list by \code{sane\_get\_devices}. +The returned data \code{*h} and \code{*device\_description} is guaranteed +to remain unchanged and valid until a call to \code{sane\_close()} +is performed. +\end{changebar} +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +\begin{quote}\index{sane\_open} +\begin{verbatim} +SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h, +const SANE_Device ** device_description); +\end{verbatim} +\end{quote} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently + busy (in use by somebody else). +\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_close}} + +This function terminates the association between the device handle +passed in argument \code{h} and the device it represents. If the +device is presently active, a call to \code{sane\_cancel()} is +performed first. After this function returns, handle \code{h} must +not be used anymore. + +\begin{quote}\index{sane\_close} +\begin{verbatim} +void sane_close (SANE_Handle h); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_get\_option\_descriptor}} + +This function is used to access option descriptors. The function +returns the option descriptor for option number \code{n} of the device +represented by handle \code{h}. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle \code{h} (the count +includes option 0). If $n$ is not a valid option index, the function +returns \code{NULL}. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +\begin{quote}\index{sane\_get\_option\_descriptor} +\begin{verbatim} +const SANE_Option_Descriptor * + sane_get_option_descriptor (SANE_Handle h, SANE_Int n); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_control\_option}}\label{sec:control} + +This function is used to set or inquire the current value of option +number \code{n} of the device represented by handle \code{h}. The +manner in which the option is controlled is specified by parameter +\code{a}. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +\code{v}. It is a pointer to the memory that holds the option value. +The memory area pointed to by \code{v} must be big enough to hold the +entire option value (determined by member \code{size} in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument \code{v} may be shorter since the backend will stop +reading the option value upon encountering the first \code{NUL} +terminator in the string. If argument \code{i} is not \code{NULL}, +the value of \code{*i} will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +\begin{quote}\index{sane\_control\_option} +\begin{verbatim} +SANE_Status sane_control_option (SANE_Handle h, SANE_Int n, + SANE_Action a, void *v, + SANE_Int * i); +\end{verbatim} +\end{quote} + +The way the option is affected by a call to this function is +controlled by parameter \code{a} which is a value of type +\code{\defn{SANE\_Action}}. The possible values and their meaning is +described in Table~\ref{tab:actions}. + +\begin{table}[h] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\ + +\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The + option value passed through argument \code{v} may be modified by the + backend if the value cannot be set exactly. \\ + +\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter \code{v} is completely ignored in this case and + may be \code{NULL}. \\ + +\hline + \end{tabular} + \caption{Action Values (\code{SANE\_Action})} + \label{tab:actions} + \end{center} +\end{table} + +After setting a value via an action value of +\verb|SANE_ACTION_SET_VALUE|, additional information on how well the +request has been met is returned in \code{*i} (if \code{i} is +non-\code{NULL}). The returned value is a bitset that may contain any +combination of the values described in Table~\ref{tab:info}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in \code{*i} has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an + option may affect the value or availability of one or more {\em + other\/} options. When this happens, the SANE backend sets this + member in \code{*i} to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may + affect the parameter values (see \code{sane\_get\_parameters()}). + If setting an option affects the parameter values, this member will + be set in \code{*i}. Note that this member may be set even if the + parameters did not actually change. However, it is guaranteed that + the parameters never change without this member being set. \\ + +\hline + \end{tabular} + \caption{Additional Information Returned When Setting an Option} + \label{tab:info} + \end{center} +\end{table} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not + supported for the specified handle and option number. +\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + + +\subsection{\code{sane\_get\_parameters}} + +This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (\code{sane\_start()} has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +\code{sane\_start()} gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle \code{h} of the device for which the +parameters should be obtained and a pointer \code{p} to a parameter +structure. The parameter structure is described in more detail below. + +\begin{quote}\index{sane\_get\_parameters} +\begin{verbatim} +SANE_Status sane_get_parameters (SANE_Handle h, + SANE_Parameters * p); +\end{verbatim} +\end{quote} + +The scan parameters are returned in a structure of type +\code{\defn{SANE\_Parameters}}. The C declaration of this structure +is given below. +\begin{changebar} +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Frame format; + SANE_Int flags; + SANE_Int lines; + SANE_Int depth; + SANE_Int pixels_per_line; + SANE_Int bytes_per_line; + SANE_Int channels_per_image; + SANE_String format_desc; + SANE_String proposed_filename; + SANE_Int dpi_x; + SANE_Int dpi_y; + char reserved[32]; /* 32 bytes for future use */ + } +SANE_Parameters; +\end{verbatim} +\end{quote} + +Member \code{format} specifies the format of the next frame to be +returned. The possible values for type \code{\defn{SANE\_Frame}} are +described in Table~\ref{tab:frameformat}. The meaning of these +values is described in more detail in Section~\ref{sec:imageformat}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|c|c|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf SANE standard} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\ +\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\ +\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\ +\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\ + +\hline + \end{tabular} + \caption{Frame Format (\code{SANE\_Frame})} + \label{tab:frameformat} + \end{center} +\end{table} + +The \code{flags} member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +\begin{itemize} + +\item +\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). Note, that it is possible to transmit +multiple images in succession. + +\item +\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. It is permissible to set that value to 1 "in good +faith", as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer (e.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at \code{sane\_start()}. + +\item +\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +\item +\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tell if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +\end{itemize} + +Note, that flags is compatible to member \code{last\_frame} of +\code{SANE\_Parameters} of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). + + + +Member \code{lines} specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call \code{sane\_read()} until it +returns a status of \code{SANE\_STATUS\_EOF}. +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. + +Member \code{bytes\_per\_line} specifies the number of bytes that +comprise one scan line. +If bytes\_per\_line is set to 0, which can currently only be the case for +\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line +length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF} +with an arbitrary block length. + +Member \code{depth} specifies the number of bits per sample. +Note, that only 0 (for not applicable), 1, and n*8 are allowed +values. Data with other depths has to be scaled up accordingly. + +Member \code{pixels\_per\_line} specifies the number of pixels that +comprise one scan line. + +Assume $B$ is the number of channels in the frame, then the bit depth +$d$ (as given by member \code{depth}) and the number of pixels per +line $n$ (as given by this member \code{pixels\_per\_line}) are +related to $c$, the number of bytes per line (as given by member +\code{bytes\_per\_line}) as follows: +\[ + c >= \left\{ + \begin{array}{ll} + \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\ + B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$} + \end{array} + \right. +\] +Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +Member \code{channels\_per\_image} specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +\code{channels\_per\_image} has to be the same for all frames for this image. + +Member \code{format\_desc} is used for the new frametypes +\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs +between the two types: + +\begin{itemize} +\item +\code{SANE\_FRAME\_RAW}: +The \code{format\_desc} contains a description of the channel data and +an optional depth information separated by a colon(:). + +A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}". + +Channel interleaved data is described by a comma separated list of channel descriptions, +e.g. "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}", +the channel data is sent in the given order. + +The depth information does {\bf not} define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member \code{depth}. + +Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be \code{infrared} or +a wavelength description like \code{1100nm}, but be aware that a +frontend may not be able to display such channels with usefull colors. + +Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member \code{channels\_per\_image}. + +\item +\code{SANE\_FRAME\_MIME}: +The \code{format\_desc} contains the MIME type/subtype *(;parameter) +fields as described in RFC 1521, 4. The Content-Type Header Field, +without the prefixing "Content-Type:". +Note, that it is discouraged to transfer proprietary file formats over +SANE. If at all possible, please stick to the IANA assigned MIME types, +and make sure the datastream is compliant with the corresponding +specification. +When data is transmitted with the frame type \code{SANE\_FRAME\_MIME} +all data has to be transmitted within one frame, multiple frames +are not allowed (so the flag \code{last\_frame} has to be set +when using this frame type). +A fully compliant SANE backend is required to transmit in either +SANE native frametypes, or in a MIME type, for which a converting +middleend exists and is freely available for all platforms. + +Other formats may be transmitted, but the only thing the average +frontend can do with them, is save them. This is not considered a +good option, as it does not facilitate transmitting the data to a +client application that may be running the frontend. +However, if the data transferred by the backend is not an image in +nature, it wouldn't make sense to try converting it anyway, so it is +acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that +case. But even then, try to stick to well known stuff with freely +existing standards and viewers as well. +\end{itemize} + +The member \code{proposed\_filename} can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to "". + +In the case of non-MIME frames, this is expected to hold the basename for +the image, with the extension determined by the save function of the +frontend, as the frontend can fully understand the data and is thus able +to encode it in any format it wishes. + +For MIME frames it can contain either: + +\begin{itemize} +\item +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +\item +A complete filename, including extension. +\end{itemize} + +Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +In any case, if the frontend makes use of this field, the frontend +must mangle this proposal or the final filename it produces with +its help to suit local filesystem restrictions. + +Special care should be taken not to cause security flaws this way. +For Unix, that means killing out all path separators (/) [to avoid +to save away stuff in obscure places or create critical files like +/etc/hosts.allow] and avoiding to overwrite existing files. +(Creating of leading dot files - like .rhosts - is not an issue here, +because that's only a propose filename extension as mentioned above. + +The string \code{proposed\_comment} can be used to transmit additional +image data, that can be stored in the comment areas several fileformats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. + +The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different +resolutions of each image. It is not permissible to change resolution +between frames of the same image. + +The member \code{reserved} is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. +\end{changebar} + + +\subsection{\code{sane\_start}} + +This function initiates aquisition of an image from the device +represented by handle \code{h}. +\begin{quote}\index{sane\_start} +\begin{verbatim} +SANE_Status sane_start (SANE_Handle h); +\end{verbatim} +\end{quote} +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The + operation should be retried later. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\end{description} +\end{quote} + + +\subsection{\code{sane\_read}} + +This function is used to read image data from the device represented +by handle \code{h}. Argument \code{buf} is a pointer to a memory area +that is at least \code{maxlen} bytes long. The number of bytes +returned is stored in \code{*len}. A backend must set this to zero +when the call fails (i.e., when a status other than +\code{SANE\_STA\-TUS\_GOOD} is returned). When the call succeeds, the +number of bytes returned can be anywhere in the range from 0 to +\code{maxlen} bytes. +\begin{quote}\index{sane\_read} +\begin{verbatim} +SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf, + SANE_Int maxlen, SANE_Int * len); +\end{verbatim} +\end{quote} +For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle \code{h}. +\begin{enumerate} +\item If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +\item If the device is in non-blocking I/O mode, the call returns + immediately with status \code{SANE\_STA\-TUS\_GOOD} and with + \code{*len} set to zero. +\end{enumerate} +The I/O mode of handle \code{h} can be set via a call to +\code{sane\_set\_io\_mode()}. + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the + current frame. If \code{sane\_read} sends back any image data it +is not allowed to return with \code{SANE\_STATUS\_EOF}. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_cancel}} + +This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +\code{h}. +\begin{quote}\index{sane\_cancel} +\begin{verbatim} +void sane_cancel (SANE_Handle h); +\end{verbatim} +\end{quote} +This function can be called at any time (as long as handle \code{h} is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does {\em not\/} imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been {\em initiated}. Cancellation +completes only when the cancelled call returns (typically with a +status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must {\em not\/} call any other operation until the +cancelled operation has returned. + + +\subsection{\code{sane\_set\_io\_mode}} + +This function is used to set the I/O mode of handle \code{h}. The I/O +mode can be either blocking or non-blocking. If argument \code{m} is +\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise +it's set to blocking mode. +\begin{quote}\index{sane\_set\_io\_mode} +\begin{verbatim} +SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m); +\end{verbatim} +\end{quote} +By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete +successfully. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_get\_select\_fd}} + +This function is used to obtain a (platform-specific) file-descriptor +for handle \code{h} that is readable if and only if image data is +available (i.e., when a call to \code{sane\_read()} will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in \code{*fd}. +\begin{quote}\index{sane\_get\_select\_fd} +\begin{verbatim} +SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd); +\end{verbatim} +\end{quote} +This function can be called only after a call to \code{sane\_start()} +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until \code{sane\_cancel()} or \code{sane\_start()} get called again +or until \code{sane\_read()} returns with status +\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call \code{sane\_read()}. + +A backend may elect not to support this operation. In such a case, +the function returns with status code +\code{SANE\_STATUS\_UNSUPPORTED}. + +Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using \code{select()} +or \code{poll()} under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to \code{sane\_read()} is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_strstatus}} + +This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return \code{NULL}. +The returned pointer is valid at least until the next call to this +function is performed. +\begin{quote}\index{sane\_strstatus} +\begin{verbatim} +const SANE_String_Const sane_strstatus (SANE_Status status); +\end{verbatim} +\end{quote} + +\section{Code Flow}\index{code flow} + +The code flow for the SANE API is illustrated in +Figure~\ref{fig:flow}. Functions \code{sane\_init()} and +\code{sane\_exit()} initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +\begin{figure}[htb] + \begin{center} + \leavevmode + \psfig{file=figs/flow.eps,height=0.5\textheight} + \caption{Code flow} + \label{fig:flow} + \end{center} +\end{figure} + +Function \code{sane\_get\_devices()} can be called any time after +\code{sane\_init()} has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +Once a device has been chosen, it is opened using a call to +\code{sane\_open()}. Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +An opened device can be setup through the corresponding device handle +using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and +\code{sane\_control\_option()}. While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. However, as options are set, other options +may become active or inactive. Thus, after setting an option, it +maybe necessary to re-read some or all option descriptors. While +setting up the device, it is also admissible to call +\code{sane\_get\_parameters()} to get an estimate of what the image +parameters will look like once image acquisition begins. + +The device handle can be put in blocking or non-blocking mode by a +call to \code{sane\_set\_io\_mode()}. Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +After the device is setup properly, image acquisition can be started +by a call to \code{sane\_start()}. The backend calculates the exact +image parameters at this point. So future calls to +\code{sane\_get\_parameters()} will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to \code{sane\_read()} is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +\begin{changebar} +Image data is collected by repeatedly calling \code{sane\_read()} +until this function will return an end-of-file status +(\code{SANE\_STATUS\_EOF}). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels of a red/green/blue image or multiple images), +it can call \code{sane\_start()} again. +If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the +current image is complete. In this case, it should be tested, if +\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set. +If yes, further calls to \code{sane\_start()} can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on +and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other +than \code{SANE\_STATUS\_EOF} occurs in a SANE function. +Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend +to indicate the end of a multiple image scan. + +A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling \code{sane\_start} again, which will get +you to the next frame, without having to read and discard the current one. + +In order to prematurely stop scanning and to reset the backend state, +\code{sane\_cancel()} can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. + +When done using the device, the handle should be closed by a call to +\code{sane\_close()}. Finally, before exiting the application, +function \code{sane\_exit()} must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +The following C sample code implements a reference loop for acquiring +multiple images: + +\begin{verbatim} +SANE_Parameters parms; +SANE_Status status; + +do +{ + do + { + /* Now start acquiring the next frame. */ + status=sane_start(handle); + + /* if that failed, we have a problem, and no more frames can be + * read at this time. Due to SANE_PFLAG_MORE_IMAGES still + * being clear, this will break out of _BOTH_ loops. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now let us see what the next frame brings. */ + status=sane_get_parameters(handle,&parms); + + /* This actually should not fail, but maybe the doc feeder + * jammed or something, so we break as well, if something + * is wrong. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now we check the announced parameters, if we can make use + * of the frame data. If not, we skip over to the next frame. + */ + if ( do_i_like_that(&parms) == NO ) continue; + + /* Set up for reading the data here. Mangle filenames, + * allocate memory, rewind multiframe files, ask user + * for confirmation, ... + */ + setup_for_transfer(...); + + /* Now we read in the frame data and process it. This should + * return SANE_STATUS_GOOD, until the frame is complete, + * what causes SANE_STATUS_EOF to be returned. + */ + while( SANE_STATUS_GOOD == ( status=sane_read(...) ) ) + read_in_and_process_data_as_required(); + + /* If transfer was broken due to anything but EOF, break out. */ + if (status != SANE_STATUS_EOF) { + break; + } + + /* Now loop until we have all frames of an image. */ + } while(!(parms.flag & SANE_PFLAG_LAST_FRAME)); + +/* O.K. - we now have a complete image. Fit it together, save it, + * flush buffers, transmit it, increment filenames, etc. + */ + +/* Now check for more pending images. If we have more, redo from start. + * Some backends might cheat here and send us for an extra round which + * will fail at sane_start, as they were not able to determine if they + * would have more data at the start of the last frame we read. + */ +} while(parms.flags & SANE_PFLAG_MORE_IMAGES); + +/* No more data. Fine. Reset the backend and go back to option-control + * loop. + */ + +sane_cancel(handle); +\end{verbatim} + +\end{changebar} + + +\section{Well-Known Options}\index{well-known options} + +While most backend options are completely self-describing, there are a +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +\subsection{Option Number Count}\index{option count} + +Option number 0 has an empty string as its name. The value of this +option is of type \code{SANE\_TYPE\_INT} and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a +frontend can directly read out the value of option number 0. + +\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option} + +\begin{changebar} +Option \code{resolution} is used to select the resolution at which an +image should be acquired. When the backend wants to allow different +values for x- and y-resolution it has to define the options +\code{x\_resolution} and \code{y\_resolution}. Note that only +the option \code{resolution} {\bf or} the options +\code{x\_resolution} {\bf and} \code{y\_resolution} may be active. + +The type of this option is either \code{SANE\_TYPE\_INT} or +\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\subsection{Preview Mode Option}\index{preview mode} + +The boolean option \code{preview} is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to \code{SANE\_TRUE}, +preview mode is in effect, when set to \code{SANE\_FALSE} image +acquisition should proceed in normal quality mode. The setting of +this option \emph{must not\/} affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option \code{resolution}). A backend is free to override the +\code{resolution} value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. +\begin{changebar} +When the \code{preview} option is set the backend should transfer +the image in frame type \code{SANE\_FRAME\_RAW} if possible. +\end{changebar} + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +\subsection{Scan Area Options}\index{scan area options} + +The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure~\ref{fig:area}. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the {\em smallest} and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the {\em largest}. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +\begin{figure}[tbp] + \begin{center} + \leavevmode + \psfig{file=figs/area.eps,height=0.3\textheight} + \caption{Scan area options} + \label{fig:area} + \end{center} +\end{figure} + +The names of the four options that define the scan area are given in +the table below: +\begin{center} +\begin{tabular}{ll} +{\bf Name} & {\bf Description} \\ +\code{\defn{tl-x}} & Top-left $x$ coordinate value \\ +\code{\defn{tl-y}} & Top-left $y$ coordinate value \\ +\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\ +\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\ +\end{tabular} +\end{center} +There are several rules that should be followed by front and backends +regarding these options: +\begin{itemize} + +\item Backends must attach a unit of either pixels + (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to + these options. The unit of all four options must be identical. + +\item Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +\item A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +\item A frontend must work properly with any or all of these options + missing. + +\item A frontend may temporarily set the values in a way that +\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than +\code{br-y}. + +\end{itemize} + +\subsection{Depth option}\index{bit depth option} +\begin{changebar} +Option \code{depth} is used to select the image depth in bits/sample +in multi bit mode - (this means for 24 bit rgb mode this value must be 8). +The type of this option is \code{SANE\_TYPE\_INT}. +The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option \code{mode}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Gamma table options}\index{gamma table options} +\begin{changebar} +The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE} +of the type \code{SANE\_TYPE\_INT} which represent the gamma correction +table for gray. In color mode the \code{gamma-table} may be used to set +a common gamma correction for red, green and blue. The options +\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table} +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +\code{gamma-table} option, only the \code{red-}, \code{green-} and +\code{blue-gamma-table} or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +\begin{verbatim} +red_value = gamma-table(red-gamma-table(value)) +green_value = gamma-table(green-gamma-table(value)) +blue_value = gamma-table(blue-gamma-table(value)) +\end{verbatim} + +The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog\_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Mode options}\index{mode options} +\begin{changebar} +The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: \code{Color}, \code{Gray}, \code{Halftone} +and \code{Lineart}. \code{Color} and \code{Gray} are multi bit +modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart} +are single bit modes.\\ +This way a frontend can select e.g the mode \code{Gray} +for scanning a fax.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Source options}\index{source options} +\begin{changebar} +The option \code{source} is used to select the scansource +(e.g. Automatic Document Feeder). +It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and +\code{Automatic Document Feeder}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Threshold}\index{threshold option} +\begin{changebar} +The option \code{threshold} is used to define the threshold +for Lineart and may be Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It defines the minimum intensity to get a white point / full intensity +(image data bit = 0). The backend has to +scale the values in the following way:\\ +A value of 0.0 means all pixels get white /full intensity (all image data +bits are 0). A value of 50.0 means intensities brighter than medium gray +get white / full intensity (bit 0). A value of 100.0 means all pixels get +black (all image data bits are 1). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Analog gamma}\index{analog gamma option} +\begin{changebar} +The option \code{analog-gamma} is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_NONE}. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options \code{analog-gamma-red}, +\code{analog-gamma-green} and \code{analog-gamma-blue}. +It is not allowed to emulate an anlog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect to the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Shadow}\index{shadow options} +\begin{changebar} +The option \code{shadow} is used to define the shadow level / black point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). The backend has to scale the values in the following way:\\ +A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{shadow-red}, \code{shadow-green} +and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Highlight}\index{hightlight options} +\begin{changebar} +The option \code{highlight} is used to define the highlight level / white point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). The backend has to scale the values in the +following way:\\ +A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{highlight-red}, \code{highlight-green} +and \code{highlight-blue}, in this case \code{highlight} has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option} +\begin{changebar} +The option \code{lamp-on} is used to turn the lamp of the scanner on. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned on. + +The option \code{lamp-off} is used to turn the lamp of the scanner off. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned off. + +These options are not mandatory, but if a backend does support them, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Scanner buttons}\index{scanner button options} +\begin{changebar} +Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image.\\ + +A backend that does make available the scanner-buttons has to +implement the following options:\\ +\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\ +\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\ +\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\ +When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS} +or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined. + +A Frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +\begin{itemize} + +\item +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +\code{scanner-buttons-lock} to \code{SANE\_TRUE}. +While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE} +the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + + \begin{itemize} + \item + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \item + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \end{itemize} + +\item +The frontend does read the value of option \code{scanner-buttons-lock}. If +it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons. +If it is \code{SANE\_FALSE} then access has been denied. + +\item +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): + \begin{itemize} + \item + The frontend does set option \code{scanner-buttons-status-update}. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option \code{scanner-buttons-status}, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immedeatly and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE} + and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the \code{scanner-buttons-status} to 0. + + \item + The frontend does read the value of option \code{scanner-buttons-status} + \end{itemize} + +\item +When the frontend does exit or it does not want to use the buttons +it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of \code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\code{sane\_close()} should do the same as setting option +\code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\end{itemize} +\end{changebar} + + + +\input{net.tex} + +\chapter{Contact Information}\label{chap:contact} + +The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +\begin{quote}\index{mailing list} +\begin{verbatim} +majordomo@mostang.com +\end{verbatim} +\end{quote} +To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the +above address. + +A complete list of commands supported can be obtained by sending a +mail with a subject of ``\code{help}'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +\begin{quote} +\url{http://www.mostang.com/sane/} +\end{quote} + +\newpage +\input{sane.ind} + +\end{document} diff --git a/sane2/0.07/doc000.html b/sane2/0.07/doc000.html new file mode 100644 index 00000000..c35ca063 --- /dev/null +++ b/sane2/0.07/doc000.html @@ -0,0 +1,131 @@ + +Next +Previous +Previous +Contents +Index +
+Contents +

Contents

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1 Preface
1.1 About This Document
1.1.1 Typographic Conventions
2 Introduction
2.1 Terminology
3 The SANE Environment
3.1 Attaching to a SANE backend
3.2 Image Data Format
3.2.1 Pixel oriented frames
3.2.2 Arbitrary data frames
4 The SANE Application Programmer Interface (API)
4.1 Version Control
4.2 Data Types
4.2.1 Base Types
4.2.2 Boolean Type
4.2.3 Integer Type
4.2.4 Fixed-point Type
4.2.5 Text
4.2.5.1 Character Type
4.2.5.2 String Type
4.2.6 Scanner Handle Type
4.2.7 Status Type
4.2.8 Device Descriptor Type
4.2.9 Option Descriptor Type
4.2.9.1 Option Name
4.2.9.2 Option Title
4.2.9.3 Option Description
4.2.9.4 Option Value Type
4.2.9.5 Option Value Unit
4.2.9.6 Option Value Size
4.2.9.7 Option Capabilities
4.2.9.8 Option Value Constraints
4.2.10 Internationalization
4.2.10.1 How is a text marked for translation
4.2.10.2 Which texts shall be marked for translation?
4.2.10.3 File formats and translation functions
4.3 Operations
4.3.1 sane_init
4.3.2 sane_exit
4.3.3 sane_get_devices
4.3.4 sane_open
4.3.5 sane_close
4.3.6 sane_get_option_descriptor
4.3.7 sane_control_option
4.3.8 sane_get_parameters
4.3.9 sane_start
4.3.10 sane_read
4.3.11 sane_cancel
4.3.12 sane_set_io_mode
4.3.13 sane_get_select_fd
4.3.14 sane_strstatus
4.4 Code Flow
4.5 Well-Known Options
4.5.1 Option Number Count
4.5.2 Scan Resolution Options
4.5.3 Preview Mode Option
4.5.4 Scan Area Options
4.5.5 Depth option
4.5.6 Gamma table options
4.5.7 Scan Mode options
4.5.8 Scan Source options
4.5.9 Threshold
4.5.10 Analog gamma
4.5.11 Shadow
4.5.12 Highlight
4.5.13 Turn lamp on and off
4.5.14 Scanner buttons
5 Network Protocol
5.1 Data Type Encoding
5.1.1 Primitive Data Types
5.1.2 Type Constructors
5.2 Remote Procedure Call Requests
5.2.1 SANE_NET_INIT
5.2.2 SANE_NET_GET_DEVICES
5.2.3 SANE_NET_OPEN
5.2.4 SANE_NET_CLOSE
5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS
5.2.6 SANE_NET_CONTROL_OPTION
5.2.7 SANE_NET_GET_PARAMETERS
5.2.8 SANE_NET_START
5.2.9 SANE_NET_CANCEL
5.2.10 SANE_NET_AUTHORIZE
5.2.11 SANE_NET_EXIT
6 Contact Information
+ +

List of Figures

+ + + + + + + +
1Example SANE Hiearchy
2Transfer order of image data bytes
3Bit and byte order of image data
4Code flow
5Scan area options
+ + + +

List of Tables

+ + + + + + + + + + + +
1Status Codes
2Predefined Device Information Strings
3Option Value Types (SANE_Value_Type)
4Physical Units (SANE_Unit)
5Option Capabilities
6Option Value Constraints
7Action Values (SANE_Action)
8Additional Information Returned When Setting an Option
9Frame Format (SANE_Frame)
+ +


+Next +Previous +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc001.html b/sane2/0.07/doc001.html new file mode 100644 index 00000000..d3c3689c --- /dev/null +++ b/sane2/0.07/doc001.html @@ -0,0 +1,63 @@ + +Next +Up +Previous +Contents +Index +
+./sane + + + + +

+ + + + + + + +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ +

SANE Standard Version 2.0 proposal 0.07 - rauch/beck

+
+
Dec 5, 2002
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc002.html b/sane2/0.07/doc002.html new file mode 100644 index 00000000..fb16c3d7 --- /dev/null +++ b/sane2/0.07/doc002.html @@ -0,0 +1,31 @@ + +Next +Up +Previous +Contents +Index +
+ +Preface +

1 Preface

+ +

The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +6. + +

The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + +

1.1 About This Document


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc003.html b/sane2/0.07/doc003.html new file mode 100644 index 00000000..c6872c9c --- /dev/null +++ b/sane2/0.07/doc003.html @@ -0,0 +1,46 @@ + +Next +Up +Previous +Contents +Index +
+ +About This Document +

1.1 About This Document

+ +

This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +

The remainder of this document is organized as follows. +Chapter 2 provides introductional material. +Chapter 3 presents the environment SANE is designed +for. Chapter 4 details the SANE Application Programmer +Interface. Chapter 5 specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter 6 gives information on how +to join the SANE development process. + +

1.1.1 Typographic Conventions

+ +

Changes since the last revision of this document are highlighted +like this: + +

+ Paragraphs that changed since the last revision of the documention + are marked like this paragraph. + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc004.html b/sane2/0.07/doc004.html new file mode 100644 index 00000000..132e99aa --- /dev/null +++ b/sane2/0.07/doc004.html @@ -0,0 +1,38 @@ + +Next +Up +Previous +Contents +Index +
+ +Introduction +

2 Introduction

+ +

SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +

SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +

2.1 Terminology


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc005.html b/sane2/0.07/doc005.html new file mode 100644 index 00000000..1fbad177 --- /dev/null +++ b/sane2/0.07/doc005.html @@ -0,0 +1,24 @@ + +Next +Up +Previous +Contents +Index +
+ +Terminology +

2.1 Terminology

+ +

An application that uses the SANE interface is called a SANE + frontend. A driver that implements the SANE interface is called a +SANE backend. A meta backend provides some means to +manage one or more other backends. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc006.html b/sane2/0.07/doc006.html new file mode 100644 index 00000000..86d60331 --- /dev/null +++ b/sane2/0.07/doc006.html @@ -0,0 +1,41 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Environment +

3 The SANE Environment

+ +

SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +

Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE option. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +brightness whose value is an integer in the range from 0 to +255. + +

With self-describing options, a backend need not be concerned with +presentation issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the meaning of each option. It simply provides +means to present and alter the options defined by the backend. + +

3.1 Attaching to a SANE backend

3.2 Image Data Format


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc007.html b/sane2/0.07/doc007.html new file mode 100644 index 00000000..d088ed3d --- /dev/null +++ b/sane2/0.07/doc007.html @@ -0,0 +1,104 @@ + +Next +Up +Previous +Contents +Index +
+ +Attaching to a SANE backend +

3.1 Attaching to a SANE backend

+ +

The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +

    + +

  • Static linking: A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called be + would normally export a function called sane_read(). If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend be include a + header file that has lines of the form: +
    +
    +#define sane_read be_sane_read
    +
    +
    + With definitions of this kind, backend be will export + function name be_sane_read(). Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +

  • Dynamic linking: A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix sane_), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + +

    More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends on demand. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +

  • Network connection: Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +

+ +

+

+ + +

Figure 1: Example SANE Hiearchy
+ +
+

+ +

The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure 1. The figure shows that machine +A uses a dynamic-linking based meta backend called dll to +access the backends called pnm, mustek, and net. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called saned. The saned in +turn has access to the hp and autolum backends through +another instance of the dll backend. The autolum meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called qcam. + +

Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc008.html b/sane2/0.07/doc008.html new file mode 100644 index 00000000..ad148642 --- /dev/null +++ b/sane2/0.07/doc008.html @@ -0,0 +1,155 @@ + +Next +Up +Previous +Contents +Index +
+ +Image Data Format +

3.2 Image Data Format

+ +

Arguably the most important aspect of an image acquisition system is how +images are represented. The SANE approach is to define a simple yet powerful +representation that is sufficient for vast majority of applications and +devices. While the representation is simple, the interface has been defined +carefully to allow extending it in the future without breaking backwards +compatibility. Thus, it will be possible to accommodate future applications or +devices that were not anticipated at the time this standard was created. + +

A SANE image is a rectangular area. The rectangular area is subdivided into a +number of rows and columns. At the intersection of each row and column is a +(preferable quadratic) pixel. A pixel consists of one or more sample values. +Each sample value represents one channel (e.g., the red channel). + +

The SANE API transmits an image as a sequence of frames. Each frame covers +the same rectangular area as the entire image, but may contain only a subset +of the channels in the final image. For example, a red/green/blue image could +either be transmitted as a single frame that contains the sample values for +all three channels or it could be transmitted as a sequence of three frames: +the first frame containing the red channel, the second the green channel, and +the third the blue channel. + +

When transmitting an image frame by frame, the frontend needs to know what +part of the image a frame represents (and how many frames it should expect). +For that purpose, the SANE API tags every frame with a type and a format +descriptor. + +

+ There are two different types of frames: pixel oriented frames + SANE_FRAME_RAW and arbitrary data frames + SANE_FRAME_MIME. These types are discussed in detail in the + following sections. The frame types used by version 1 of this standard + (SANE_FRAME_GRAY, SANE_FRAME_RGB, + SANE_FRAME_RED, SANE_FRAME_GREEN, and + SANE_FRAME_BLUE) are obsolete and superseded by + SANE_FRAME_RAW. + +

3.2.1 Pixel oriented frames

+ +

The type of pixel oriented frames is SANE_FRAME_RAW. The + frame contains one or more channels of data in a channel-interleaved format, + that represents sample values from a property of the individual pixels that + is subject to further description in the format_desc member of the + SANE_Parameters structured type. See section 4.3.8 + on page 4.3.8 for details about the format + descriptions. + + +

Each sample value has a certain bit depth. The bit depth is fixed for the + entire image and can be as small as one bit. Valid bit depths are 1, 8, or + 16 bits per sample. If a device's natural bit depth is something else, it is + up to the driver to scale the sample values appropriately (e.g., a 4 bit + sample could be scaled by a factor of four to represent a sample value of + depth 8). + +

+ The complete image may consist of several different channels. The number of channels + is defined by member channels_per_image of SANE_Parameters. + The image may be transmitted in an arbitary number of frames which can be + determined by watching the SANE_PFLAG_LAST_FRAME flag in said type (or by + counting the channels). Note: This frame type replaces all frame types of + the SANE standard version 1. + + +

Conceptually, each pixel oriented frame is transmitted a byte at a time. Each +byte may contain 8 sample values (for an image bit depth of 1), one full +sample value (for an image bit depth of 8), or a partial sample value (for an +image bit depth of 16 or bigger). In the latter case, the bytes of each +sample value are transmitted in the machine's native byte order. +

+
+ Backend Implementation Note +
+ A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +
+ +

+

+ + +

Figure 2: Transfer order of image data bytes
+ +
+

+ +

The order in which the sample values in a frame are transmitted is illustrated +in Figure 2. As can be seen, the values are transmitted row by +row and each row is transmitted from left-most to right-most column. The +left-to-right, top-to-bottom transmission order applies when the image is +viewed in its normal orientation (as it would be displayed on a screen, for +example). + +

If a frame contains multiple channels, then the channels are transmitted in an +interleaved fashion. Figure 3 illustrates this for the case +where a frame contains a complete red/green/blue image with a bit-depth of 8. + +

+

+ + +

Figure 3: Bit and byte order of image data
+ +
+

+ +

For a bit depth of 1, each byte contains 8 sample values of a single +channel. In other words, a bit depth 1 frame is transmitted in a byte +interleaved fashion. The first sample of each byte is represented by the most +significant bit. + +

+For gray channels at a bit depth of 1 only two sample values are possible: 1 +represents minimum intensity (black) and 0 represents maximum intensity +(white). For all other channel types and bit depths a sample value of 0 +represents minimum intensity and larger values represent increasing intensity. + +

3.2.2 Arbitrary data frames

+ +

It also is possible to transmit arbitrary (not necessaryly pixel oriented) +data. This allows transmission of compressed images like jpeg, tiff, etc. + +

The type of arbitrary data frames is SANE_FRAME_MIME. +The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is +given in the format_desc member of the SANE_Parameters +structured type (see See section 4.3.8 on +page 4.3.8). As such, it is assumed to be +incomprehensible to the frontend, except for selected types the frontend is +specifically capable of handling internally. The frontend is free to ignore +those frames, or employ any appropriate means to otherwise handle this data +(like saving them to disk or spawning an external viewer). + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc009.html b/sane2/0.07/doc009.html new file mode 100644 index 00000000..43cd21b4 --- /dev/null +++ b/sane2/0.07/doc009.html @@ -0,0 +1,32 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Application Programmer Interface (API) +

4 The SANE Application Programmer Interface (API)

+ +

+This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called sane/sane-2.h. This file should +normally be included via a C pre-processor directive of the form: +

+  #include <sane/sane-2.h>
+
+ + +

4.1 Version Control

4.2 Data Types

4.3 Operations

4.4 Code Flow

4.5 Well-Known Options


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc010.html b/sane2/0.07/doc010.html new file mode 100644 index 00000000..8bb6685b --- /dev/null +++ b/sane2/0.07/doc010.html @@ -0,0 +1,77 @@ + +Next +Up +Previous +Contents +Index +
+ +Version Control +

4.1 Version Control

+ +

The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +

SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +

The SANE API provides the following five macros to manage version +numbers. +

+
+
SANE_CURRENT_MAJOR:
The value of this macro is the + number of the SANE standard that the interface implements. + +

SANE_VERSION_CODE(maj,min,bld):
+ + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (maj), the minor version number min, + and the build revision of a backend (bld). The major and + minor version numbers must be in the range 0...255 and the + build revision must be in the range 0...65535. + +

Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + +

Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + +

SANE_VERSION_MAJOR(vc):
This macro returns the + major version number component of the version code passed in + argument vc. +
SANE_VERSION_MINOR(vc):
This macro returns the + minor version number component of the version code passed in + argument vc. +
SANE_VERSION_BUILD(vc):
This macro returns the + build revision component of the version code passed in argument + vc. +
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc011.html b/sane2/0.07/doc011.html new file mode 100644 index 00000000..6f13f39b --- /dev/null +++ b/sane2/0.07/doc011.html @@ -0,0 +1,1001 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Types +

4.2 Data Types

+ +

4.2.1 Base Types

+ +

The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +

+ typedef some-scalar-type SANE_Byte;
+ typedef some-scalar-type SANE_Word
; +
+SANE_Byte must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. SANE_Word must be +capable of holding any of the following: +
    +
  • the truth values SANE_FALSE and SANE_TRUE +
  • signed integers in the range -231...231-1 +
  • fixed point values in the range -32768...32767.9999 with + a resolution of 1/65536 +
  • 32 bits (for bit sets) +
+Note that the SANE standard does not define what C type +SANE_Byte and SANE_Word map to. For example, on some +platforms, the latter may map to long int whereas on others it +may map to int. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +

4.2.2 Boolean Type

+ +

SANE_Bool is used for variables that can take one of +the two truth values SANE_FALSE and +SANE_TRUE. The former value is defined to be 0, +whereas the latter is 1.1 The C +declarations for this type are given below. +

+
+#define SANE_FALSE      0
+#define SANE_TRUE       1
+typedef SANE_Word SANE_Bool;
+
+
+Note that SANE_Bool is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Bool whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +

4.2.3 Integer Type

+ +

SANE_Int is used for variables that can take integer +values in the range -232 to 231-1. Its C declaration is +given below. +

+
+typedef SANE_Word SANE_Int;
+
+
+Note that SANE_Int is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Int whenever a given variable or formal argument has a +fixed interpretation as an integer object. + +

4.2.4 Fixed-point Type

+ +

SANE_Fixed is used for variables that can take fixed +point values in the range -32768 to 32767.9999 with a resolution +of 1/65535. The C declarations relating to this type are given +below. +

+
+#define SANE_FIXED_SCALE_SHIFT  16
+typedef SANE_Word SANE_Fixed;
+
+
+The macro SANE_FIXED_SCALE_SHIFT gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of 1/65536. + +

Note that SANE_Fixed is simply an alias of SANE_Word. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Fixed whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +

For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +

+
+ +

SANE_FIX(d):
Returns the largest SANE + fixed-point value that is smaller than the double value d. + No range checking is performed. If the value of d is out of + range, the result is undefined. + +

SANE_UNFIX(w):
Returns the nearest + double machine number that corresponds to fixed-point value + w. + +

+
+SANE does not require that the following two expressions hold +true (even if the values of w and d are in range): +
+
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+
+
+In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + +

4.2.5 Text

+ +

4.2.5.1 Character Type

+ +

Type SANE_Char represents a single text character or +symbol. At present, this type maps directly to the underlying C +char type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +sizeof(SANE_Char)==sizeof(char). +

+
+typedef char SANE_Char;
+
+
+ +

4.2.5.2 String Type

+ +

Type SANE_String represents a text string as a sequence +of C char values. The end of the sequence is indicated by a +'\0' (NUL) character. +

+
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+
+
+The type SANE_String_Const is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +
+
+const SANE_String str;
+
+
+declares a string pointer that is constant (not a string pointer that +points to a constant value). + +

4.2.6 Scanner Handle Type

+ +

Access to a scanner is provided through an opaque type called +SANE_Handle. The C declaration of this type is given +below. +

+
+typedef void *SANE_Handle;
+
+
+While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a SANE_Handle. In +particular, SANE does not require that a value of this type is a legal +pointer value. + +

4.2.7 Status Type

+ +

Most SANE operations return a value of type SANE_Status +to indicate whether the completion status of the operation. If an +operation completes successfully, SANE_STATUS_GOOD is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table 1. It is recommended to use function +sane_strstatus() to convert status codes into a legible +string. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +SANE_STATUS_GOOD + 0 Operation completed succesfully.
+SANE_STATUS_UNSUPPORTED + 1 Operation is not supported.
+SANE_STATUS_CANCELLED + 2 Operation was cancelled.
+SANE_STATUS_DEVICE_BUSY + 3 Device is busy---retry later.
+SANE_STATUS_INVAL + 4 Data or argument is invalid.
+SANE_STATUS_EOF + 5 No more data available (end-of-file).
+SANE_STATUS_JAMMED + 6 Document feeder jammed.
+SANE_STATUS_NO_DOCS + 7 Document feeder out of documents.
+SANE_STATUS_COVER_OPEN + 8 Scanner cover is open.
+SANE_STATUS_IO_ERROR + 9 Error during device I/O.
+SANE_STATUS_NO_MEM + 10 Out of memory.
+SANE_STATUS_ACCESS_DENIED + 11 Access to resource has been denied.
+ +
+

Table 1: Status Codes
+
+

+ +

4.2.8 Device Descriptor Type

+ + +

Each SANE device is represented by a structure of type +SANE_Device. The C declaration of this type is given +below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const vendor;
+    SANE_String_Const model;
+    SANE_String_Const type;
+    SANE_String_Const email_backend_author;
+    SANE_String_Const backend_website;
+    SANE_String_Const device_location;
+    SANE_String_Const comment;
+    SANE_String_Const reserved_string;
+    SANE_Int backend_version_code;
+    SANE_Int backend_capablity_flags;
+    SANE_Int reserved_int;
+  }
+SANE_Device;
+
+
+
+ +The structure provides the unique name of the scanner in member +name. It is this unique name that should be passed in a call +to sane_open(). The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is recommended that backends keep +unique names below 32 characters in length. However, applications +must be able to cope with arbitrary length unique names. + +

The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members vendor, model, and type are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vendor Strings
+ + AGFA Microtek
+ Abaton Minolta
+ Acer Mustek
+ Apple NEC
+ Artec Nikon
+ Avision Plustek
+ CANON Polaroid
+ Connectix Ricoh
+ Epson Sharp
+ Fujitsu Siemens
+ Hewlett-Packard Tamarack
+ IBM UMAX
+ Kodak Noname
+ Logitech
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Type Strings
+ + film scanner
+ flatbed scanner
+ frame grabber
+ handheld scanner
+ multi-function peripheral
+ sheetfed scanner
+ still camera
+ video camera
+ virtual device
+ +
+ +

Table 2: Predefined Device Information Strings
+ +
+

+Note that vendor string Noname can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +

+The backend has to set up the string email_backend_author +with the name and the email address of the backend author or a contact person +in the format: +

+Firstname Lastname <name@domain.org>
+
+ +

The string backend_website has to be set up by the backend +with the website or ftp address of the backend in the format: +

+http://www.domain.org/sane-hello/index.html
+
+ +

The backend should fill the string device_location with a +text that describes where a user can find this device, the text +should be read from the backend config file. This could e.g. look +like this: +

+building 93, 2nd plane, room 2124
+
+ +

The string comment can be used to display any comment to the user, +the text should be read from the backend config file. + +

The string reserved_string is planed for future use, the backend +has to set this string to "". + +

With member backend_version_code a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +

The member backend_capability_flags contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +

The member reserved_int is planned for future use, the backend has +to set the value of the integer to 0. + + +

4.2.9 Option Descriptor Type

+ +

Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +SANE_Option_Descriptor type is given below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const title;
+    SANE_String_Const desc;
+    SANE_Value_Type type;
+    SANE_Unit unit;
+    SANE_Int size;
+    SANE_Int cap;
+    SANE_Constraint_Type constraint_type;
+    union
+      {
+        const SANE_String_Const *string_list;
+        const SANE_Word *word_list;
+        const SANE_Range *range;
+      }
+    constraint;
+  }
+SANE_Option_Descriptor;
+
+
+ +

4.2.9.1 Option Name

+ +

Member name is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (a--z), +digits (0--9), or the dash character (-) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +

4.2.9.2 Option Title

+ +

Member title is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +

4.2.9.3 Option Description

+ +

Member desc is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +

4.2.9.4 Option Value Type

+ +

Member type specifies the type of the option value. The +possible values for type SANE_Value_Type are described +in Table 3. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_TYPE_BOOL

0 Option value is of type + SANE_Bool.
+ +

SANE_TYPE_INT

1 Option value is of type + SANE_Int.
+ +

SANE_TYPE_FIXED

2 Option value is of type + SANE_Fixed.
+ +

SANE_TYPE_STRING

3 Option value is of type + SANE_String.
+ +

SANE_TYPE_BUTTON

4 An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper.
+ +

SANE_TYPE_GROUP

5 An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members title and +type are valid in the option descriptor.
+ +

+

+

Table 3: Option Value Types (SANE_Value_Type)
+ +
+

+ +

4.2.9.5 Option Value Unit

+ +

Member unit specifies what the physical unit of the option +value is. The possible values for type SANE_Unit are +described in Table 4. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_UNIT_NONE

0 Value is unit-less (e.g., page count).
+SANE_UNIT_PIXEL 1 Value is in number of pixels.
+SANE_UNIT_BIT 2 Value is in number of bits.
+SANE_UNIT_MM 3 Value is in millimeters.
+SANE_UNIT_DPI 4 Value is a resolution in dots/inch.
+SANE_UNIT_PERCENT 5 Value is a percentage.
+SANE_UNIT_MICROSECOND 6 Value is time in µ-seconds.
+ +

+

+

Table 4: Physical Units (SANE_Unit)
+ +
+

+ +

4.2.9.6 Option Value Size

+ +

Member size specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +

+
+
SANE_TYPE_STRING:
The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating NUL character is considered to be part of the + string. Note that the terminating NUL character must + always be present in string option values. +
SANE_TYPE_INT, SANE_TYPE_FIXED:
The size + must be a positive integer multiple of the size of a + SANE_Word. The option value is a vector of length + +

+

+ size/sizeof(SANE_Word).
+

+

SANE_TYPE_BOOL:
The size must be set to + sizeof(SANE_Word). +
SANE_TYPE_BUTTON, SANE_TYPE_GROUP:
The + option size is ignored. +
+
+ +

4.2.9.7 Option Capabilities

+ +

Member cap describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table 5. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +

+
+ +

SANE_OPTION_IS_ACTIVE(cap):
This macro + returns SANE_TRUE if and only if the option with the + capability set cap is currently active. + +

SANE_OPTION_IS_SETTABLE(cap):
This + macro returns SANE_TRUE if and only if the option with the + capability set cap is software settable. +
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_CAP_SOFT_SELECT

1 The option + value can be set by a call to sane_control_option().
+ +

SANE_CAP_HARD_SELECT

2 The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE_CAP_SOFT_SELECT (either one of them can be set, but not both + simultaneously).
+ +

SANE_CAP_SOFT_DETECT

4 The option + value can be detected by software. If + SANE_CAP_SOFT_SELECT is set, this capability must + be set. If SANE_CAP_HARD_SELECT is set, this capability + may or may not be set. If this capability is set but neither + SANE_CAP_SOFT_SELECT nor SANE_CAP_HARD_SELECT + are, then there is no way to control the option. That is, the + option provides read-out of the current value only.
+ +

SANE_CAP_EMULATED

8 If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option.
+ +

SANE_CAP_AUTOMATIC

16 If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling sane_control_option() + with an action value of SANE_ACTION_SET_AUTO.
+ +

SANE_CAP_INACTIVE

32 If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value).
+ +

SANE_CAP_ADVANCED

64 + If set, this capability indicates that the option should be + considered an ``advanced user option.'' A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). +
+ +

+

+

Table 5: Option Capabilities
+ +
+

+ +

4.2.9.8 Option Value Constraints

+ +

It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member constraint_type indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member constraint. The possible values of type +SANE_Constraint_Type and the interpretation of the +constraint union is described in Table 6. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_CONSTRAINT_NONE

0 The value is unconstrained. + The option can take any of the values possible for the option's + type.
+ +

SANE_CONSTRAINT_RANGE

1 This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member constraint.range points to + a range of the type SANE_Range. This type is illustrated + below: +
+
+typedef struct
+  {
+    SANE_Word min;
+    SANE_Word max;
+    SANE_Word quant;
+  }
+SANE_Range;
+
+
+ All three members in this structure are interpreted according to the + option value type (SANE_TYPE_INT or SANE_TYPE_FIXED). + Members min and max specify the minimum and maximum + values, respectively. If member quant is non-zero, it + specifies the quantization value. If l is the minimum value, u + the maximum value and q the (non-zero) quantization of a range, + then the legal values are v=k*q+l for all non-negative + integer values of k such that v<=u.
+ +

SANE_CONSTRAINT_WORD_LIST

2 This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + constraint.word_list points to a list of words that + enumerates the legal values. The first element in that list is an + integer (SANE_Int) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (SANE_TYPE_INT or SANE_TYPE_FIXED).
+ +

SANE_CONSTRAINT_STRING_LIST

3 This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + constraint.string_list points to a NULL terminated + list of strings that enumerate the legal values for the option + value. +
+
+

Table 6: Option Value Constraints
+ +
+

+ +

4.2.10 Internationalization

+ +All backend texts should be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +

4.2.10.1 How is a text marked for translation

+ +

The keyword SANE_I18N is used to mark a text for translation. +SANE_I18N has to be defined as a dummy prototype: + +

+
+#ifndef SANE_I18N
+#  define SANE_I18N(text) text
+#endif
+
+
+ +

You should not mark prototypes or variables with SANE_I18N +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (SANE_I18N(START_SCAN_TEXT)) and +variables (SANE_I18N(option[7].name)). + +

A correct marked text can look like this:
+snprintf(buf, sizeof(buf), SANE_I18N("Start scan")
+or
+#define START_SCAN_TEXT SANE_I18N("Start scan").
+It also is allowed to mark texts in structs because the +prototype SANE_I18N has no effect to the compiler. + +

4.2.10.2 Which texts shall be marked for translation?

+All option texts that are visible for the user should be marked for +translation. This is: +
    +
  • +member title +
  • +member desc +
  • +member string_list +
+of SANE_Option_Descriptor. + +

It is not allowed to mark/translate member name. +Please also do not mark any error or debug messages that are +displayed by the backend. + +

4.2.10.3 File formats and translation functions

+The recommended file formats for translation tables are the po files +and mo or gmo files. +The po file contains the original text marked with the keyword msgid +and the translated text marked with the keyword msgstr. +A po file that contains all needed msgids can be created +e.g. by the gnu gettext tool xgettext with the option +-k SANE_I18N. +The translator adds the translated texts to the po files. +The gettext tool msgfmt converts the po files to the +mo or gmo files.
+ +

Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function gettext +to translate the texts. This e.g. can look like this:
+snprintf(buf, sizeof(buf), gettext("english text")); + +

If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the po files to create its +own translation tables from it.
+ +

Note that it is strongly recommended to use the gettext tools. + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc012.html b/sane2/0.07/doc012.html new file mode 100644 index 00000000..f4399328 --- /dev/null +++ b/sane2/0.07/doc012.html @@ -0,0 +1,874 @@ + +Next +Up +Previous +Contents +Index +
+ +Operations +

4.3 Operations

+ +

4.3.1 sane_init

+ +

This function must be called before any other SANE function can be called. +The behavior of a SANE backend is undefined if this function is not called +first or if the status code returned by sane_init is different from +SANE_STATUS_GOOD. The version code of the backend is returned +in the value pointed to by version_code. If that pointer is +NULL, no version code is returned. Argument authorize is either +a pointer to a function that is invoked when the backend requires +authentication for a specific resource or NULL if the frontend does not +support authentication. +

+
+SANE_Status sane_init (SANE_Int * version_code,
+                       SANE_Authorization_Callback authorize);
+
+
+ +

The authorization function may be called by a backend in response to +any of the following calls: +

+ sane_open, sane_control_option, sane_start +
+If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +

The authentication function type has the following declaration: +

+ +
+#define SANE_MAX_USERNAME_LEN   128
+#define SANE_MAX_PASSWORD_LEN   128
+
+typedef void (*SANE_Authorization_Callback)
+    (SANE_String_Const resource,
+     SANE_Char username[SANE_MAX_USERNAME_LEN],
+     SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+
+
+Three arguments are passed to the authorization function: +resource is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The username +and password arguments are (pointers to) an array of +SANE_MAX_USERNAME_LEN and SANE_MAX_PASSWORD_LEN +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +must be ASCII-NUL terminated. + +

4.3.2 sane_exit

+ +

This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to sane_close(), but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than sane_init() may be called (regardless +of the status value returned by sane_exit(). Neglecting to +call this function may result in some resources not being released +properly. +

+
+void sane_exit (void);
+
+
+ +

4.3.3 sane_get_devices

+ +

This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a NULL terminated array of pointers to SANE_Device +structures in *device_list. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to sane_exit() is performed. This +function can be called repeatedly to detect when new devices become +available. If argument local_only is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +

+
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+                              SANE_Bool local_only);
+
+
+ +

This function may fail with SANE_STATUS_NO_MEM if an +insufficient amount of memory is available. + +

+
+ Backend Implementation Note +
+ SANE does not require that this function is called before a + sane_open() call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. + + The same information about + a device has to be returned when sane_open is called. + +
+ +

4.3.4 sane_open

+ +

This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +name. If the call completes successfully, a handle for the +device is returned in *h. + +The description of the device +is returned in **device_description. This is the +same description that is returned in the list by sane_get_devices. +The returned data *h and *device_description is guaranteed +to remain unchanged and valid until a call to sane_close() +is performed. + +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +

+
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+
+
+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_DEVICE_BUSY:
The device is currently + busy (in use by somebody else). +
SANE_STATUS_INVAL:
The device name is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.5 sane_close

+ +

This function terminates the association between the device handle +passed in argument h and the device it represents. If the +device is presently active, a call to sane_cancel() is +performed first. After this function returns, handle h must +not be used anymore. + +

+
+void sane_close (SANE_Handle h);
+
+
+ +

4.3.6 sane_get_option_descriptor

+ +

This function is used to access option descriptors. The function +returns the option descriptor for option number n of the device +represented by handle h. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle h (the count +includes option 0). If n is not a valid option index, the function +returns NULL. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +

+
+const SANE_Option_Descriptor *
+    sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+
+
+ +

4.3.7 sane_control_option

+ +

This function is used to set or inquire the current value of option +number n of the device represented by handle h. The +manner in which the option is controlled is specified by parameter +a. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +v. It is a pointer to the memory that holds the option value. +The memory area pointed to by v must be big enough to hold the +entire option value (determined by member size in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument v may be shorter since the backend will stop +reading the option value upon encountering the first NUL +terminator in the string. If argument i is not NULL, +the value of *i will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +

+
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+                                 SANE_Action a, void *v,
+                                 SANE_Int * i);
+
+
+ +

The way the option is affected by a call to this function is +controlled by parameter a which is a value of type +SANE_Action. The possible values and their meaning is +described in Table 7. + +

+

+ + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_ACTION_GET_VALUE

0 Get current option value.
+ +

SANE_ACTION_SET_VALUE

1 Set option value. The + option value passed through argument v may be modified by the + backend if the value cannot be set exactly.
+ +

SANE_ACTION_SET_AUTO

2 Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter v is completely ignored in this case and + may be NULL.
+ +

+

+

Table 7: Action Values (SANE_Action)
+ +
+

+ +

After setting a value via an action value of +SANE_ACTION_SET_VALUE, additional information on how well the +request has been met is returned in *i (if i is +non-NULL). The returned value is a bitset that may contain any +combination of the values described in Table 8. +

+

+ + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_INFO_INEXACT

1 This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in *i has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value.
+ +

SANE_INFO_RELOAD_OPTIONS

2 The setting of an + option may affect the value or availability of one or more + other options. When this happens, the SANE backend sets this + member in *i to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed.
+ +

SANE_INFO_RELOAD_PARAMS

4 The setting of an option may + affect the parameter values (see sane_get_parameters()). + If setting an option affects the parameter values, this member will + be set in *i. Note that this member may be set even if the + parameters did not actually change. However, it is guaranteed that + the parameters never change without this member being set.
+ +

+

+

Table 8: Additional Information Returned When Setting an Option
+ +
+

+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_UNSUPPORTED:
The operation is not + supported for the specified handle and option number. +
SANE_STATUS_INVAL:
The option value is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the option has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.8 sane_get_parameters

+ +

This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (sane_start() has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +sane_start() gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle h of the device for which the +parameters should be obtained and a pointer p to a parameter +structure. The parameter structure is described in more detail below. + +

+
+SANE_Status sane_get_parameters (SANE_Handle h,
+                                 SANE_Parameters * p);
+
+
+ +

The scan parameters are returned in a structure of type +SANE_Parameters. The C declaration of this structure +is given below. + +

+
+typedef struct
+  {
+    SANE_Frame format;
+    SANE_Int flags;
+    SANE_Int lines;
+    SANE_Int depth;
+    SANE_Int pixels_per_line;
+    SANE_Int bytes_per_line;
+    SANE_Int channels_per_image;
+    SANE_String format_desc;
+    SANE_String proposed_filename;
+    SANE_Int dpi_x;
+    SANE_Int dpi_y;
+    char reserved[32]; /* 32 bytes for future use */
+  }
+SANE_Parameters;
+
+
+ + +

+Member format specifies the format of the next frame to be +returned. The possible values for type SANE_Frame are +described in Table 9. The meaning of these +values is described in more detail in Section 3.2. +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeSANE standardDescription
+ +

+ +

SANE_FRAME_GRAY

0 version 1 Band covering human visual range.
+SANE_FRAME_RGB 1 version 1 Pixel-interleaved red/green/blue bands.
+SANE_FRAME_RED 2 version 1 Red band of a red/green/blue image.
+SANE_FRAME_GREEN 3 version 1 Green band of a red/green/blue image.
+SANE_FRAME_BLUE 4 version 1 Blue band of a red/green/blue image.
+SANE_FRAME_RAW 5 version 2 Arbitrary pixel property transmission.
+SANE_FRAME_MIME 6 version 2 Data described by a mime descriptor.
+ +

+

+

Table 9: Frame Format (SANE_Frame)
+ +
+

+ +

The flags member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +

    + +

  • +SANE_PFLAG_LAST_FRAME (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). Note, that it is possible to transmit +multiple images in succession. + +

  • +SANE_PFLAG_MORE_IMAGES (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. It is permissible to set that value to 1 "in good +faith", as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer. E.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at sane_start(). + +

  • +SANE_PFLAG_NEW_PAGE (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +

  • +SANE_PFLAG_BACKSIDE (bit 3, bitvalue 8) tells if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +

+ +

Note, that flags is compatible to member last_frame of +SANE_Parameters of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). + +

Member lines specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call sane_read() until it +returns a status of SANE_STATUS_EOF. +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. + +

Member bytes_per_line specifies the number of bytes that +comprise one scan line. +If bytes_per_line is set to 0, which can currently only be the case for +SANE_FRAME_MIME, the frontend shall not assume a constant line +length. Instead it should simply try to read until SANE_STATUS_EOF +with an arbitrary block length. + +

Member depth specifies the number of bits per sample. +Note, that only 0 (for not applicable), 1, and n*8 are allowed +values. Data with other depths has to be scaled up accordingly. + +

Member pixels_per_line specifies the number of pixels that +comprise one scan line. + +

Assume B is the number of channels in the frame, then the bit depth +d (as given by member depth) and the number of pixels per +line n (as given by this member pixels_per_line) are +related to c, the number of bytes per line (as given by member +bytes_per_line) as follows: + +

+

+ + c >= \left{ + ll + \lceil B*n / 8\rceil if d=1 +(1) + + B*n *\lceil (d + 7)/8 \rceil if d>1 + + \right. +
+

+Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +

Member channels_per_image specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +channels_per_image has to be the same for all frames for this image. + +

Member format_desc is used for the new frametypes +SANE_FRAME_RAW and SANE_FRAME_MIME. Its meaning differs +between the two types: + +

    +
  • +SANE_FRAME_RAW: +The format_desc contains a description of the channel data and +an optional depth information separated by a colon(:). + +

    A plane is descibed by one channel, e.g. "gray" or "gray:12". + +

    Channel interleaved data is described by a comma separated list of channel descriptions, +for example "red,green,blue" or "red:8,green:8,blue:8", +the channel data is sent in the given order. + +

    The depth information does not define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member depth. + +

    Well known channels are red, green, blue and gray. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be infrared or +a wavelength description like 1100nm, but be aware that a +frontend may not be able to display such channels with useful colors. + +

    Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member channels_per_image. + +

  • +SANE_FRAME_MIME: +The format_desc contains the MIME type/subtype *(;parameter) +fields as described in RFC 1521, 4. The Content-Type header field, +without the prefixing "Content-Type:". +Note, that it is discouraged to transfer proprietary file formats over +SANE. If at all possible, please stick to the IANA assigned MIME types, +and make sure the data stream is compliant with the corresponding +specification. +When data is transmitted with the frame type SANE_FRAME_MIME +all data has to be transmitted within one frame, multiple frames +are not allowed (so the flag last_frame has to be set +when using this frame type). +A fully compliant SANE backend is required to transmit in either +SANE native frametypes, or in a MIME type, for which a converting +meta backend exists and is freely available for all platforms. + +

    Other formats may be transmitted, but the only thing the average +frontend can do with them, is save them. This is not considered a +good option, as it does not facilitate transmitting the data to a +client application that may be running the frontend. +However, if the data transferred by the backend is not an image in +nature, it wouldn't make sense to try converting it anyway, so it is +acceptable to use a simple SANE_FRAME_MIME transfer for that +case. But even then, try to stick to well known stuff with freely +existing standards and viewers as well. +

+ +

The member proposed_filename can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to "". + +

In the case of raw frames, proposed_filename is expected to hold +the basename for the image, with the extension determined by the save function +of the frontend, as the frontend can fully understand the data and is thus +able to encode it in any format it wishes. + +

For MIME frames proposed_filename can contain either: + +

    +
  • +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +

  • +A complete filename, including extension. +
+ +

Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +

In any case, if the frontend makes use of this field, the frontend +must mangle this proposal or the final filename it produces with +its help to suit local filesystem restrictions. + +

Special care should be taken not to cause security flaws this way. +For Unix, that means killing out all path separators (/) [to avoid +to save away stuff in obscure places or create critical files like +/etc/hosts.allow] and avoiding to overwrite existing files. +(Creating of leading dot files - like .rhosts - is not an issue here, +because that's only a proposed filename extension as mentioned above. + +

The string proposed_comment can be used to transmit additional +image data, that can be stored in the comment areas several fileformats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. + +

The members dpi_x, dpi_y encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different +resolutions of each image. It is not permissible to change resolution +between frames of the same image. + +

The member reserved is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. + + +

4.3.9 sane_start

+ +

This function initiates aquisition of an image from the device +represented by handle h. +

+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes. +
+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_DEVICE_BUSY:
The device is busy. The + operation should be retried later. +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_INVAL:
The scan cannot be started with the current + set of options. The frontend should reload the option descriptors, as if + SANE_INFO_RELOAD_OPTIONS had been returned from a call to + sane_control_option(), since the device's capabilities may have + changed. +
+
+ +

4.3.10 sane_read

+ +

This function is used to read image data from the device represented +by handle h. Argument buf is a pointer to a memory area +that is at least maxlen bytes long. The number of bytes +returned is stored in *len. A backend must set this to zero +when a status other than SANE_STATUS_GOOD is returned). +When the call succeeds, the number of bytes returned can be anywhere in +the range from 0 to maxlen bytes. +

+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+                       SANE_Int maxlen, SANE_Int * len);
+
+
+For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle h. +
    +
  1. If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +

  2. If the device is in non-blocking I/O mode, the call returns + immediately with status SANE_STATUS_GOOD and with + *len set to zero. +
+The I/O mode of handle h can be set via a call to +sane_set_io_mode(). + +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_EOF:
No more data is available for the + current frame. If sane_read sends back any image data it +is not allowed to return with SANE_STATUS_EOF. +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.11 sane_cancel

+ +

This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +h. +

+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does not imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been initiated. Cancellation +completes only when the cancelled call returns (typically with a +status value of SANE_STATUS_CANCELLED). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must not call any other operation until the +cancelled operation has returned. + +

4.3.12 sane_set_io_mode

+ +

This function is used to set the I/O mode of handle h. The I/O mode +can be either blocking or non-blocking. If argument m is +SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to +blocking mode. This function can be called only after a call to +sane_start() has been performed. +

+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value SANE_STATUS_UNSUPPORTED is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument m set to SANE_FALSE is guaranteed to complete +successfully. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support +the requested I/O mode. +
+
+ +

4.3.13 sane_get_select_fd

+ +

This function is used to obtain a (platform-specific) file-descriptor +for handle h that is readable if and only if image data is +available (i.e., when a call to sane_read() will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in *fd. +

+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start() +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until sane_cancel() or sane_start() get called again +or until sane_read() returns with status +SANE_STATUS_EOF). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +sane_read() call would return SANE_STATUS_EOF. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call sane_read(). + +

A backend may elect not to support this operation. In such a case, +the function returns with status code +SANE_STATUS_UNSUPPORTED. + +

Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using select() +or poll() under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to sane_read() is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support + this operation. +
+
+ +

4.3.14 sane_strstatus

+ +

This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return NULL. +The returned pointer is valid at least until the next call to this +function is performed. +

+
+const SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc013.html b/sane2/0.07/doc013.html new file mode 100644 index 00000000..1f26de30 --- /dev/null +++ b/sane2/0.07/doc013.html @@ -0,0 +1,197 @@ + +Next +Up +Previous +Contents +Index +
+ +Code Flow +

4.4 Code Flow

+ +

The code flow for the SANE API is illustrated in +Figure 4. Functions sane_init() and +sane_exit() initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +

+

+ + +

Figure 4: Code flow
+ +
+

+ +

Function sane_get_devices() can be called any time after +sane_init() has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +

Once a device has been chosen, it is opened using a call to +sane_open(). Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +

An opened device can be setup through the corresponding device handle +using functions sane_get_option_descriptor() and +sane_control_option(). While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. However, as options are set, other options +may become active or inactive. Thus, after setting an option, it +may be necessary to re-read some or all option descriptors. While +setting up the device, it is also admissible to call +sane_get_parameters() to get an estimate of what the image +parameters will look like once image acquisition begins. + +

The device handle can be put in blocking or non-blocking mode by a +call to sane_set_io_mode(). Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +

After the device is setup properly, image acquisition can be started +by a call to sane_start(). The backend calculates the exact +image parameters at this point. So future calls to +sane_get_parameters() will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to sane_read() is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +sane_set_io_mode() and/or sane_get_select_fd() at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +

+Image data is collected by repeatedly calling sane_read() +until this function will return an end-of-file status +(SANE_STATUS_EOF). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels of a red/green/blue image or multiple images), +it can call sane_start() again. +If the SANE_PFLAG_LAST_FRAME bit is set in flags, the +current image is complete. In this case, it should be tested, if +flags has the SANE_PFLAG_MORE_IMAGES bit set. +If yes, further calls to sane_start() can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +sane_start() return an error like SANE_STATUS_NO_DOCS. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with SANE_PFLAG_LAST_FRAME on +and SANE_PFLAG_MORE_IMAGES off is encountered, or an error other +than SANE_STATUS_EOF occurs in a SANE function. +Note that SANE_STATUS_NO_DOCS also is an allowed way for the backend +to indicate the end of a multiple image scan. + +

A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling sane_start again, which will get +you to the next frame, without having to read and discard the current one. + +

In order to prematurely stop scanning and to reset the backend state, +sane_cancel() can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. + +

When done using the device, the handle should be closed by a call to +sane_close(). Finally, before exiting the application, +function sane_exit() must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +

The following C sample code implements a reference loop for acquiring +multiple images: + +

+SANE_Parameters parms; 
+SANE_Status     status; 
+
+do
+{ 
+  do
+  { 
+    /* Now start acquiring the next frame. */ 
+    status=sane_start(handle); 
+
+    /* if that failed, we have a problem, and no more frames can be 
+     * read at this time. Due to SANE_PFLAG_MORE_IMAGES still 
+     * being clear, this will break out of _BOTH_ loops. 
+     */ 
+    if (status != SANE_STATUS_GOOD) break; 
+
+    /* Now let us see what the next frame brings. */ 
+    status=sane_get_parameters(handle,&parms); 
+
+    /* This actually should not fail, but maybe the doc feeder 
+     * jammed or something, so we break as well, if something 
+     * is wrong. 
+     */ 
+    if (status != SANE_STATUS_GOOD) break; 
+
+    /* Now we check the announced parameters, if we can make use 
+     * of the frame data. If not, we skip over to the next frame. 
+     */ 
+    if ( do_i_like_that(&parms) == NO ) continue; 
+
+    /* Set up for reading the data here. Mangle filenames, 
+     * allocate memory, rewind multiframe files, ask user 
+     * for confirmation, ... 
+     */ 
+    setup_for_transfer(...); 
+
+    /* Now we read in the frame data and process it. This should 
+     * return SANE_STATUS_GOOD, until the frame is complete, 
+     * what causes SANE_STATUS_EOF to be returned. 
+     */ 
+    while( SANE_STATUS_GOOD == ( status=sane_read(...) ) ) 
+          read_in_and_process_data_as_required(); 
+
+    /* If transfer was broken due to anything but EOF, break out. */ 
+    if (status != SANE_STATUS_EOF) { 
+        break; 
+    } 
+
+    /* Now loop until we have all frames of an image. */ 
+  } while(!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+/* O.K. - we now have a complete image. Fit it together, save it, 
+ * flush buffers, transmit it, increment filenames, etc. 
+ */ 
+
+/* Now check for more pending images. If we have more, redo from start. 
+ * Some backends might cheat here and send us for an extra round which 
+ * will fail at sane_start, as they were not able to determine if they 
+ * would have more data at the start of the last frame we read. 
+ */ 
+} while(parms.flags & SANE_PFLAG_MORE_IMAGES); 
+
+/* No more data. Fine. Reset the backend and go back to option-control 
+ * loop. 
+ */ 
+
+sane_cancel(handle); 
+
+ +

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc014.html b/sane2/0.07/doc014.html new file mode 100644 index 00000000..9ad35325 --- /dev/null +++ b/sane2/0.07/doc014.html @@ -0,0 +1,455 @@ + +Next +Up +Previous +Contents +Index +
+ +Well-Known Options +

4.5 Well-Known Options

+ +

While most backend options are completely self-describing, there are +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +

4.5.1 Option Number Count

+ +

Option number 0 has an empty string as its name. The value of this +option is of type SANE_TYPE_INT and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +sane_get_option_descriptor() returns NULL, or a +frontend can directly read out the value of option number 0. + +

4.5.2 Scan Resolution Options

+ +

+Option resolution is used to select the resolution at which an +image should be acquired. When the backend wants to allow different +values for x- and y-resolution it has to define the options +x_resolution and y_resolution. Note that only +the option resolution or the options +x_resolution and y_resolution may be active. + +

The type of this option is either SANE_TYPE_INT or +SANE_TYPE_FIXED. The unit is SANE_UNIT_DPI (dots/inch). + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

4.5.3 Preview Mode Option

+ +

The boolean option preview is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to SANE_TRUE, +preview mode is in effect, when set to SANE_FALSE image +acquisition should proceed in normal quality mode. The setting of +this option must not affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option resolution). A backend is free to override the +resolution value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. + +When the preview option is set the backend should transfer +the image in frame type SANE_FRAME_RAW if possible. + + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +

4.5.4 Scan Area Options

+ +

The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure 5. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the smallest and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the largest. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +

+

+ + +

Figure 5: Scan area options
+ +
+

+ +

The names of the four options that define the scan area are given in +the table below: +

+ + + + + + + + + + + + + + + + + + +
+Name Description
+tl-x Top-left x coordinate value
+tl-y Top-left y coordinate value
+br-x Bottom-right x coordinate value
+br-y Bottom-right y coordinate value
+
+
+There are several rules that should be followed by front and backends +regarding these options: +
    + +

  • Backends must attach a unit of either pixels + (SANE_UNIT_PIXEL) or millimeters (SANE_UNIT_MM) to + these options. The unit of all four options must be identical. + +

  • Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +

  • A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +

  • A frontend must work properly with any or all of these options + missing. + + +
  • A frontend may temporarily set the values in a way that +tl-x is larger than br-x and tl-y is larger than +br-y. + + +

+ +

4.5.5 Depth option

+ +Option depth is used to select the image depth in bits/sample +in multi bit mode - (this means for 24 bit RGB mode this value must be 8). +The type of this option is SANE_TYPE_INT. +The unit is SANE_UNIT_BIT. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option mode.
+ +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.6 Gamma table options

+ +The gamma-table option defines a SANE_CONSTRAINT_RANGE +of the type SANE_TYPE_INT which represents the gamma correction +table for gray. In color mode the gamma-table may be used to set +a common gamma correction for red, green and blue. The options +red-gamma-table, green-gamma-table and blue-gamma-table +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +gamma-table option, only the red-, green- and +blue-gamma-table or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +
+red_value   = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value  = gamma-table(blue-gamma-table(value))
+
+ +

The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend.
+ +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.7 Scan Mode options

+ +The option mode defines a SANE_CONSTRAINT_STRING_LIST +of type SANE_TYPE_STRING. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: Color, Gray, Halftone +and Lineart. Color and Gray are multi bit +modes (8 or 16 bits/sample), Halftone and Lineart +are single bit modes.
+This way a frontend can select e.g the mode Gray +for scanning a fax.
+ +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.8 Scan Source options

+ +The option source is used to select the scan source +(e.g. Automatic Document Feeder). +It defines a SANE_CONSTRAINT_STRING_LIST +of type SANE_TYPE_STRING. +Well known sources are: Flatbed, Transparancy Adapter and +Automatic Document Feeder.
+ +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.9 Threshold

+ +The option threshold is used to define the threshold +for Lineart and maybe Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It defines the minimum intensity to get a white point / full intensity +(image data bit = 0). The backend has to +scale the values in the following way:
+A value of 0.0 means all pixels get white /full intensity (all image data +bits are 0). A value of 50.0 means intensities brighter than medium gray +get white / full intensity (bit 0). A value of 100.0 means all pixels get +black (all image data bits are 1). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30...70 percent). + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.10 Analog gamma

+ +The option analog-gamma is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_NONE. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options analog-gamma-red, +analog-gamma-green and analog-gamma-blue. +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +

When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect on the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.11 Shadow

+ +The option shadow is used to define the shadow level / black point level. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). The backend has to scale the values in the following way:
+A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30...70 percent). +In color mode there can be options shadow-red, shadow-green +and shadow-blue, in this case the shadow function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.12 Highlight

+ +The option highlight is used to define the highlight level / white point level. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). The backend has to scale the values in the +following way:
+A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30...70 percent). +In color mode there can be options highlight-red, highlight-green +and highlight-blue, in this case highlight has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.
+
+ +

4.5.13 Turn lamp on and off

+ +The option lamp-on is used to turn the lamp of the scanner on. +The type of this option is SANE_TYPE_BUTTON. +The unit is SANE_UNIT_NONE. When the option is set +then the lamp of the scanner is turned on. + +

The option lamp-off is used to turn the lamp of the scanner off. +The type of this option is SANE_TYPE_BUTTON. +The unit is SANE_UNIT_NONE. When the option is set +then the lamp of the scanner is turned off. + +

These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition.
+
+ +

4.5.14 Scanner buttons

+ +Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image.
+ +

A backend that does make available the scanner-buttons has to +implement the following options:
+scanner-buttons-lock is of type SANE_TYPE_BOOL, default = SANE_FALSE
+scanner-buttons-status is of type SANE_TYPE_INT, default = 0
+scanner-buttons-status-update is of type SANE_TYPE_BUTTON
+When setting these options the backend does not set SANE_INFO_RELOAD_OPTIONS +or SANE_INFO_RELOAD_PARAMS if not explictly defined. + +

A frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +

    + +

  • +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +scanner-buttons-lock to SANE_TRUE. +While setting the value of option scanner-buttons-lock to SANE_TRUE +the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + +

      +
    • + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option scanner-buttons-lock is set to SANE_TRUE +
    • + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option scanner-buttons-lock is set to SANE_FALSE. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option scanner-buttons-lock is set to SANE_TRUE +
    + +

  • +The frontend does read the value of option scanner-buttons-lock. If +it is SANE_TRUE then the frontend has access to the scanner buttons. +If it is SANE_FALSE then access has been denied. + +

  • +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): +
      +
    • + The frontend does set option scanner-buttons-status-update. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option scanner-buttons-status, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immedeatly and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option scanner-buttons-lock to SANE_FALSE + and does set SANE_INFO_RELOAD_OPTIONS to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the scanner-buttons-status to 0. + +

    • + The frontend does read the value of option scanner-buttons-status +
    + +

  • +When the frontend does exit or it does not want to use the buttons +it does set option scanner-buttons-lock to SANE_FALSE. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of scanner-buttons-lock to SANE_FALSE. + +

    sane_close() should do the same as setting option +scanner-buttons-lock to SANE_FALSE. + +

+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc015.html b/sane2/0.07/doc015.html new file mode 100644 index 00000000..9f831204 --- /dev/null +++ b/sane2/0.07/doc015.html @@ -0,0 +1,82 @@ + +Next +Up +Previous +Contents +Index +
+ +Network Protocol +

5 Network Protocol

+ +

The SANE interface has been designed to facilitate network access to +image acquisition devices. In particular, most SANE implementations +are expected to support a network backend (net client) and a +corresponding network daemon (net server) that allows accessing image +acquisition devices through a network connection. Network access is +useful in several situations: +

    + +

  • To provide controlled access to resources that are inaccessible + to a regular user. For example, a user may want to access a device + on a host where she has no account on. With the network protocol, + it is possible to allow certain users to access scanners without + giving them full access to the system. + +

    Controlling access through the network daemon can be useful even in + the local case: for example, certain backends may require root + privileges to access a device. Rather than installing each frontend + as setuid-root, a system administrator could instead install the + SANE network daemon as setuid-root. This enables regular users to + access the privileged device through the SANE daemon (which, + presumably, supports a more fine-grained access control mechanism + than the simple setuid approach). This has the added benefit that + the system administrator only needs to trust the SANE daemon, not + each and every frontend that may need access to the privileged + device. + +

  • Network access provides a sense of ubiquity of the available + image acquisition devices. For example, in a local area network + environment, this allows a user to log onto any machine and have + convenient access to any resource available to any machine on the + network (subject to permission constraints). + +

  • For devices that do not require physical access when used (e.g., + video cameras), network access allows a user to control and use + these devices without being in physical proximity. Indeed, if such + devices are connected to the Internet, access from any place in the + world is possible. + +

+ +

The network protocol described in this chapter has been design with +the following goals in mind: +

    + +

  1. Image transmission should be efficient (have low encoding + overhead). + +

  2. Accessing option descriptors on the client side must be + efficient (since this is a very common operation). + +

  3. Other operations, such as setting or inquiring the value of an + option are less performance critical since they typically require + explicit user action. + +

  4. The network protocol should be simple and easy to implement on + any host architecture and any programming language. + +

+The SANE protocol can be run across any transport protocol that +provides reliable data delivery. While SANE does not specify a +specific transport protocol, it is expected that TCP/IP will be among +the most commonly used protocols. + +

5.1 Data Type Encoding

5.2 Remote Procedure Call Requests


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc016.html b/sane2/0.07/doc016.html new file mode 100644 index 00000000..a15ef654 --- /dev/null +++ b/sane2/0.07/doc016.html @@ -0,0 +1,89 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Type Encoding +

5.1 Data Type Encoding

+ +

5.1.1 Primitive Data Types

+ +

The four primitive types of the SANE standard are encoded as follows: +

+ +

SANE_Byte:
A byte is encoded as an 8 bit value. + Since the transport protocol is assumed to be byte-orientd, the bit + order is irrelevant. + +

SANE_Word:
A word is encoded as 4 bytes (32 + bits). The bytes are ordered from most-significant to + least-significant byte (big-endian byte-order). + +

SANE_Char:
A character is currently encoded as an 8-bit + ISO LATIN-1 value. An extension to support wider character sets (16 or 32 + bits) is planned for the future, but not supported at this point. + +

SANE_String:
A string pointer is encoded as a + SANE_Char array. The trailing NUL byte is considered part + of the array and a NULL pointer is encoded as a zero-length + array. + +
SANE_Handle:
A handle is encoded like a word. + The network backend needs to take care of converting these integer + values to the opaque pointer values that are presented to the user + of the network backend. Similarly, the SANE daemon needs to take + care of converting the opaque pointer values it receives from its + backends into 32-bit integers suitable for use for network encoding. + +

enumeration types:
Enumeration types are encoded + like words. + +

+ +

5.1.2 Type Constructors

+ +

Closely following the type constructors of the C language, the SANE network +protocol supports the following four constructors: +

+ +

pointer:
A pointer is encoded by a word that indicates + whether the pointer is a NULL-pointer which is then followed by the + value that the pointer points to (in the case of a non-NULL pointer; + in the case of a NULL pointer, no bytes are encoded for the pointer + value). + +

array:
An array is encoded by a word that indicates + the length of the array followed by the values of the elements in + the array. The length may be zero in which case no bytes are + encoded for the element values. + +

structure:
A structure is encoded by simply encoding the + structure members in the order in which they appear in the + corresponding C type declaration. + +

union:
A union must always be accompanied by a tag + value that indicates which of the union members is the currently the + active one. For this reason, the union itself is encoded simply by + encoding the value of the currently active member. + +

+ +

Note that for type constructors, the pointer, element, or member +values themselves may have a constructed type. Thus, the above rules +should be applied recursively until a sequence of primitive types has +been found. + +

Also SANE had no need for encoding of circular structures. This +greatly simplifies the network protocol. + +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc017.html b/sane2/0.07/doc017.html new file mode 100644 index 00000000..bbeeabb6 --- /dev/null +++ b/sane2/0.07/doc017.html @@ -0,0 +1,460 @@ + +Next +Up +Previous +Contents +Index +
+ +Remote Procedure Call Requests +

5.2 Remote Procedure Call Requests

+ +

The SANE network protocol is a client/server-style remote procedure +call (RPC) protocol. This means that all activity is initiated by the +client side (the network backend)---a server is restricted to +answering request by the client. + +

5.2.1 SANE_NET_INIT

+ +

This RPC establishes a connection to a particular SANE network daemon. +It must be the first call in a SANE network session. The parameter +and reply arguments for this call are shown in the table below: +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word version_code SANE_Word status
+ SANE_String user_name SANE_Word version_code
+
+
+The version_code argument in the request is the SANE +version-code of the network backend that is contacting the network +daemon (see Section 4.1). The +``build-revision'' in the version code is used to hold the network +protocol version. The SANE network daemon receiving such a request +must make sure that the network protocol version corresponds to a +supported version since otherwise the encoding of the network stream +may be incompatible (even though the SANE interface itself may be +compatible). The user_name argument is the name of the user +on whose behalf this call is being performed. If the network backend +cannot determine a user-name, it passes a NULL pointer for this +argument. No trust should be placed in the authenticity of this +user-name. The intent of this string is to provide more convenience +to the user. E.g., it could be used as the default-user name in +subsequent authentication calls. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values.2 The version_code argument returns the +SANE version-code that the network daemon supports. See the comments +in the previous paragraph on the meaning of the build-revision in this +version code. + +

5.2.2 SANE_NET_GET_DEVICES

+ +

This RPC is used to obtain the list of devices accessible by the SANE +daemon. +

+ + + + + + + + + + + + +
+ request: reply:
+ void SANE_Word status
+ SANE_Device ***device_list
+
+
+There are no arguments in the request for this call. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The device_list +argument is a pointer to a NULL-terminated array of +SANE_Device pointers. + +

5.2.3 SANE_NET_OPEN

+ +

This RPC is used to open a connection to a remote SANE device. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String device_name SANE_Word status
+ SANE_Word handle
+ SANE_String resource
+
+
+The device_name argument specifies the name of the device to +open. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The handle +argument specifies the device handle that uniquely identifies the +connection. The resource argument is used to request +authentication. If it has a non-NULL value, the network +backend should authenticate the specified resource and then retry this +operation (see Section 5.2.10 for details on how to +authorize a resource). + +

5.2.4 SANE_NET_CLOSE

+ +

This RPC is used to close a connection to a remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection that should be +closed. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS

+ +

This RPC is used to obtain all the option descriptors for a +remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle Option_Descriptor_Array odesc
+
+
+The handle argument identifies the remote device whose option +descriptors should be obtained. + +

In the reply, the odesc argument is used to return the array of +option descriptors. The option descriptor array has the following +structure: +

+
+struct Option_Descriptor_Array
+  {
+    SANE_Word num_options;
+    SANE_Option_Descriptor **desc;
+  };
+
+
+ +

5.2.6 SANE_NET_CONTROL_OPTION

+ +

This RPC is used to control (inquire, set, or set to automatic) a +specific option of a remote SANE device. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word option SANE_Word info
+ SANE_Word action SANE_Word value_type
+ SANE_Word value_type SANE_Word value_size
+ SANE_Word value_size void *value
+ void *value SANE_String *resource
+
+
+The handle argument identifies the remote device whose option +should be controlled. Argument option is the number (index) of +the option that should be controlled. Argument action +specifies what action should be taken (get, set, or set automatic). +Argument value_type specifies the type of the option value +(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT, +SANE_TYPE_FIXED, SANE_TYPE_STRING, +SANE_TYPE_BUTTON). Argument value_size specifies +the size of the option value in number of bytes (see +Section 4.2.9.6 for the precise meaning of this value). +Finally, argument value is a pointer to the option value. It +must be a writeable area that is at least value_size bytes +large. (Note that this area must be writable even if the action is to +set the option value. This is because the backend may not be able to +set the exact option value, in which case the option value is used to +return the next best value that the backend has chosen.) + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has undefined +values. The info argument returns the information on how well +the backend was able to satisfy the request. For details, see the +description of the corresponding argument in +Section 4.3.7. Arguments value_type and +value_size have the same values as the arguments by the same +name in corresponding request. The values are repeated here to ensure +that both the request and the reply are self-contained (i.e., they can +be encoded and decoded independently). Argument value is holds +the value of the option that has become effective as a result of this +RPC. + +

5.2.7 SANE_NET_GET_PARAMETERS

+ +

This RPC is used to obtain the scan parameters of a remote SANE +device. +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Parameters params
+
+
+The handle argument identifies the connection to the remote +device whose scan parameters should be returned. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The argument +params is used to return the scan parameters. + +

5.2.8 SANE_NET_START

+ +

This RPC is used to start image acquisition (scanning). +

+ + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word port
+ SANE_Word byte_order
+ SANE_String resource
+
+
+The handle argument identifies the connection to the remote +device from which the image should be acquired. + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument, status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has +undefined values. The argument port returns the port number +from which the image data will be available. To read the image data, +a network client must connect to the remote host at the indicated port +number. Through this port, the image data is transmitted as a +sequence of data records. Each record starts with the data length in +bytes. The data length is transmitted as a sequence of four bytes. +These bytes should be interpreted as an unsigned integer in big-endian +format. The four length bytes are followed by the number of data +bytes indicated by the length. Except for byte-order, the data is in +the same format as defined for sane_read(). Since some +records may contain no data at all, a length value of zero is +perfectly valid. The special length value of 0xffffffff is +used to indicate the end of the data stream. That is, after receiving +a record length of 0xffffffff, the network client should close +the data connection and stop reading data. + +

Argument byte_order specifies the byte-order of the image +data. A value of 0x1234 indicates little-endian format, a value of +0x4321 indicates big-endian format. All other values are presently +undefined and reserved for future enhancements of this protocol. The +intent is that a network server sends data in its own byte-order and +the client is responsible for adjusting the byte-order, if necessary. +This approach causes no unnecessary overheads in the case where the +server and client byte-order match and puts the extra burden on the +client side when there is a byte-order mismatch. Putting the burden +on the client-side improves the scalability properties of this +protocol. + +

5.2.9 SANE_NET_CANCEL

+ +

This RPC is used to cancel the current operation of a remote SANE +device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection whose operation +should be cancelled. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.10 SANE_NET_AUTHORIZE

+ + +

This RPC is used to pass authorization data from the net client to the +net server. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String resource SANE_Word dummy
+ SANE_String username
+ SANE_String password
+
+
+The resource argument specifies the name of the resource to be +authorized. This argument should be set to the string returned in the +resource argument of the RPC reply that required this +authorization call. The username and password are the +name of the user that is accessing the resource and the password for +the specified resource/user pair. + +

Since the password is not encrypted during network transmission, it is +recommended to use the following extension: + +

If the server adds the string `$MD5$' to the resource-name followed +by a random string not longer then 128 bytes, the client may answer with the +MD5 digest of the concatenation of the password and the random string. To +differentiate between the MD5 digest and a strange password the client prepends +the MD5 digest with the string `$MD5$'. + +

In the reply, dummy is completely unused. Note that there is +no direct failure indication. This is unnecessary since a net client +will retry the RPC that resulted in the authorization request until +that call succeeds (or until the request is cancelled). The RPC that resulted +in the authorization request continues after the reply from the client and may +fail with SANE_STATUS_ACCESS_DENIED. + +

5.2.11 SANE_NET_EXIT

+ +

This RPC is used to disconnect a net client from a net server. There +are no request or reply arguments in this call. As a result of this +call, the connection between the client and the server that was +established by the SANE_NET_INIT call will be closed. + +

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc018.html b/sane2/0.07/doc018.html new file mode 100644 index 00000000..5cf8613d --- /dev/null +++ b/sane2/0.07/doc018.html @@ -0,0 +1,43 @@ + +Next +Up +Previous +Contents +Index +
+ +Contact Information +

6 Contact Information

+ +

The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +

+
+majordomo@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the +above address. + +

A complete list of commands supported can be obtained by sending a +mail with a subject of ``help'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +

+http://www.mostang.com/sane/ +
+ +

+ + + +

+


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/doc019.html b/sane2/0.07/doc019.html new file mode 100644 index 00000000..3b7092a4 --- /dev/null +++ b/sane2/0.07/doc019.html @@ -0,0 +1,207 @@ + +Previous +Up +Previous +Contents +Index +
+

Index

+ + +

+

analog gamma option
+array
+ +

bit depth option
+br-x
+br-y
+ +

code flow
+ +

device-name
+domain
+ +

enumeration types
+ +

gamma table options
+ +

hightlight options
+ +

image data format
+ +

lamp-off option
+lamp-on option
+ +

mailing list
+mode options
+ +

network authorization
+NUL
+ +

option count
+Option_Descriptor_Array
+ +

password
+pointer
+preview mode
+ +

resolution option
+ +

SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+scanner button options
+shadow options
+source options
+structure
+ +

threshold option
+tl-x
+tl-y
+Type Strings
+ +

union
+username
+ +

Vendor Strings
+ +

well-known options
+


+Previous +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/footnotes.html b/sane2/0.07/footnotes.html new file mode 100644 index 00000000..6478c6a8 --- /dev/null +++ b/sane2/0.07/footnotes.html @@ -0,0 +1,7 @@ +Footnotes

Footnotes

+ +


1 This is different from ANSI C where + any non-zero integer value represents logical TRUE. +


2 The sane network + daemon should be careful not to leak information in the undefined + portion of the reply. diff --git a/sane2/0.07/img000.gif b/sane2/0.07/img000.gif new file mode 100644 index 0000000000000000000000000000000000000000..2fb575aa150e4e889bcf72598fd383d1cc01ad04 GIT binary patch literal 6930 zcmV+t8|~yrNk%w1VGIL+0igf@0002y=H~zZ{{R31A^8LW00062EC2ui01N|w0YC!& zRF0|3?GK}zwAzca-n{!C2;xYV=82~2%C;s5$MQ_q_Kj0U&iDQg3<^Q6qVb444wuZP z^Euo>r#=9}dH`UxTrC3|@Or~nYnQ7ykE!fi@(qs{+jPqKZU%3+S$#Nv)hC#sR%Zw! zb*Q+=*eE0i85!B6RtZvB=%~3_lgRlA8Y+q)S!!xzw>FBSy6W2G`6@e0`*V7WE21@0 z3kuc?Y!MqwTx=YXo7}RCdc67TY&;xIT}`W;3~*}g2+ch^{q5mxO)ma{9jBcxavotG z4ey>2KA$0<hx*XAUwzR@M-p?R#s^_=h{F!wr&T# z9Qazq1vf5EmwrPPwukrO;g1OI0v4Pkr@O`O5|`sdd9BM^fg!7q+~ed#G8OGEupD!z z>Uo?!BLOWgvpCegoXKu;yUkM9_+09!n@OvMPo2E?(c1Pzk-X>SR zTp=aue;sf)1oM023*vD;6R^bKjG9G~}TQ zfxj4dh7I9qfM6H?jr0dd2}XDzAw1cqm4g9-$2+1Z7M$d-&Y-grZPUxoNWTO zY_-#hTI+SU-Xx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BzwWXFg=+%QNSZ_qKsDg9gW$tOuuvB)iX!3ajcWW4Z1 zEdqoxhb#f45kMvnOcTQ^l^K%DIayk5u_S46GCniA8I39V=nS+=%`(F?7Cmj`vrjt^ z#X(C!AyuiIQSJ=0!$zCJ^qWT`?G%VFF#wesL%sgf^e0oD;ndSrI}kM$S4XuJK2$AJ zR8>}S)qv7cU@eE#=V&d>RylJmHYxmetxnNpMGKY$W1%f0*+qV3iU zC^!Iv&Kn!l)?5_1^;X?=_n1-4bC-2?7k25bcM2uTgx5@Y1F+ZMe>0FRD1C9{7vO^t zUZmGv|7AGghancj;Upr4Wa5f3&e(%$F7CEtjX|#XUdLnIP?ogiV#%uZ zl#x@SS=X1Vz_~~%2r;CK1(*P&=br^3Lg+${;<=DOk|rb&rHQn;Rh@69dc{M|I_i%t zj9#LVK^%}oji3SfB5PHg7DQ{AjgvYltNkN^`$4FmJ_Ko|@ebSRy;D{iZ@zu@0&4o) zmR9am4o_V1#f>VQ@y8*LT=K~&uiWy>G0$A{%{lMf^UpyKJy5nqFFj<^#{%~{ucHuG zb)a2Q-HI&GqWy~2Q8!(8mR^_L_us+jU0knc7M^F|2Qi)tN{85M=(~vqn)oj~Xo7m! ziAOv4-MP1Bh}f+!+xF~>0d0JnC(;~kHGNK;#8&S$m--VS`p1J~ci*9hAU&wm|6!|cX)wxNx1aC)1N Y@-_&zz(Fs3MFXJ+VHiUhuB!k5JG^_nT>t<8 literal 0 HcmV?d00001 diff --git a/sane2/0.07/img001.gif b/sane2/0.07/img001.gif new file mode 100644 index 0000000000000000000000000000000000000000..a94820977e0adb25772b8002cd0231935dbc66b8 GIT binary patch literal 1011 zcmV(0j83c9Z0Jwhj?3reFa37D>rM8(|L?~221r8GJ39kQdyAWEo6Fm~y6YP( zObI+}eEe68yv&^0{0x1k98F!lG;N)&t+?IoorL`@KJG?M3i#Y>2Z6f0W1h%uwa{*4?N6od$Jh(k00 z1&$17O~hrdb&HlY?`KaU5kADAie#-X#_b2S{pGg5iHXvdE7I@Er z2(F{xg10$nSA!7ZgI0wWUWj3a8gewkgq?Z#A&Aw9h!R7ukyv75xuFPBDlJIJ;xDT) z5o17n!C0de#YL2(R?89BqjGpXDBq4S;b@JKk0CkGk3piKT4-}9`6M^B%%qT$Remx` z2V0u6%LHG_1sV@hj;V`lFif&xn{K`dXPg$Pg(ihqo>(VPOy*gKmjCbx2$ebl+K`{O z>?xd~`ygtgqF6C{sH5~jx`v=z0u&i1cGDW{bbW}T?wEM%goGG^+Is(Xp~ zqO0A&8mp{Hvf8Sxv%1KbuAo?&j;~SxtCg@M5G&0KrFw>1VqeHsr7SVbLKy8e(;8bs zIH?voB(~1Hn3lJPg3GJ812rVsjOI$aZLLts32(ge&MPOK>yp{7WA_eo=5+fm`Y*r% z!&B|R$r#Ka!s-;PFjWnM`7p#0kHhf9ZB%S=r5S&N@x~;1JS)iCbSyG&CC77ek||e1 z^2*1#Oc=~D%ghI literal 0 HcmV?d00001 diff --git a/sane2/0.07/img002.gif b/sane2/0.07/img002.gif new file mode 100644 index 0000000000000000000000000000000000000000..f2b21a2b1339d6d4ff019c38d6dcbeff9c4f30d0 GIT binary patch literal 1864 zcmV-O2eO(0Du4h00030|NkNR1OWg50RSuj0001R0&f670{)DTsmtvT zqnxzbi?iOm`wxcVNS5Y_rs@d*M*9Y^8`m^4-|Noz{*R-8#;Ulv7inic^v7%6=q_Q{zRslq0wk65wBMn zT}`Vrk|P+9C%>e$w$fz9jF6y_&JYPoTWFt0pSW^7(yKstH0=3TysPvE&7m8;6@9s~fY>(xdFMx?YQI zw%TsXZ54VFLu9hyTE!_G<5GL>Sk+oV>rLrKE3R+gzT53T<<>jUz4-3SZ@>Qj3vj>! z54`I=XMSWbWn=II5SP{lcF4M9Xj;>+5PSKpwCsUK=y(?0UvBE*<%=NPshZ^=x+}ZrIUmlmuL~|$=)h>5zQ%iGuI}r%>++dpQDp8K= z4Q}0)`m{FSJOo&slYbi?%#_=m=WND|+x|;6O+sg20wzB%Wfe-3)+qK{5`>878K zy53l)9$nt7V?p%mQ^YPi-HX>A-GaKVj=Kgm^4_~vG`b#qEu9wMx>Lw|OZ@VUIS+mG z(oau)^>ZId!8KQ3O=+Cy;px4pj$6lx!;s4T^`(F;rTzMDe*1kR-G`rj(&TfmzIEQ` zzmfRnTkSsZxom&BlN|ouhrb2s>3{Mv;EJeLxmghCcKuV+1cjCvBTevp`m-RS%J-xY zkxgC|4AW-T7eWzct}Oz*APPOG!WEhbOCNk83{5q{k)bbSb+MrdVaAgz`3F^JnS`@S zSeaIlkV$y?)Sh@kKfH{vaEEAO{-#JGvnU$xd{nGrEsXfYEXt3Gf9oQezIer0)hc82 zyWy)C14b+!afev+jTvo&AVuxXYwc@=E~dCdDRyTtedJ*n0ja|zp742vEaDaycSk|? zkdgK?WF1KrNJUQaNtJZuBN4eKSk;h{Np>M&Ma*o80WC zH`^woaEf!B+a z03{Ya19#A25VUOpWkEvzg|SeE?z1-&{ia1PiqVW}bfX;YN<^dg(RhXuq7DScE29-s zVwLn4Ck;zV>zPVl(C(e^N~B3Mhn1J|6Q_;isX{3_(w@dNDmvvS1D|nJ+lgzXGEHjf z=+)5;KsBmVt*TY8iq))Yb*o(Ms#m`X*073otYj^#R~W`bZRU<*k~CJ=uvAnI`ZSWW zW2+b4>NPS#$Y(|At0{K|K*ew-u4LqrT`>2_D_kyIICBeO(TJnQMhUPXVXR++$&ix4 z2~Y~Mskc_PS)WC4VW4#+Hr0B#(sBfwo{fTLvsg&Pl1#PiiRMtz1vi?x7S1J5yRb71S(FSEnSv>@`KpUuYOF-S~TDL(Dy=g_0)!i!;0029- CbD)3# literal 0 HcmV?d00001 diff --git a/sane2/0.07/img003.gif b/sane2/0.07/img003.gif new file mode 100644 index 0000000000000000000000000000000000000000..4d9e5454c3714566f961ec8c738f1afd1a80e12e GIT binary patch literal 9568 zcmV-mC7;?yNk%w1VKxH(0m1+P0002l+1cji=JWIO|Ns900000000000A^8LW000C4 zEC2ui05$^t0YC%(2(#S&Fv>}*y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fnZYT$yB1!h^Jg7D^2Oj)on7C zzN;iHnFq^TTBwz}tmQ0K#Dy%{35wo%;r>EML1OZ%U(fT`GPPjGWNz_~ab#Cj0CqhU z5)+WRvgQ~-SUeAI6H8tJBN-nUP7RJTJH2$HDv{PsZ(cHX|dBcC&z>i%BYhK7>Fa=E*hL?QQ3AkOEa8=>ex6UWhsc$7Vu z3n|w!3Zaskv~6Yjrwdk^k&)U&r7$grOnKtCn%WelyIhb?7jn~d<@BfB2r4`EMpSbc z)t?|u>P}l~PZ&6LAWP+4Q>R)~o&uAmSVa(2^J#;wDpjlXM5M?!F zR&KbpcU+AtMab$)vyy{tYx@UZ-=Ve-{k0x_l^S1JYCD&<07F%)+CHeZi+@PXu(oh4 zfAEU0x^81@j^!+5&lV5K`r{U!J!x7!saI}rRrT%(x46s2r4FV`-P67^tk`7+bme)2 z?s~VnB^$1If$`m9uJydi)$Tma%U&0ecc0CT?<~@*yYSiv~vhlu@5R!KGoVa(H|x zek*G6*J8Tj7NCe*F^vPN*c(^W#yU3Wi+e0#wE{VBLLTzqa!e*?fl$3Y{V}U5ikxHR zwa9&H<{Tk8z1&QuchJNYvOE<{{~{T8-7Ke>%bZQ?>84nE?5&d-MLgl1`I>%|F*&uA zy(zyLi)*fP_3r$S=j5CbS#r+oj9IwkCU3Wf3X~;}jZD%*L;9#xp7f3@ZRtoqI@24* zG^d3+=1+qcqN4t&I!J@+RI7T`tZucdUu|Vim->*iK3}Z?cxw~qntZzs#HeGeV=%e6 z*9Mv7sEOT@`yo3VYykGHon32af4a+wUN*ChZEYwtI@{W=Hn&eLZBd6?+}|#DUL EJKgG0Y5)KL literal 0 HcmV?d00001 diff --git a/sane2/0.07/index.html b/sane2/0.07/index.html new file mode 100644 index 00000000..d3c3689c --- /dev/null +++ b/sane2/0.07/index.html @@ -0,0 +1,63 @@ + +Next +Up +Previous +Contents +Index +


+./sane + + + + +

+ + + + + + + +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ +

SANE Standard Version 2.0 proposal 0.07 - rauch/beck

+
+
Dec 5, 2002
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.07/sane2-0.07.dvi b/sane2/0.07/sane2-0.07.dvi new file mode 100644 index 0000000000000000000000000000000000000000..c561272fdf2d6f22bf6fc5fe60f238eb2d08019b GIT binary patch literal 221000 zcmeFa3w&Hg7iYZbN6wyUwCF+X02*q%zu8OcKyazVFzvFf_Z)U&1^yTO?V+TBmM zSW>sBZowz<#56wkTK{_$|Jxq8@*TGiZhyJ+&WpDPK62{E2e-fSk<7;iv(r!i@$Lg> zG+g|Pii5v%VZ}aJYDRy$FS#iF?e@mj=G^qT=d`Co@o*>^c23W}e8(-3WGb47J2-^X zpG@>8QlXeLuXf%dr^ZQ!GF`oMJ0o2ihK3jX{*~ePe57u0YsG{AeCO_iWP@2)+_%AZ zmPNX9!HS9na~yuy(9qDQCj3QM>G-i<^zw^eUplz^@SptpQ~8Q_KDol(taDNN{-#7c z9f_w?L&K+h^3#KZyN{5k_SxOwe`;slQ1*b>=<4K_2d{~Ahq@wzTc>^YM@K9i8rpGi zJ~TMUKknXNKF0qhpfyrgi+8I(Tiw_RWaR?i9_{FjrkrJou1p`c-EzQ3@OI$aJ8OrA za&KCAp8F4H>ZhT<1q=qW2S5B6@OUHOUH#ePfi2=|<;~%a?5juqV4y$IlMMCuM!SHc zQIN`(Yo6J-<)?oI=0NPJ?95+1V-%= zoSpIM)24`H&k=_p&O<~)Em#-&t)(y2BlueuN{5`~5R!>xUnrfeeCYHk=JA4X(djo-`&;ee8?a`R* zjHZ*JY1M~z$V{(XOcEZP;KS>lKvK+CYNFOqa% zv_z703Y@CO)h*RTDF3MGFllz3*v z8~I5Q>xHCgk}MR&ws(c%@ko+R;R>W)ViCvMp4n-S{9+2vdjrpk4HJS!f`Hgqq}WJ@ z(iwzDJP#ln{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0GRT@`O?K$yh&tG5g7J(b8@bm>XEj8^<1Z{PNq}bl65_2exs{LAUpR*nc{lz|*5;++YNq?I?MA_=_8g zW;^U-SDv^3B5scVuNoLmpR(sr*>C_z140 D E +%EndDVIPSBitmapFont +/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60 +60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60 +60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37 +99.6264 /Courier rf +%DVIPSBitmapFont: Fd cmtt10 10.95 13 +/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F +A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F +A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65 +D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800 +A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69 +D78 D<90390FF803C0D97FFF13E048B512C74814 +F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C +91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900 +3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F +E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380 +253A7BB830>83 D +87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813 +03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00 +3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7 +13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F +90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712 +7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13 +07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0 +252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0 +91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339 +7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0 +4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C +14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01 +FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111 +D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC +4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F +9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC +03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48 +15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A +5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A +485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E +%EndDVIPSBitmapFont +/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37 +1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25 +3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35 +74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1 +49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1 +66.4176 /Times-Roman rf +%DVIPSBitmapFont: Fh cmmi10 10.95 16 +/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA +1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0 +EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC +EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F +F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED +3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC +17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F +C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED +01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F +F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC +07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB +FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72 +7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F +E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE +4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D +90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9 +FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0 +1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01 +1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8 +A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A +D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0 +387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848 +14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13 +074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F +5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0 +EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000 +157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0 +38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F +FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807 +031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13 +1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2 +ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7 +2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F +001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B +137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E +13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00 +1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0 +C648C9FC2A3B7EA72D>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmr8 8 3 +/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23 +>49 DII E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fj cmr10 10.95 12 +/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201 +5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E +123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB +01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12 +007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6 +14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12 +1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9 +FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC +EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713 +800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015 +C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F +90C7FCEB07F8243F7CBC2D>53 DI< +1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814 +1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301 +5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16 +7BA147>61 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fk cmsy10 10.95 5 +/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4 +EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100 +DI E +%EndDVIPSBitmapFont +/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25 +25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24 +90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33 +39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66 +55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50 +50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50 +99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53 +66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120 +86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86 +11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43 +119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76 +3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13 +172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86 +90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45 +66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 +40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61 +1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51 +1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45 +30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81 +90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45 +51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 +40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61 +66 66 61 66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23 +2[30 30 40[{TeXBase1Encoding ReEncodeFont}55 90.9091 +/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115 +103 115 172 57 115 1[57 115 103 69 92 115 92 115 103 +12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149 +23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559 +/Times-Bold rf /Ft 154[44 1[44 30[72 14[50 2[50 1[50 +3[25 44[{TeXBase1Encoding ReEncodeFont}7 99.6264 /Times-Roman +rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76 +86 76 86 76 10[124 2[96 4[124 8[105 3[124 9[86 4[86 1[86 +48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188 +/Times-Roman rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%PaperSize: A4 + +%%EndSetup +%%Page: 1 1 +1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44 +b(2.0)f(proposal)i(0.07)e(-)g(rauch/beck)1708 2698 y +Ft(Dec)25 b(5,)g(2002)p eop +%%Page: 1 2 +1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430 +b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26 +b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 +b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91 +b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647 +y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24 +b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25 +b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n +(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639 +b(13)136 3593 y Fq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 3 +2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7 +b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(19)345 279 y(4.2.10)65 b(Internationalizatio)q(n)44 +b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(22)136 436 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)82 b(26)345 592 y(4.3.1)110 b Fp(sane)p 861 +592 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 749 +y(4.3.2)110 b Fp(sane)p 861 749 V 31 w(exit)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 905 y(4.3.3)110 b Fp(sane)p 861 905 +V 31 w(get)p 1057 905 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1062 +y(4.3.4)110 b Fp(sane)p 861 1062 V 31 w(open)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 1218 y(4.3.5)110 b Fp(sane)p 861 +1218 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1375 y(4.3.6)110 +b Fp(sane)p 861 1375 V 31 w(get)p 1057 1375 V 32 w(option)p +1419 1375 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(28)345 1532 y(4.3.7)110 b Fp(sane)p 861 1532 V 31 w(control)p +1277 1532 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(28)345 1688 y(4.3.8)110 b Fp(sane)p +861 1688 V 31 w(get)p 1057 1688 V 32 w(parameters)25 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(29)345 1845 y(4.3.9)110 b Fp(sane)p 861 1845 V 31 w(start)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(34)345 2001 y(4.3.10)65 b Fp(sane)p +861 2001 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(35)345 2158 +y(4.3.11)65 b Fp(sane)p 861 2158 V 31 w(cancel)33 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(35)345 2314 y(4.3.12)65 b Fp(sane)p 861 2314 +V 31 w(set)p 1057 2314 V 32 w(io)p 1199 2314 V 31 w(mode)78 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2471 y(4.3.13)65 b Fp(sane)p 861 2471 V 31 w(get)p +1057 2471 V 32 w(select)p 1419 2471 V 30 w(fd)37 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2627 y(4.3.14)65 b Fp(sane)p 861 2627 V 31 w(strstatus)73 +b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(37)136 2784 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2940 y(4.5)96 +b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3097 y(4.5.1)110 b(Option)25 b(Number)e(Count)70 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3253 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3410 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3566 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(42)345 3723 y(4.5.5)110 b(Depth)24 b(option)71 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(43)345 3879 y(4.5.6)110 b(Gamma)23 +b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(43)345 4036 y(4.5.7)110 b(Scan)24 +b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4192 y(4.5.8)110 b(Scan)24 +b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4349 y(4.5.9)110 b(Threshold)43 +b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4505 y(4.5.10)65 b(Analog)25 +b(gamma)56 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(44)345 4662 y(4.5.11)65 b(Shado)n(w)51 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4818 y(4.5.12)65 +b(Highlight)e(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4975 y(4.5.13)65 +b(T)l(urn)24 b(lamp)f(on)h(and)g(of)n(f)48 b(.)d(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 5132 +y(4.5.14)65 b(Scanner)25 b(b)n(uttons)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(46)1927 5381 y(2)p eop +%%Page: 3 4 +3 3 bop 0 123 a Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989 +b(48)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(49)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24 +b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 638 y(5.1.2)110 b(T)-7 +b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 809 y(5.2)96 +b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 981 y(5.2.1)110 +b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(50)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153 +V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62 +b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(51)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p +1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 1496 y(5.2.4)110 +b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27 +b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(51)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667 +V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p +1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(52)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p +1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 +2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057 +2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 2182 +y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182 +V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(53)345 2354 y(5.2.9)110 b Fp(SANE)p +861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345 +2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057 +2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(54)345 2697 y(5.2.11)65 b Fp(SANE)p +861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46 +b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(55)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871 +b(56)1927 5381 y Fq(3)p eop +%%Page: 4 5 +4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349 +y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45 +b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data) +g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g +(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 2119 y(4.2)96 +b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(42)1927 5381 y(4)p eop +%%Page: 5 6 +5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349 +y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i +(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 +b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31 +w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p +Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036 +y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 +b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p +Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f +(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722 +y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139 +2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop +%%Page: 6 7 +6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0 +1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g +(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38 +b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e +(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i +(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0 +2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g +(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d +(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c +(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f +(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22 +b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 +2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g +(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119 +b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d +(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f +(an)e(application)k(that)d(requires)h(access)g(to)0 3135 +y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j +(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5 +b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0 +3248 y(implementations)35 b(of)c(SANE)f(components.)55 +b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g +(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o +(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c +(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0 +3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as) +d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i +(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l +(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29 +b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26 +b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i +(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement) +i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o +(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h +(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o +(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7 +b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g +(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o +(e)d(this:)0 4658 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 4658 a 0 4658 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 4658 a 151 x +Fq(P)o(aragraphs)h(that)f(changed)i(since)f(the)e(last)h(re)n(vision)i +(of)d(the)h(documention)i(are)e(mark)o(ed)h(lik)o(e)f(this)g +(paragraph.)3600 4809 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 3600 4809 a 3600 4809 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 3600 +4809 a 3600 4809 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 3600 4809 a 1927 5381 a Fq(6)p eop +%%Page: 7 8 +7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0 +1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace) +h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g +(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22 +b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one) +g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0 +2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e +(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f +(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 +b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23 +b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f +(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21 +b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n +(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29 +b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g +(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i +(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the) +f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i +(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h +(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f +(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0 +2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e +(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5 +b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51 +b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g +(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 +b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h +(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0 +3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21 +b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g +(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g +(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f +(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k +Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 +3812 y(back)o(ends.)1927 5381 y(7)p eop +%%Page: 8 9 +8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51 +b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g +(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32 +b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0 +1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e +(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44 +b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g +(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f +(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30 +b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25 +b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f +(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d +(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 +b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h +(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p +Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n +(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j +(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an) +h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g +(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 +2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f +(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30 +b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f +(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h +(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g +(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22 +b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h +Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e +(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f +(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back) +o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e +(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h +(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o +(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31 +b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h +(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227 +4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h +(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n +(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g +(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o +(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227 +4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e +(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227 +4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k +(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d +(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n +(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f +(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29 +b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o +(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f +(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4 +v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro) +o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h +(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f +(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n +(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i +(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927 +5381 y(8)p eop +%%Page: 9 10 +9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227 +310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g +Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p +2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p +Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i +(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n +(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227 +536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time) +f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136 +724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27 +b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i +(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227 +837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41 +b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e +(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d +(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o +(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30 +b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g +Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f +(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha) +n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got) +e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227 +1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f +(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6 +b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i +(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e +(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p +Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e +(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227 +1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d +(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30 +b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g +(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to) +227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.) +43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f +(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g +(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g +(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h +(that)f(scanner)-5 b(.)0 2479 y + currentpoint currentpoint translate 0.64821 0.64821 scale neg exch +neg exch translate + 0 2479 a 0 2479 a + gsave currentpoint currentpoint translate 270 neg rotate neg exch +neg exch translate + 0 2479 +a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550 +@rwi @setspecial +%%BeginDocument: figs/hierarchy.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: hierarchy.fig +%%Creator: fig2dev Version 3.1 Patchlevel 2 +%%CreationDate: Thu Jan 30 22:02:12 1997 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%Magnification: 1.00 +%%Orientation: Landscape +%%BoundingBox: 0 0 355 722 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-17.0 -17.0 translate + 90 rotate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n 0 612 m 0 0 l 792 0 l 792 612 l cp clip + 0.06000 0.06000 sc +% Polyline +n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr +% Polyline +n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr +15.000 slw +% Polyline +n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +11399 5182 m +gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +8099 5182 m +gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr +% Polyline +n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr +% Polyline +n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr +% Polyline +n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr +% Polyline +n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr +7.500 slw +% Polyline +n 2700 1800 m 1200 3000 l gs col-1 s gr +% Polyline +n 3000 1800 m 3000 3000 l gs col-1 s gr +% Polyline +n 3300 1800 m 4800 3000 l gs col-1 s gr +% Polyline +n 9600 1800 m 9600 2100 l gs col-1 s gr +% Polyline +n 9450 2700 m 8100 4800 l gs col-1 s gr +% Polyline +n 11400 4200 m 11400 4800 l gs col-1 s gr +% Polyline +n 1200 3600 m 1200 4200 l gs col-1 s gr +% Polyline +n 3000 3600 m 3000 4125 l gs col-1 s gr +% Polyline +n 7875 5400 m 7350 5850 l gs col-1 s gr +% Polyline +n 8250 5400 m 8775 5850 l gs col-1 s gr +% Polyline +n 11475 5400 m 11475 5850 l gs col-1 s gr +15.000 slw +% Polyline +n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr +% Polyline +n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr +7.500 slw +% Polyline +n 9750 2700 m 11400 3600 l gs col-1 s gr +% Interp Spline +gs n 4800 3600 m + 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto + 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto + 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto + 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto + 7224.0 624.7 8573.7 446.9 9450 900 curveto + 9524.5 938.5 9562.0 1013.5 9600 1200 curveto + gs col-1 s gr + gr + +/Helvetica ff 270.00 scf sf +1199 3382 m +gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 3382 m +gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +1200 4425 m +gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 4380 m +gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +7350 6165 m +gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +8925 6165 m +gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +11475 6135 m +gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 600 m +gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +9600 630 m +gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +4725 5850 m +gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 1582 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +4799 3382 m +gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 1582 m +gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 2482 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +11399 3982 m +gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs + +%%EndDocument + @endspecial 2958 2479 a + currentpoint grestore moveto + 2958 2479 a 0 2479 a + currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale +neg exch neg exch translate + 0 2479 +a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0 +4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h +(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44 +b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g +(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f +(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0 +5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h +(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i +(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop +%%Page: 10 11 +10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e +Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36 +b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d +(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o +(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51 +b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h +(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e +(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d +Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e +Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f +(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22 +b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f +(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f +(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i +(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i +(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g +(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0 +972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h +(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g +(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back) +o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e +(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0 +1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0 +1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815 +y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h +(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f +(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39 +b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation) +j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0 +2041 y(applications)f(and)c(de)n(vices.)59 b(While)34 +b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has) +f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i +(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g +(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0 +2266 y(accommodate)26 b(future)e(applications)k(or)23 +b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g +(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is) +f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n +(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0 +2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g +(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21 +b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n +(alues.)30 b(Each)24 b(sample)g(v)n(alue)g(represents)j(one)d(channel)h +(\(e.g.,)e(the)h(red)g(channel\).)0 2836 y(The)i(SANE)f(API)g +(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39 +b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0 +2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f +(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67 +b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34 +b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f +(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0 +3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g +(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g +(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f +(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0 +3459 y(When)30 b(transmitting)i(an)e(image)g(frame)g(by)g(frame,)h(the) +f(frontend)i(needs)f(to)e(kno)n(w)h(what)g(part)g(of)g(the)g(image)g(a) +f(frame)0 3572 y(represents)e(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g +(should)i(e)o(xpect\).)31 b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d +(API)i(tags)i(e)n(v)o(ery)f(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f +(format)i(descriptor)-5 b(.)0 3704 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 3704 a 0 3704 +a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 3704 a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f +(of)e(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e +Fp(SANE)p 2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31 +w(RAW)e Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p +225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)18 +b(These)k(types)g(are)f(discussed)j(in)d(detail)h(in)f(the)g(follo)n +(wing)h(sections.)30 b(The)21 b(frame)g(types)h(used)g(by)0 +4082 y(v)o(ersion)e(1)d(of)h(this)h(standard)h(\()p Fp(SANE)p +1168 4082 V 31 w(FRAME)p 1474 4082 V 31 w(GRAY)p Fq(,)15 +b Fp(SANE)p 1983 4082 V 31 w(FRAME)p 2289 4082 V 30 w(RGB)p +Fq(,)h Fp(SANE)p 2743 4082 V 31 w(FRAME)p 3049 4082 V +30 w(RED)p Fq(,)g Fp(SANE)p 3503 4082 V 31 w(FRAME)p +3809 4082 V 30 w(GREEN)p Fq(,)0 4195 y(and)24 b Fp(SANE)p +379 4195 V 31 w(FRAME)p 685 4195 V 30 w(BLUE)p Fq(\))e(are)h(obsolete)j +(and)e(superseded)j(by)c Fp(SANE)p 2360 4195 V 31 w(FRAME)p +2666 4195 V 31 w(RAW)p Fq(.)0 4503 y Fm(3.2.1)99 b(Pixel)24 +b(oriented)i(frames)0 4736 y Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h +(frames)e(is)g Fp(SANE)p 1561 4736 V 31 w(FRAME)p 1867 +4736 V 30 w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g +(channels)i(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32 +b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f +(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0 +4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h +Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g +Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25 +b(type.)0 5075 y(See)e(section)i(4.3.8)f(on)f(page)i(29)e(for)h +(details)h(about)g(the)f(format)g(descriptions.)2563 +5075 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 2563 5075 a 2563 5075 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 2563 5075 a 2563 5075 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 2563 5075 a 1905 5381 a Fq(10)p eop +%%Page: 11 12 +11 11 bop 0 123 a Fq(Each)24 b(sample)h(v)n(alue)g(has)f(a)g(certain)h +(bit)g(depth.)31 b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g +(entire)i(image)e(and)h(can)f(be)g(as)g(small)g(as)0 +236 y(one)f(bit.)29 b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h +(or)g(16)g(bits)g(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5 +b(s)25 b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0 +349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n +(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f +(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d +(sample)h(v)n(alue)g(of)g(depth)g(8\).)0 481 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 481 +a 0 481 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 481 a 137 x Fq(The)f(complete)i(image)f(may)f(consist)i(of) +f(se)n(v)o(eral)g(dif)n(ferent)i(channels.)31 b(The)23 +b(number)h(of)g(channels)i(is)d(de\002ned)h(by)g(mem-)0 +731 y(ber)19 b Fp(channels)p 579 731 28 4 v 29 w(per)p +773 731 V 31 w(image)c Fq(of)j Fp(SANE)p 1407 731 V 31 +w(Parameters)p Fq(.)k(The)c(image)h(may)f(be)g(transmitted)j(in)d(an)g +(arbitary)i(number)0 844 y(of)28 b(frames)h(which)g(can)f(be)h +(determined)h(by)f(w)o(atching)g(the)g Fp(SANE)p 2173 +844 V 31 w(PFLAG)p 2479 844 V 30 w(LAST)p 2729 844 V +31 w(FRAME)d Fq(\003ag)h(in)i(said)g(type)g(\(or)f(by)0 +957 y(counting)e(the)e(channels\).)31 b(Note:)e(This)24 +b(frame)f(type)i(replaces)g(all)f(frame)f(types)i(of)f(the)f(SANE)e +(standard)26 b(v)o(ersion)f(1.)3795 957 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 3795 957 a +3795 957 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 3795 957 a 3795 957 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 3795 957 a 0 1113 a +Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i(frame)d(is) +g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48 b(Each)30 +b(byte)h(may)f(contain)i(8)d(sample)0 1226 y(v)n(alues)g(\(for)g(an)f +(image)g(bit)h(depth)g(of)f(1\),)h(one)f(full)h(sample)g(v)n(alue)g +(\(for)f(an)g(image)h(bit)f(depth)h(of)f(8\),)h(or)f(a)g(partial)h +(sam-)0 1339 y(ple)j(v)n(alue)g(\(for)f(an)h(image)f(bit)h(depth)g(of)g +(16)f(or)g(bigger\).)54 b(In)31 b(the)h(latter)g(case,)i(the)d(bytes)i +(of)e(each)h(sample)g(v)n(alue)g(are)0 1452 y(transmitted)26 +b(in)d(the)h(machine')-5 b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 +b(.)1357 1651 y Fr(Back)o(end)22 b(Implementation)i(Note)227 +1795 y Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o +(e)h(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f +(adjusted)227 1908 y(appropriately)32 b(if)c(necessary)-6 +b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i +(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 2021 +y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o +(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f +(then)f(apply)i(the)227 2134 y(adjustment)d(if)d(necessary)-6 +b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er) +n(-mak)o(es-right)q(\224)29 b(approach.)975 3263 y @beginspecial +0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial +%%BeginDocument: figs/xfer.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: xfer.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:30 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 362 182 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-134.0 370.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +15.000 slw +% Polyline +n 2400 3300 m 8100 3300 l gs col-1 s gr +n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3375 m 2400 3675 l gs col-1 s gr +15.000 slw +n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 3750 m 8100 3750 l gs col-1 s gr +n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3825 m 2400 4125 l gs col-1 s gr +15.000 slw +n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr +15.000 slw +% Polyline +n 2400 4200 m 8100 4200 l gs col-1 s gr +n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 4275 m 2400 4575 l gs col-1 s gr +15.000 slw +n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 4650 m 8100 4650 l gs col-1 s gr +n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1111 3459 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24 +b(order)h(of)e(image)h(data)g(bytes)0 3759 y(The)f(order)i(in)f(which)g +(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e +(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0 +3872 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g +(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e +(right-most)i(column.)30 b(The)0 3985 y(left-to-right,)35 +b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h +(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4097 +y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g +(e)o(xample\).)0 4254 y(If)d(a)g(frame)h(contains)h(multiple)g +(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f +(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0 +4367 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h +(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f +(bit-depth)j(of)d(8.)0 4523 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g +(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g +Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h +(depth)h(1)0 4636 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g +(interlea)n(v)o(ed)j(f)o(ashion.)38 b(The)25 b(\002rst)h(sample)h(of)f +(each)g(byte)h(is)f(represented)j(by)d(the)g(most)0 4749 +y(signi\002cant)g(bit.)0 4769 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 4769 a 0 4769 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 4769 +a 137 x Fq(F)o(or)g(gray)h(channels)i(at)d(a)g(bit)h(depth)g(of)g(1)f +(only)h(tw)o(o)f(sample)h(v)n(alues)h(are)f(possible:)37 +b(1)26 b(represents)k(minimum)c(intensity)0 5019 y(\(black\))32 +b(and)f(0)f(represents)j(maximum)d(intensity)i(\(white\).)50 +b(F)o(or)29 b(all)i(other)g(channel)h(types)g(and)e(bit)h(depths)h(a)d +(sample)0 5132 y(v)n(alue)24 b(of)g(0)f(represents)j(minimum)e +(intensity)i(and)e(lar)n(ger)h(v)n(alues)f(represent)i(increasing)h +(intensity)-6 b(.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 5151 a +0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(11)p eop +%%Page: 12 13 +12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx +93 @ury 3744 @rwi @setspecial +%%BeginDocument: figs/image-data.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: image-data.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:36 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 521 93 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-88.0 120.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +1875 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3225 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +4575 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l + 5850 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +2475 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 600 m +gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +5925 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +7275 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +8625 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l + 9900 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +6525 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 600 m +gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1950 m +gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1950 m +gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +6525 1950 m +gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1950 m +gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1950 m +gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2475 1950 m +gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +10050 1275 m +gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1125 m +gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23 +b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 1070 +a 0 1070 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0 +1394 y Fq(It)31 b(also)g(is)g(possible)i(to)e(transmit)h(arbitrary)h +(\(not)f(necessaryly)i(pix)o(el)e(oriented\))h(data.)52 +b(This)30 b(allo)n(ws)i(transmission)h(of)0 1507 y(compressed)26 +b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 1679 +y(The)k(type)h(of)g(arbitrary)i(data)e(frames)g(is)f +Fp(SANE)p 1558 1679 28 4 v 31 w(FRAME)p 1864 1679 V 31 +w(MIME)p Fq(.)e(The)i(frame)g(contains)j(arbitrary)g(data)e(of)g(the)g +(MIME)0 1791 y(\(see)f(RFC)e(1521/1522\))30 b(type)e(that)f(is)f(gi)n +(v)o(en)i(in)e(the)h Fp(format)p 2039 1791 V 30 w(desc)d +Fq(member)j(of)g(the)g Fp(SANE)p 3096 1791 V 31 w(Parameters)21 +b Fq(struc-)0 1904 y(tured)i(type)f(\(see)g(See)f(section)j(4.3.8)d(on) +h(page)h(29\).)28 b(As)21 b(such,)i(it)e(is)g(assumed)i(to)f(be)g +(incomprehensible)k(to)21 b(the)h(frontend,)0 2017 y(e)o(xcept)28 +b(for)e(selected)j(types)e(the)g(frontend)h(is)f(speci\002cally)h +(capable)g(of)f(handling)i(internally)-6 b(.)40 b(The)26 +b(frontend)i(is)e(free)h(to)0 2130 y(ignore)32 b(those)g(frames,)g(or)f +(emplo)o(y)h(an)o(y)e(appropriate)k(means)d(to)g(otherwise)h(handle)g +(this)f(data)h(\(lik)o(e)f(sa)n(ving)i(them)d(to)0 2243 +y(disk)24 b(or)g(spa)o(wning)h(an)e(e)o(xternal)i(vie)n(wer\).)1392 +2243 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 1392 2243 a 1392 2243 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 1392 2243 a 1392 2243 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 1392 2243 a 1905 5381 a Fq(12)p eop +%%Page: 13 14 +13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51 +b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512 +y(Interface)e(\(API\))0 1879 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 1879 a 0 1879 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 1879 +a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f +(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y) +h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i +(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o +(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0 +2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h +(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e +(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d +(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33 +b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0 +2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109 +2682 y Fp(#include)51 b()0 2748 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 2748 +a 0 2748 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 2748 a 0 2748 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 2748 a 333 x Fn(4.1)119 +b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard) +25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28 +b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e +(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d +(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e +(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51 +b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30 +b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g +(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g +(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h +(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g +(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o +(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g +(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o +(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o +(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i +(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o +(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129 +y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f +(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n +(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f +(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n +(vision.)48 b(While)30 b(control)h(of)e(these)0 4406 +y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o +(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28 +b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e +(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38 +b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n +(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o +(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o +(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4 +v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29 +b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d +(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905 +5381 y(13)p eop +%%Page: 14 15 +14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p +868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p +Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g +(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e +(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g +(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p +Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f +Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o +(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g +(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14 +b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d +(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704 +y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g +(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427 +817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e +(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the) +427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427 +1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f +(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427 +1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f +(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and) +427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227 +1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V +30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h +(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427 +1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p +868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 +b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of) +427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p +868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18 +b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d +(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j +Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0 +2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23 +b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f +(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o +(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59 +b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52 +b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31 +w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g +(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f +(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c +Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n +(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f +Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068 +y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g +Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15 +b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j +Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in) +e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j +Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d +Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24 +b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e +(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i +Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33 +b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i +(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25 +b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p +Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o +(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j +(mapping.)1905 5381 y(14)p eop +%%Page: 15 16 +15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0 +356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n +(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v) +n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j +Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g +(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097 +436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type) +h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 +b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377 +b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 +y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias) +g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e +(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 +b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 +b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g +Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 +1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0 +1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y +Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h +(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h +Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e +Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 +b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0 +2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f +(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays) +f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672 +y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27 +b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f +Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0 +2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0 +3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326 +y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n +(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in) +f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p +Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e +Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27 +b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6 +b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103 +b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0 +4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p +940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22 +b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29 +b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f +(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p +Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26 +b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p +Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g +(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5 +b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24 +b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17 +b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36 +b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros) +h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g +(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p +0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19 +b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g +(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905 +5381 y Fq(15)p eop +%%Page: 16 17 +16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p +Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c +(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f +(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking) +h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f +Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427 +349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p +Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine) +f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427 +608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j +Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o +(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g +Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227 +1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48 +b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48 +b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i +(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6 +b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0 +1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw) +o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0 +2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29 +b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o +(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g +(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d +Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48 +b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x) +o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27 +b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f +(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0 +2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50 +b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to) +f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o +(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227 +3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23 +b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695 +V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f +(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27 +b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f +Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52 +b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e +(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h +Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d +Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f +(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23 +b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773 +y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26 +b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i +(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905 +5381 y(16)p eop +%%Page: 17 18 +17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7 +b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i +(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560 +356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32 +b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6 +b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0 +961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n +(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e +(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p +Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f +(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n +(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0 +1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f +(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether) +f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57 +b(If)31 b(an)h(operation)j(completes)e(successfully)-6 +b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56 +b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f +(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30 +b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0 +1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23 +b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p +2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f +(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385 +2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p +1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p +3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113 +v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p +1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p +2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6 +b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660 +2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p +1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25 +b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435 +2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627 +V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083 +2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661 +V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31 +w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p +1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n +(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V +435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021 +2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083 +2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p +3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966 +28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000 +4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n +(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113 +V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p +1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p +2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514 +3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4 +v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31 +w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100 +w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226 +V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31 +w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p +1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er) +e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p +660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161 +3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083 +3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514 +3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4 +v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31 +w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100 +w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435 +3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643 +V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4 +113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f +(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519 +3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0 +4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7 +b(ype)0 4346 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 4346 a 0 4346 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 4346 a 151 x Fq(Each)27 +b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type) +g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26 +b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n +(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969 +y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + +0 5096 a 0 5096 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 5096 a 0 5096 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 5096 a 1905 5381 +a Fq(17)p eop +%%Page: 18 19 +18 18 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 32 a 445 123 a Fp(SANE_String_Cons)o +(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445 +349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g +(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g +(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o +(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913 +y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026 +y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139 +y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445 +1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478 +y(SANE_Device;)0 1533 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 1533 a 0 1533 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 1533 a 0 +1533 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f +(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p +Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0 +1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019 +1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h +(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39 +b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is) +h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o +(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o +(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique) +j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30 +b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k) +o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32 +b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0 +2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g +(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n +(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h +(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52 +b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f +Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e +(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h +(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n +(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0 +2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g +(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g +(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928 +a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965 +1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698 +b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588 +b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698 +b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643 +b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p +1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p +1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p +1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p +1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p +1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p +1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93 +b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753 +b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643 +b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p +1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115 +2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p +3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094 +4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094 +V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207 +V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320 +V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433 +V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p +3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p +3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p +3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p +3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p +3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24 +b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0 +5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26 +b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f +(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f +(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o +(endor)h(speci\002c)g(and)f(therefore)i(completely)1905 +5381 y(18)p eop +%%Page: 19 20 +19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i +(back)o(ends.)0 143 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 143 a 0 143 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 143 a 150 x Fq(The)i(back)o +(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p +1648 293 28 4 v 30 w(backend)p 2063 293 V 30 w(author)25 +b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0 +406 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f +(the)g(format:)0 649 y Fp(Firstname)50 b(Lastname)h()0 892 y Fq(The)33 b(string)j Fp(backend)p 805 892 +V 29 w(website)30 b Fq(has)k(to)g(be)g(set)g(up)g(by)g(the)g(back)o +(end)i(with)e(the)g(website)h(or)e(ftp)h(address)i(of)e(the)0 +1005 y(back)o(end)26 b(in)d(the)h(format:)0 1247 y Fp(http://www.doma)o +(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0 +1490 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h +Fp(device)p 1572 1490 V 30 w(location)18 b Fq(with)23 +b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g +(this)0 1603 y(de)n(vice,)h(the)g(te)o(xt)g(should)h(be)f(read)g(from)f +(the)h(back)o(end)i(con\002g)e(\002le.)k(This)23 b(could)i(e.g.)k(look) +24 b(lik)o(e)g(this:)0 1846 y Fp(building)51 b(93,)i(2nd)g(plane,)f +(room)h(2124)0 2088 y Fq(The)33 b(string)h Fp(comment)c +Fq(can)j(be)g(used)h(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user) +l(,)k(the)c(te)o(xt)h(should)h(be)e(read)h(from)f(the)0 +2201 y(back)o(end)26 b(con\002g)e(\002le.)0 2372 y(The)f(string)i +Fp(reserved)p 839 2372 V 29 w(string)20 b Fq(is)j(planed)i(for)f +(future)h(use,)f(the)f(back)o(end)j(has)e(to)g(set)f(this)h(string)h +(to)f(\224\224.)0 2542 y(W)l(ith)i(member)f Fp(backend)p +915 2542 V 30 w(version)p 1330 2542 V 29 w(code)e Fq(a)i(frontend)j +(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is) +g(connected)0 2655 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0 +2825 y(The)30 b(member)h Fp(backend)p 889 2825 V 29 w(capability)p +1468 2825 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g +(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0 +2938 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f +(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f +(de\002ned)i(when)f(there)g(is)0 3051 y(the)f(need)g(for)g(it.)k(The)23 +b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g +(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3222 y(The)d(member)h +Fp(reserved)p 926 3222 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g +(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g +(inte)o(ger)h(to)e(0.)3900 3222 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 3900 3222 a 3900 3222 +a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 3900 3222 a 3900 3222 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 3900 3222 a 0 3528 a Fm(4.2.9)99 +b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3760 y Fq(Option)23 +b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h +(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30 +b(Options)0 3873 y(are)h(used)g(to)f(control)j(virtually)g(all)d +(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n +(wer)f(of)h(the)g(SANE)d(API)h(stems)0 3986 y(from)22 +b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f +(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g +(descriptor)-5 b(.)31 b(Thus,)0 4098 y(a)21 b(frontend)i(can)e(control) +i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n +(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 +4211 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 +b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i +(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4324 y(operates.)31 +b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p +1485 4324 28 4 v 31 w(Option)p 1846 4324 V 30 w(Descriptor)18 +b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 +4567 y Fp(typedef)52 b(struct)336 4680 y({)445 4793 y(SANE_String_Cons) +o(t)c(name;)445 4906 y(SANE_String_Cons)o(t)g(title;)445 +5019 y(SANE_String_Cons)o(t)g(desc;)445 5132 y(SANE_Value_Type)g(type;) +1905 5381 y Fq(19)p eop +%%Page: 20 21 +20 20 bop 445 123 a Fp(SANE_Unit)51 b(unit;)445 236 y(SANE_Int)g(size;) +445 349 y(SANE_Int)g(cap;)445 462 y(SANE_Constraint_)o(Ty)o(pe)d +(constraint_type)o(;)445 574 y(union)555 687 y({)664 +800 y(const)k(SANE_String_Con)o(st)c(*string_list;)664 +913 y(const)k(SANE_Word)e(*word_list;)664 1026 y(const)i(SANE_Range)e +(*range;)555 1139 y(})445 1252 y(constraint;)336 1365 +y(})227 1478 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0 +1782 y Fr(Option)23 b(Name)0 2015 y Fq(Member)k Fp(name)e +Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40 +b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n +(vice)0 2128 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n +(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).) +55 b(The)31 b(option)i(name)f(must)0 2241 y(consist)e(of)d(lo)n(wer)n +(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p +Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i +(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43 +b(The)27 b(\002rst)h(character)0 2354 y(must)c(be)f(a)g(lo)n(wer)n +(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g +(dash\).)0 2659 y Fr(Option)g(T)n(itle)0 2892 y Fq(Member)e +Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h +(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21 +b(should)i(typically)0 3005 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o +(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i +(of)d(the)h(option.)0 3309 y Fr(Option)f(Description)0 +3542 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e +(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to) +g(describe)i(the)e(option.)35 b(It)24 b(is)0 3655 y(the)g +(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h +(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e +(this)0 3768 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i +(breaks.)0 4072 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0 +4305 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the) +g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h +Fp(SANE)p 3217 4305 28 4 v 31 w(Value)p 3523 4305 V 31 +w(Type)c Fq(are)0 4418 y(described)26 b(in)e(T)-7 b(able)23 +b(4.3.)0 4723 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 4956 +y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h +(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20 +b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765 +4956 V 31 w(U-)0 5069 y(nit)e Fq(are)j(described)i(in)d(T)-7 +b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g +(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21 +b(is)g(entirely)1905 5381 y(20)p eop +%%Page: 21 22 +21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p +1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p +3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v +165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247 +V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281 +V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p +Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360 +28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113 +v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g +Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p +390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042 +506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h +(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165 +585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V +31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V +256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p +Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p +390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042 +1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f +(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option) +1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n +(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k +(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j +(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g +(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24 +b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5 +b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p +390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042 +1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this) +h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e +(group)1395 1376 y(logically)35 b(related)e(options.)56 +b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395 +1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j +(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if) +e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395 +1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d +Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395 +1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865 +3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24 +b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354 +2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0 +2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f +(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h +(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37 +b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j +(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i +(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f +(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903 +4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856 +V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525 +w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876 +V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4 +v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113 +v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j +(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548 +3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068 +V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102 +V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p +3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181 +28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4 +113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24 +b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328 +V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024 +3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000 +3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p +3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407 +28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4 +113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24 +b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V +497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p +1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p +2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p +3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632 +28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698 +3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24 +b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666 +V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29 +b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4 +v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22 +b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g +(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26 +b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0 +4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v) +n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703 +4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g +(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e +(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i +Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g +(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i +Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e +(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop +%%Page: 22 23 +22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p +703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31 +w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31 +b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e +(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i +(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437 +y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289 +437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452 +653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23 +b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486 +653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798 +V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p +1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43 +b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y +Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d +Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31 +b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n +(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f +(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i +(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h +(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227 +1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V +30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p +Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553 +1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427 +1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i +(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p +813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p +Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p +2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427 +2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g +Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8 +b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f +(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37 +b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0 +2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n +(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921 +2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003 +y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30 +b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h +(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h +(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n +(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p +3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d +(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7 +b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0 +3598 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 3598 a 0 3598 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o +(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26 +b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g +(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27 +b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i +(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g +(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o +(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h +Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f +(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526 +V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0 +4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227 +5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227 +5132 y(#endif)0 5135 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 0 5135 a 0 5135 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 0 5135 a 0 5135 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 0 5135 a 1905 5381 a Fq(22)p eop +%%Page: 23 24 +23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p +1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p +3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86 +784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31 +w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254 +w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f +(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p +3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862 +931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010 +28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31 +w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V +100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n +(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123 +y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39 +b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25 +b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32 +b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n +(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199 +1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462 +y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g +(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286 +4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p +507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160 +2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue) +g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43 +b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p +1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50 +b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513 +1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31 +w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability) +j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28 +b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p +3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026 +y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p +2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026 +V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139 +y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25 +b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252 +y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p +3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p +311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p +1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22 +b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not) +h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g +(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513 +2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g +(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f +(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34 +3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p +507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p +1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d +(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929 +y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f +(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d +(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513 +3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p +2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of) +1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099 +3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862 +3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311 +3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160 +3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e +(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently) +1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5 +b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513 +3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V +34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31 +w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v +349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h +(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513 +3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6 +b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946 +y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d +(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g +(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513 +4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n +(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f +(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828 +4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24 +b(Capabilities)1905 5381 y(23)p eop +%%Page: 24 25 +24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p +1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215 +V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235 +V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31 +w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v +614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.) +49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427 +y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5 +b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a +Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V +28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094 +V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f +(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6 +b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879 +766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30 +b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o +(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h +Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25 +b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107 +1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518 +y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325 +1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879 +2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e +(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n +(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41 +b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e +Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g +(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6 +b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d +(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51 +b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h +Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g +Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879 +2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e +Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27 +b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n +(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d +Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71 +3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877 +3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224 +4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d +(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879 +3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28 +b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399 +y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35 +b(descriptor)h(member)1879 3512 y Fp(constraint.word)p +2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o +(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40 +b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33 +b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28 +b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g +(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879 +3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j +(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n +(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o +(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303 +a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303 +V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565 +v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e +(applicable)i(to)e(string-v)n(alued)k(options)1879 4415 +y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e +(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i +(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641 +28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e +Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the) +e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p +3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23 +b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905 +5381 y(24)p eop +%%Page: 25 26 +25 25 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 32 a 91 x Fq(Y)-10 b(ou)33 +b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e +Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f +(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g +(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p +Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23 +b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o +(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f +(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746 +y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g +(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f +(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i +Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the) +h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o +(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that) +g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g +(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46 +b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24 +b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p +883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377 +V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549 +y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d +Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or) +f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f +(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j +(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g +(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h +Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0 +3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g +(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e +(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p +Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i +Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22 +b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538 +y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22 +b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h +Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0 +3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d +Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0 +3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34 +b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g +(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0 +4049 y(should)h(use)f(the)g(function)i Fp(gettext)19 +b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24 +b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0 +4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g +(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i +(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c +(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23 +b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g +(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0 +4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the) +g(gette)o(xt)h(tools.)2241 4843 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 2241 4843 a 2241 4843 +a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 2241 4843 a 2241 4843 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 2241 4843 a 1905 5381 a Fq(25)p +eop +%%Page: 26 27 +26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 392 y Fm(4.3.1)99 +b Fc(sane)p 545 392 30 4 v 35 w(init)0 625 y Fq(This)35 +b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d +(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h +(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j(if)d(this)h(function)i +(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g(status)h(code)f +(returned)i(by)d Fp(sane)p 3561 738 28 4 v 31 w(init)e +Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p 767 851 +V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion)h(code)g +(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h(pointed) +h(to)0 964 y(by)24 b Fp(version)p 504 964 V 29 w(code)p +Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p Fq(,)e(no)j(v)o(ersion)i +(code)e(is)g(returned.)31 b(Ar)n(gument)25 b Fp(authorize)19 +b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a)g(function)i(that) +e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i(requires)g +(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0 +1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h +(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int) +h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o +(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28 +b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i +(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041 +y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967 +2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f +Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i +(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f +(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0 +2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h +(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d +(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37 +b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40 +b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64 +b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j +(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0 +2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g +(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911 +y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing) +h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o +(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN) +157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o +(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,) +500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE) +o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o +(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed) +h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26 +b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0 +4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35 +b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d +(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g +(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b +Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g +(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p +421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i +Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p +2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6 +b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f +(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38 +b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0 +4646 y(NUL)c(terminated.)1905 5381 y(26)p eop +%%Page: 27 28 +27 27 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p 545 123 30 +4 v 35 w(exit)0 352 y Fq(This)26 b(function)i(must)e(be)g(called)h(to)f +(terminate)h(use)f(of)g(a)g(back)o(end.)38 b(The)25 b(function)j(will)e +(\002rst)f(close)i(all)f(de)n(vice)h(handles)0 465 y(that)d(still)h +(might)f(be)f(open)i(\(it)f(is)f(recommended)j(to)e(close)h(de)n(vice)f +(handles)i(e)o(xplicitly)g(through)g(a)d(call)h(to)g +Fp(sane)p 3656 465 28 4 v 31 w(clo-)0 578 y(se\(\))p +Fq(,)k(b)n(ut)h(back)o(ends)j(are)d(required)i(to)e(release)i(all)e +(resources)j(upon)e(a)e(call)i(to)f(this)g(function\).)48 +b(After)29 b(this)h(function)0 691 y(returns,)36 b(no)c(function)i +(other)f(than)g Fp(sane)p 1396 691 V 31 w(init\(\))28 +b Fq(may)k(be)g(called)h(\(re)o(gardless)h(of)e(the)h(status)g(v)n +(alue)g(returned)h(by)0 804 y Fp(sane)p 225 804 V 31 +w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f(call)g(this)g(function)i +(may)d(result)i(in)e(some)h(resources)i(not)e(being)g(released)i +(properly)-6 b(.)227 1038 y Fp(void)53 b(sane_exit)d(\(void\);)0 +1341 y Fm(4.3.3)99 b Fc(sane)p 545 1341 30 4 v 35 w(get)p +760 1341 V 35 w(devices)0 1570 y Fq(This)21 b(function)i(can)e(be)g +(used)h(to)f(query)h(the)g(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v) +n(ailable.)30 b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully) +-6 b(,)0 1683 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h +Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f +Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p +3635 1683 28 4 v 29 w(list)p Fq(.)0 1796 y(The)27 b(returned)i(list)f +(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g +(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0 +1909 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p +1056 1909 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25 +b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0 +2022 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41 +b(If)27 b(ar)n(gument)h Fp(local)p 1899 2022 V 31 w(only)c +Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n +(vices)0 2135 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE) +d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n +(vice)g(list)g(includes)i(all)e(remote)0 2247 y(de)n(vices)e(that)f +(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227 +2482 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device) +d(***)54 b(device_list,)1864 2595 y(SANE_Bool)c(local_only\);)0 +2830 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g +Fp(SANE)p 1242 2830 V 31 w(STATUS)p 1603 2830 V 30 w(NO)p +1743 2830 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)1357 3087 y Fr(Back)o(end)f +(Implementation)i(Note)227 3236 y Fq(SANE)h(does)k(not)f(require)h +(that)f(this)h(function)g(is)f(called)h(before)g(a)e +Fp(sane)p 2646 3236 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227 +3349 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o +(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f +(unnecessary)j(and)227 3462 y(undesirable)31 b(to)c(call)h(this)g +(function)h(\002rst.)1619 3383 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 1619 3383 a 1619 3383 +a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 1619 3383 a 79 x Fq(The)e(same)g(information)j(about)e(a)f(de)n(vice) +i(has)e(to)h(be)f(returned)227 3575 y(when)d Fp(sane)p +672 3575 28 4 v 31 w(open)d Fq(is)i(called.)1290 3575 +y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 1290 3575 a 1290 3575 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 1290 3575 a 1290 3575 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 1290 +3575 a 0 3877 a Fm(4.3.4)99 b Fc(sane)p 545 3877 30 4 +v 35 w(open)0 4107 y Fq(This)26 b(function)h(is)f(used)h(to)e +(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36 +b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0 +4219 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40 +b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33 +b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e +Fp(*h)p Fq(.)0 4253 y + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 0 4253 a 0 4253 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 0 4253 a 79 x +Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e +Fp(**device)p 2040 4332 28 4 v 29 w(description)p Fq(.)i(This)e(is)f +(the)i(same)f(description)j(that)0 4445 y(is)h(returned)j(in)d(the)h +(list)g(by)f Fp(sane)p 1144 4445 V 31 w(get)p 1340 4445 +V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g +Fp(*h)c Fq(and)j Fp(*device)p 3186 4445 V 30 w(description)23 +b Fq(is)0 4558 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid) +i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4558 V 30 w(close\(\))c +Fq(is)j(performed.)3231 4558 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 3231 4558 a 3231 4558 +a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 3231 4558 a 3231 4558 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 3231 4558 a 28 w Fq(As)g(a)g(special)i(case,) +0 4671 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n +(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n +(vice)e(\(if)f(there)h(is)g(such)g(a)0 4784 y(de)n(vice\).)227 +5019 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k +(SANE_Handle)d(*)55 b(h,)227 5132 y(const)e(SANE_Device)c(**)54 +b(device_descrip)o(ti)o(on\))o(;)1905 5381 y Fq(27)p +eop +%%Page: 28 29 +28 28 bop 0 123 a Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g +(of)f(the)h(follo)n(wing)h(status)g(codes.)227 369 y +Fp(SANE)p 452 369 28 4 v 31 w(STATUS)p 813 369 V 30 w(DEVICE)p +1173 369 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e +(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i(else\).)227 +515 y Fp(SANE)p 452 515 V 31 w(STATUS)p 813 515 V 30 +w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f(not)h(v)n +(alid.)227 661 y Fp(SANE)p 452 661 V 31 w(STATUS)p 813 +661 V 30 w(IO)p 953 661 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +808 y Fp(SANE)p 452 808 V 31 w(STATUS)p 813 808 V 30 +w(NO)p 953 808 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 954 +y Fp(SANE)p 452 954 V 31 w(STATUS)p 813 954 V 30 w(ACCESS)p +1173 954 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice) +h(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 +1067 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1374 +y Fm(4.3.5)99 b Fc(sane)p 545 1374 30 4 v 35 w(close)0 +1607 y Fq(This)32 b(function)h(terminates)h(the)e(association)j +(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h +Fp(h)e Fq(and)h(the)g(de)n(vice)0 1720 y(it)h(represents.)59 +b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g +(to)g Fp(sane)p 2326 1720 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j +(\002rst.)57 b(After)33 b(this)0 1833 y(function)26 b(returns,)f +(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 +2105 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 +2412 y Fm(4.3.6)99 b Fc(sane)p 545 2412 30 4 v 35 w(get)p +760 2412 V 35 w(option)p 1155 2412 V 35 w(descriptor)0 +2645 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f +(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h +(descriptor)g(for)f(option)0 2758 y(number)i Fp(n)e Fq(of)h(the)h(de)n +(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36 +b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0 +2871 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g +(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de) +n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2984 y(includes)22 +b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i +(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p +Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 3097 +y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h +(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227 +3368 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48 +b(*)445 3481 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3789 y Fm(4.3.7)99 +b Fc(sane)p 545 3789 V 35 w(control)p 1000 3789 V 34 +w(option)0 4022 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g +(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e +Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 4135 +y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f +(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h +Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 4248 +y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6 +b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through) +g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 4361 y(is)21 b(a)f(pointer)j(to)e +(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29 +b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f +Fq(must)h(be)g(big)g(enough)0 4474 y(to)26 b(hold)g(the)g(entire)h +(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d +Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39 +b(The)0 4587 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h +(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e +(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4700 y Fp(v)33 +b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h +(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d +(\002rst)f Fp(NUL)0 4812 y Fq(terminator)c(in)e(the)g(string.)44 +b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p +Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o +(vide)i(details)g(on)e(ho)n(w)0 4925 y(well)23 b(the)h(request)h(has)f +(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d +(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)1905 +5381 y(28)p eop +%%Page: 29 30 +29 29 bop 227 123 a Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e +(\(SANE_Handle)h(h,)k(SANE_Int)e(n,)2027 236 y(SANE_Action)f(a,)j(void) +g(*v,)2027 349 y(SANE_Int)e(*)j(i\);)0 595 y Fq(The)21 +b(w)o(ay)h(the)f(option)j(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this) +g(function)i(is)d(controlled)k(by)c(parameter)j Fp(a)c +Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 708 y Fp(SANE)p +225 708 28 4 v 31 w(Action)p Fq(.)k(The)e(possible)j(v)n(alues)f(and)f +(their)g(meaning)h(is)e(described)j(in)e(T)-7 b(able)23 +b(4.7.)p 185 831 3531 4 v 183 943 4 113 v 628 910 a Fr(Symbol)p +1363 943 V 1363 943 V 493 w(Code)p 1664 943 V 1664 943 +V 850 w(Description)p 3714 943 V 185 947 3531 4 v 185 +963 V 183 1076 4 113 v 234 1042 a Fp(SANE)p 459 1042 +28 4 v 31 w(ACTION)p 820 1042 V 30 w(GET)p 1015 1042 +V 32 w(VALUE)p 1363 1076 4 113 v 254 w Fq(0)p 1664 1076 +V 100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 1076 +V 183 1415 4 339 v 234 1155 a Fp(SANE)p 459 1155 28 4 +v 31 w(ACTION)p 820 1155 V 30 w(SET)p 1015 1155 V 32 +w(VALUE)p 1363 1415 4 339 v 254 w Fq(1)p 1664 1415 V +100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g +(passed)h(through)g(ar)n(-)1716 1268 y(gument)21 b Fp(v)d +Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue) +1716 1381 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p +3714 1415 V 183 1980 4 565 v 234 1494 a Fp(SANE)p 459 +1494 28 4 v 31 w(ACTION)p 820 1494 V 30 w(SET)p 1015 +1494 V 32 w(AUTO)p 1363 1980 4 565 v 309 w Fq(2)p 1664 +1980 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28 +b(or)f(de)n(vice)g(will)g(au-)1716 1607 y(tomatically)39 +b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38 +b(mode)1716 1720 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o +(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1833 y(v)n(alue)22 +b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h +Fp(v)e Fq(is)h(completely)1716 1946 y(ignored)j(in)f(this)g(case)g(and) +g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1980 V 185 1983 3531 +4 v 1168 2136 a(T)-7 b(able)24 b(4.7:)29 b(Action)24 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 2136 28 4 v +31 w(Action)p Fq(\))0 2445 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an) +g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o +Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0 +2558 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e +Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h +(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0 +2671 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g +(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2842 y(This)g(function)j(may) +d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +3089 y Fp(SANE)p 452 3089 V 31 w(STATUS)p 813 3089 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h +(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427 +3202 y(option)e(number)-5 b(.)227 3348 y Fp(SANE)p 452 +3348 V 31 w(STATUS)p 813 3348 V 30 w(INVAL)p Fr(:)44 +b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227 +3494 y Fp(SANE)p 452 3494 V 31 w(STATUS)p 813 3494 V +30 w(IO)p 953 3494 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +3640 y Fp(SANE)p 452 3640 V 31 w(STATUS)p 813 3640 V +30 w(NO)p 953 3640 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3786 +y Fp(SANE)p 452 3786 V 31 w(STATUS)p 813 3786 V 30 w(ACCESS)p +1173 3786 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h +(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427 +3899 y(or)24 b(in)l(v)n(alid)h(authentication.)0 4207 +y Fm(4.3.8)99 b Fc(sane)p 545 4207 30 4 v 35 w(get)p +760 4207 V 35 w(parameters)0 4440 y Fq(This)28 b(function)i(is)e(used)h +(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44 +b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0 +4553 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h +(started)h(\()p Fp(sane)p 2070 4553 28 4 v 31 w(start\(\))19 +b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0 +4666 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6 +b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates) +e(of)g(what)f(the)g(parameters)0 4779 y(will)23 b(be)g(when)g +Fp(sane)p 716 4779 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32 +b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i +(started)g(allo)n(ws,)0 4891 y(for)c(e)o(xample,)h(to)e(get)h(an)g +(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27 +b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0 +5004 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f +(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer) +j Fp(p)c Fq(to)i(a)g(parameter)0 5117 y(structure.)k(The)23 +b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n +(w)-6 b(.)1905 5381 y(29)p eop +%%Page: 30 31 +30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046 +a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746 +1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103 +1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a +Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p +1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21 +b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g +(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h +(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j +(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797 +1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h +(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i +(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d +(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797 +1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49 +b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f +(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797 +2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32 +b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31 +b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28 +b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e +(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h +(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455 +V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4 +v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30 +w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133 +V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n +(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f +(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797 +2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g +Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j +(should)e(reload)g(all)f(options.)1797 2986 y(This)36 +b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one) +1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923 +4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p +628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444 +3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g +(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797 +3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p +2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797 +3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f +(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26 +b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if) +1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30 +b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33 +b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797 +3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4 +791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29 +b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option) +1905 5381 y(30)p eop +%%Page: 31 32 +31 31 bop 227 123 a Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e +(\(SANE_Handle)h(h,)2027 236 y(SANE_Parameters)f(*)54 +b(p\);)0 464 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e(a) +f(structure)k(of)d(type)g Fp(SANE)p 2314 464 28 4 v 31 +w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0 +577 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910 +498 y + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 910 498 a 910 498 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 910 498 a 227 786 a Fp(typedef)52 +b(struct)336 899 y({)445 1012 y(SANE_Frame)e(format;)445 +1125 y(SANE_Int)h(flags;)445 1238 y(SANE_Int)g(lines;)445 +1350 y(SANE_Int)g(depth;)445 1463 y(SANE_Int)g(pixels_per_line;)445 +1576 y(SANE_Int)g(bytes_per_line;)445 1689 y(SANE_Int)g +(channels_per_ima)o(ge)o(;)445 1802 y(SANE_String)f(format_desc;)445 +1915 y(SANE_String)g(proposed_filena)o(me)o(;)445 2028 +y(SANE_Int)h(dpi_x;)445 2141 y(SANE_Int)g(dpi_y;)445 +2254 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j +(*/)336 2367 y(})227 2480 y(SANE_Parameters)o(;)0 2540 +y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 2540 a 0 2540 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 2540 a 0 2540 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 2540 a 0 2540 +a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 2540 a 0 2540 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 2540 a 148 x Fq(Member)38 b Fp(format)d +Fq(speci\002es)k(the)f(format)h(of)f(the)g(ne)o(xt)h(frame)f(to)g(be)g +(returned.)74 b(The)38 b(possible)i(v)n(alues)f(for)f(type)0 +2801 y Fp(SANE)p 225 2801 28 4 v 31 w(Frame)24 b Fq(are)k(described)h +(in)e(T)-7 b(able)28 b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n +(alues)h(is)e(described)i(in)f(more)f(detail)h(in)f(Sec-)0 +2914 y(tion)d(3.2.)0 3005 y + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + 0 3005 a 0 3005 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 0 3005 +a 217 3008 3466 4 v 215 3121 4 113 v 535 3087 a Fr(Symbol)p +1144 3121 V 1144 3121 V 368 w(Code)p 1446 3121 V 1446 +3121 V 100 w(SANE)d(standard)p 2159 3121 V 2159 3121 +V 586 w(Description)p 3681 3121 V 217 3124 3466 4 v 217 +3141 V 215 3254 4 113 v 267 3220 a Fp(SANE)p 492 3220 +28 4 v 31 w(FRAME)p 798 3220 V 31 w(GRAY)p 1144 3254 +4 113 v 230 w Fq(0)p 1446 3254 V 318 w(v)o(ersion)k(1)p +2159 3254 V 240 w(Band)f(co)o(v)o(ering)h(human)f(visual)h(range.)p +3681 3254 V 215 3367 V 267 3333 a Fp(SANE)p 492 3333 +28 4 v 31 w(FRAME)p 798 3333 V 31 w(RGB)p 1144 3367 4 +113 v 285 w Fq(1)p 1446 3367 V 318 w(v)o(ersion)g(1)p +2159 3367 V 240 w(Pix)o(el-interlea)n(v)o(ed)i(red/green/blue)h(bands.) +p 3681 3367 V 215 3480 V 267 3446 a Fp(SANE)p 492 3446 +28 4 v 31 w(FRAME)p 798 3446 V 31 w(RED)p 1144 3480 4 +113 v 285 w Fq(2)p 1446 3480 V 318 w(v)o(ersion)d(1)p +2159 3480 V 240 w(Red)e(band)i(of)e(a)g(red/green/blue)28 +b(image.)p 3681 3480 V 215 3593 V 267 3559 a Fp(SANE)p +492 3559 28 4 v 31 w(FRAME)p 798 3559 V 31 w(GREEN)p +1144 3593 4 113 v 175 w Fq(3)p 1446 3593 V 318 w(v)o(ersion)d(1)p +2159 3593 V 240 w(Green)f(band)g(of)g(a)f(red/green/blue)28 +b(image.)p 3681 3593 V 215 3705 V 267 3672 a Fp(SANE)p +492 3672 28 4 v 31 w(FRAME)p 798 3672 V 31 w(BLUE)p 1144 +3705 4 113 v 230 w Fq(4)p 1446 3705 V 318 w(v)o(ersion)d(1)p +2159 3705 V 240 w(Blue)e(band)i(of)e(a)g(red/green/blue)28 +b(image.)p 3681 3705 V 215 3818 V 267 3784 a Fp(SANE)p +492 3784 28 4 v 31 w(FRAME)p 798 3784 V 31 w(RAW)p 1144 +3818 4 113 v 285 w Fq(5)p 1446 3818 V 318 w(v)o(ersion)d(2)p +2159 3818 V 240 w(Arbitrary)g(pix)o(el)f(property)i(transmission.)p +3681 3818 V 215 3931 V 267 3897 a Fp(SANE)p 492 3897 +28 4 v 31 w(FRAME)p 798 3897 V 31 w(MIME)p 1144 3931 +4 113 v 230 w Fq(6)p 1446 3931 V 318 w(v)o(ersion)f(2)p +2159 3931 V 240 w(Data)e(described)j(by)e(a)f(mime)g(descriptor)-5 +b(.)p 3681 3931 V 217 3935 3466 4 v 1194 4088 a(T)e(able)23 +b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 2377 +4088 28 4 v 31 w(Frame)p Fq(\))0 4204 y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + 0 4204 a 0 4204 +a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 0 4204 a 0 4204 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 0 4204 a 247 x Fq(The)e Fp(flags)e +Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h(which)f(up)g(to)g +(no)n(w)f(4)h(informational)j(bits)d(are)g(de\002ned,)h(all)f(unused)i +(bits)0 4564 y(ha)n(v)o(e)g(to)g(be)f(set)h(to)f(0:)136 +4793 y Fk(\017)46 b Fp(SANE)p 452 4793 28 4 v 31 w(PFLAG)p +758 4793 V 31 w(LAST)p 1009 4793 V 31 w(FRAME)27 b Fq(\(bit)j(0,)i +(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g(if)g(and)h(only)g(if)f(the)h +(frame)f(that)h(is)f(currently)227 4906 y(being)23 b(acquired)i(\(or)d +(the)g(frame)g(that)g(will)g(be)g(acquired)i(ne)o(xt)e(if)g(there)h(is) +f(no)g(current)h(frame\))g(is)f(the)g(last)g(frame)g(of)227 +5019 y(a)g(multi)h(frame)g(image)g(\(e.g.,)f(the)h(current)h(frame)f +(is)f(the)h(blue)g(component)i(of)e(a)f(red,)h(green,)g(blue)h +(image\).)29 b(Note,)227 5132 y(that)24 b(it)g(is)f(possible)j(to)d +(transmit)i(multiple)g(images)f(in)f(succession.)0 5151 +y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 5151 a 1905 5381 +a Fq(31)p eop +%%Page: 32 33 +32 32 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fp(SANE)p 452 123 28 4 v 31 w(PFLAG)p 758 123 V 31 +w(MORE)p 1009 123 V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\)) +e(is)g(set)g(to)g(1)f(to)h(indicate)i(further)f(pending)h(images.)40 +b(It)26 b(is)227 236 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f +(1)g(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g +(determined)i(at)e(a)g(v)o(ery)g(early)h(time,)f(where)227 +349 y(it)32 b(might)f(not)h(be)g(detectable,)k(if)31 +b(there)i(actually)g(are)f(more)f(images)i(to)e(transfer)-5 +b(.)55 b(E.g.)c(you)32 b(will)f(usually)j(not)227 462 +y(kno)n(w)27 b(if)f(the)g(document)j(feeder)e(contains)i(further)f +(pages)f(when)g(starting)h(to)f(scan)g(the)f(current)i(one.)38 +b(Thus)27 b(you)227 574 y(are)d(allo)n(wed)g(to)g(set)f(that)i(bit)e(b) +n(ut)h(later)h(f)o(ail)f(at)f Fp(sane)p 1942 574 V 31 +w(start\(\))p Fq(.)136 762 y Fk(\017)46 b Fp(SANE)p 452 +762 V 31 w(PFLAG)p 758 762 V 31 w(NEW)p 954 762 V 31 +w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h(to)g(1)f(to) +h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g(a)227 +875 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g +(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group) +h(multi-image)227 988 y(scans.)136 1176 y Fk(\017)46 +b Fp(SANE)p 452 1176 V 31 w(PFLAG)p 758 1176 V 31 w(BACKSIDE)16 +b Fq(\(bit)21 b(3,)f(bitv)n(alue)j(8\))d(tells)i(if)e(the)h(current)h +(image)f(w)o(as)f(acquired)j(from)e(the)f(front)i(\(0\))227 +1288 y(or)27 b(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g +(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n +(ws)g(to)f(group)227 1401 y(and)e(order)h(multi-image)g(transfers)h(re) +o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h +(\002rst/back)g(\002rst\).)0 1673 y(Note,)e(that)i Fp(flags)20 +b Fq(is)k(compatible)i(to)e(member)f Fp(last)p 1827 1673 +V 31 w(frame)e Fq(of)j Fp(SANE)p 2473 1673 V 31 w(Parameters)18 +b Fq(of)24 b(SANE)d(standard)26 b(v)o(er)n(-)0 1786 y(sion)e(1)f +(\(same)h(size)g(and)g(only)h(bit)e(0)h(\(bitv)n(alue)h(1\))f(w)o(as)f +(used)h(with)g(same)f(function\).)0 1957 y(Member)33 +b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the) +g(frame)f(is)g(comprised)i(of.)57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,) +i(the)e(num-)0 2070 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e +(priori)j(and)e(the)h(frontend)h(should)g(call)f Fp(sane)p +2572 2070 V 31 w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status) +h(of)0 2183 y Fp(SANE)p 225 2183 V 31 w(STATUS)p 586 +2183 V 30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f +(transferring)k(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i +(inband,)h(it)c(is)0 2296 y(recommended)23 b(to)e(set)g(that)g(member)l +(,)h(if)f(a)n(v)n(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h +(applicable,)i(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0 +2468 y(Member)18 b Fp(bytes)p 605 2468 V 31 w(per)p 801 +2468 V 31 w(line)e Fq(speci\002es)j(the)f(number)h(of)f(bytes)h(that)g +(comprise)h(one)e(scan)h(line.)27 b(If)18 b Fp(bytes)p +3493 2468 V 31 w(per)p 3689 2468 V 31 w(line)0 2580 y +Fq(is)28 b(set)g(to)g(0,)g(which)h(can)f(currently)i(only)f(be)f(the)g +(case)h(for)f Fp(SANE)p 2150 2580 V 31 w(FRAME)p 2456 +2580 V 30 w(MIME)p Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0 +2693 y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i +(simply)e(try)h(to)f(read)h(until)g Fp(SANE)p 2490 2693 +V 31 w(STATUS)p 2851 2693 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h +(block)0 2806 y(length.)0 2978 y(Member)f Fp(depth)c +Fq(speci\002es)27 b(the)f(number)g(of)g(bits)g(per)g(sample.)35 +b(Note,)26 b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g +(n*8)0 3091 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23 +b(with)h(other)g(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6 +b(.)0 3262 y(Member)24 b Fp(pixels)p 666 3262 V 30 w(per)p +861 3262 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g +(that)g(comprise)h(one)f(scan)g(line.)0 3434 y(Assume)k +Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then) +h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f +Fp(depth)p Fq(\))e(and)0 3547 y(the)e(number)i(of)e(pix)o(els)h(per)f +(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h +Fp(pixels)p 2416 3547 V 30 w(per)p 2611 3547 V 31 w(line)p +Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 +3660 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h +Fp(bytes)p 1675 3660 V 31 w(per)p 1871 3660 V 31 w(line)p +Fq(\))d(as)j(follo)n(ws:)1214 3926 y Fh(c)i(>)p Fj(=)1445 +3782 y Fb(\()1554 3870 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p +Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 3983 +y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h +Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g +Fj(1)0 4190 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g +(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by) +f(the)g(right)g(side)g(of)0 4303 y(this)c(equation.)31 +b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f +(such)i(\223padded\224)h(image)e(formats.)0 4474 y(Member)f +Fp(channels)p 775 4474 V 29 w(per)p 969 4474 V 31 w(image)d +Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the)e(image)f(consists) +j(of.)j(When)23 b(the)g(image)0 4587 y(is)29 b(transmitted)i(in)e(more) +g(than)g(one)h(frame)f Fp(channels)p 1869 4587 V 29 w(per)p +2063 4587 V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g +(frames)h(for)f(this)0 4700 y(image.)0 4872 y(Member)d +Fp(format)p 668 4872 V 30 w(desc)e Fq(is)h(used)i(for)f(the)h(ne)n(w)e +(frametypes)j Fp(SANE)p 2310 4872 V 31 w(FRAME)p 2616 +4872 V 30 w(RAW)c Fq(and)j Fp(SANE)p 3212 4872 V 31 w(FRAME)p +3518 4872 V 30 w(MIME)p Fq(.)c(Its)0 4985 y(meaning)i(dif)n(fers)g +(between)f(the)g(tw)o(o)f(types:)0 5004 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 5004 a 0 +5004 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 5004 a 0 5004 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 5004 a 1905 5381 a Fq(32)p +eop +%%Page: 33 34 +33 33 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fp(SANE)p 452 123 28 4 v 31 w(FRAME)p 758 123 V 31 +w(RAW)p Fq(:)26 b(The)h Fp(format)p 1503 123 V 30 w(desc)e +Fq(contains)30 b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f +(an)g(optional)227 236 y(depth)d(information)h(separated)g(by)e(a)f +(colon\(:\).)227 386 y(A)g(plane)h(is)g(descibed)h(by)f(one)g(channel,) +h(e.g.)k(\224)p Fp(gray)p Fq(\224)21 b(or)j(\224)p Fp(gray:12)p +Fq(\224.)227 535 y(Channel)h(interlea)n(v)o(ed)i(data)d(is)g(described) +i(by)e(a)g(comma)f(separated)k(list)d(of)f(channel)j(descriptions,)h +(for)d(e)o(xample)227 648 y(\224)p Fp(red,green,blue)p +Fq(\224)14 b(or)21 b(\224)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p +Fq(\224,)14 b(the)21 b(channel)h(data)f(is)f(sent)h(in)g(the)f(gi)n(v)o +(en)h(order)-5 b(.)227 798 y(The)24 b(depth)i(information)h(does)e +Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f +(data,)g(it)e(is)g(only)h(an)g(informa-)227 911 y(tion)f(for)g(the)g +(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f +(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227 +1061 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p +Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p +Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel) +227 1174 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared) +j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24 +b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1286 y(description)e(lik)o(e)e +Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g +(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h +(with)227 1399 y(useful)f(colors.)227 1549 y(Note)30 +b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d +(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227 +1662 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f +(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27 +b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1775 y(is)e(prefered)i(to)e +(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d +(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227 +1888 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d +(de\002ned)i(in)e(member)h Fp(channels)p 2756 1888 V +29 w(per)p 2950 1888 V 31 w(image)p Fq(.)136 2074 y Fk(\017)46 +b Fp(SANE)p 452 2074 V 31 w(FRAME)p 758 2074 V 31 w(MIME)p +Fq(:)27 b(The)i Fp(format)p 1561 2074 V 30 w(desc)e Fq(contains)32 +b(the)e(MIME)e(type/subtype)34 b(*\(;parameter\))e(\002elds)e(as)227 +2187 y(described)35 b(in)d(RFC)e(1521,)k(4.)54 b(The)31 +b(Content-T)-7 b(ype)34 b(header)f(\002eld,)h(without)f(the)f +(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227 2300 +y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i +(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g +(possible,)k(please)227 2413 y(stick)27 b(to)e(the)h(IAN)m(A)e +(assigned)k(MIME)c(types,)j(and)f(mak)o(e)g(sure)g(the)g(data)h(stream) +f(is)f(compliant)j(with)d(the)h(corre-)227 2526 y(sponding)32 +b(speci\002cation.)49 b(When)30 b(data)g(is)f(transmitted)j(with)d(the) +h(frame)g(type)g Fp(SANE)p 3051 2526 V 31 w(FRAME)p 3357 +2526 V 30 w(MIME)d Fq(all)j(data)227 2639 y(has)h(to)f(be)g +(transmitted)j(within)d(one)h(frame,)h(multiple)f(frames)g(are)f(not)h +(allo)n(wed)g(\(so)f(the)h(\003ag)e Fp(last)p 3601 2639 +V 31 w(frame)227 2752 y Fq(has)24 b(to)e(be)h(set)g(when)g(using)i +(this)e(frame)g(type\).)30 b(A)21 b(fully)j(compliant)h(SANE)20 +b(back)o(end)26 b(is)c(required)j(to)e(transmit)h(in)227 +2865 y(either)j(SANE)d(nati)n(v)o(e)i(frametypes,)i(or)e(in)g(a)f(MIME) +g(type,)i(for)f(which)g(a)f(con)l(v)o(erting)k(meta)d(back)o(end)i(e)o +(xists)f(and)227 2978 y(is)d(freely)g(a)n(v)n(ailable)i(for)e(all)g +(platforms.)227 3128 y(Other)j(formats)g(may)g(be)f(transmitted,)k(b)n +(ut)d(the)g(only)g(thing)h(the)e(a)n(v)o(erage)j(frontend)f(can)f(do)g +(with)f(them,)h(is)g(sa)n(v)o(e)227 3240 y(them.)44 b(This)29 +b(is)f(not)h(considered)j(a)c(good)h(option,)j(as)c(it)h(does)g(not)g +(f)o(acilitate)i(transmitting)g(the)e(data)g(to)g(a)f(client)227 +3353 y(application)i(that)d(may)g(be)f(running)j(the)e(frontend.)40 +b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g(transferred)j(by)c(the)h +(back)o(end)i(is)e(not)227 3466 y(an)k(image)f(in)g(nature,)k(it)c(w)o +(ouldn')n(t)i(mak)o(e)e(sense)i(to)e(try)g(con)l(v)o(erting)k(it)c(an)o +(yw)o(ay)-6 b(,)32 b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227 +3579 y(simple)22 b Fp(SANE)p 715 3579 V 31 w(FRAME)p +1021 3579 V 31 w(MIME)c Fq(transfer)24 b(for)d(that)h(case.)29 +b(But)21 b(e)n(v)o(en)g(then,)h(try)g(to)f(stick)h(to)g(well)f(kno)n +(wn)g(stuf)n(f)h(with)227 3692 y(freely)j(e)o(xisting)g(standards)h +(and)e(vie)n(wers)h(as)e(well.)0 3959 y(The)g(member)g +Fp(proposed)p 929 3959 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e +(suggest)i(a)e(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o +(xtension)j(in)0 4072 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g +(such)h(a)e(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g +(database.)30 b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0 +4185 y(set)k(the)g(\002eld)f(to)g(\224\224.)0 4355 y(In)e(the)h(case)g +(of)g(ra)o(w)e(frames,)i Fp(proposed)p 1393 4355 V 29 +w(filename)17 b Fq(is)22 b(e)o(xpected)h(to)e(hold)i(the)e(basename)i +(for)f(the)g(image,)g(with)f(the)0 4468 y(e)o(xtension)k(determined)g +(by)f(the)f(sa)n(v)o(e)g(function)j(of)d(the)g(frontend,)i(as)e(the)g +(frontend)i(can)f(fully)g(understand)i(the)d(data)h(and)0 +4581 y(is)f(thus)i(able)f(to)f(encode)i(it)f(in)f(an)o(y)h(format)g(it) +f(wishes.)0 4752 y(F)o(or)g(MIME)f(frames)i Fp(proposed)p +1133 4752 V 29 w(filename)19 b Fq(can)24 b(contain)h(either:)136 +5019 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which) +g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o +(xtension.)32 b(This)24 b(could)i(also)227 5132 y(be)e(gotten)h(from)e +(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e +(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)0 5151 +y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 0 5151 a 1905 5381 +a Fq(33)p eop +%%Page: 34 35 +34 34 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o(xtension.)0 +391 y(Note,)31 b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g +(parse)g(a)f(gi)n(v)o(en)i(MIME)d(type)i(internally)-6 +b(,)34 b(it)29 b(is)g(perfectly)j(permissible)g(to)0 +504 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g(the)g(proposed)i +(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h(basename,)h(when) +f(using)g(internal)0 617 y(sa)n(v)o(e)g(algorithms)i(for)d(dif)n +(ferent)j(formats.)0 787 y(In)34 b(an)o(y)g(case,)k(if)c(the)g +(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f(frontend)h +(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0 +900 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g +(local)g(\002lesystem)h(restrictions.)0 1071 y(Special)i(care)g(should) +g(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o +(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all) +g(path)0 1184 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o +(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h +(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0 +1297 y(a)n(v)n(oiding)c(to)c(o)o(v)o(erwrite)i(e)o(xisting)h(\002les.)j +(\(Creating)d(of)e(leading)h(dot)g(\002les)e(-)g(lik)o(e)i(.rhosts)g(-) +e(is)h(not)g(an)g(issue)h(here,)f(because)0 1410 y(that')-5 +b(s)25 b(only)f(a)f(proposed)j(\002lename)e(e)o(xtension)i(as)d +(mentioned)j(abo)o(v)o(e.)0 1580 y(The)i(string)h Fp(proposed)p +848 1580 28 4 v 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f(transmit)i +(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in)e(the)0 +1693 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of)n(fer)-5 +b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h(information)i +(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0 1806 +y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j +(enganged)f(\002lters,)f(etc.)0 1977 y(The)34 b(members)g +Fp(dpi)p 711 1977 V 32 w(x,)53 b(dpi)p 1071 1977 V 32 +w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h +(resolution.)63 b(Note,)37 b(that)d(multiple-image)0 +2090 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c +(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j +(resolution)g(between)0 2203 y(frames)24 b(of)g(the)f(same)h(image.)0 +2374 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g +(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h +(unchanged)j(when)c(future)0 2486 y(e)o(xtensions)j(are)e(done.)30 +b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e +(to)g(0.)2484 2486 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 2484 2486 a 2484 2486 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 2484 2486 +a 2484 2486 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 2484 2486 a 0 2793 a Fm(4.3.9)99 b Fc(sane)p +545 2793 30 4 v 35 w(start)0 3025 y Fq(This)23 b(function)j(initiates)g +(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i +(by)c(handle)i Fp(h)p Fq(.)227 3269 y Fp(SANE_Status)50 +b(sane_start)g(\(SANE_Handle)f(h\);)0 3512 y Fq(This)23 +b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h +(status)g(codes.)227 3756 y Fp(SANE)p 452 3756 28 4 v +31 w(STATUS)p 813 3756 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 +b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g +Fp(sane)p 3297 3756 V 31 w(cancel)p Fq(.)227 3901 y Fp(SANE)p +452 3901 V 31 w(STATUS)p 813 3901 V 30 w(DEVICE)p 1173 +3901 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6 +b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5 +b(.)227 4046 y Fp(SANE)p 452 4046 V 31 w(STATUS)p 813 +4046 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g +(jammed.)227 4192 y Fp(SANE)p 452 4192 V 31 w(STATUS)p +813 4192 V 30 w(NO)p 953 4192 V 32 w(DOCS)p Fr(:)44 b +Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227 +4337 y Fp(SANE)p 452 4337 V 31 w(STATUS)p 813 4337 V +30 w(COVER)p 1118 4337 V 31 w(OPEN)p Fr(:)44 b Fq(The)23 +b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4482 y Fp(SANE)p +452 4482 V 31 w(STATUS)p 813 4482 V 30 w(IO)p 953 4482 +V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f +(communicating)i(with)e(the)g(de)n(vice.)227 4628 y Fp(SANE)p +452 4628 V 31 w(STATUS)p 813 4628 V 30 w(NO)p 953 4628 +V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)227 4773 y Fp(SANE)p +452 4773 V 31 w(STATUS)p 813 4773 V 30 w(INVAL)p Fr(:)44 +b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with)e(the)h(current)h +(set)f(of)f(options.)34 b(The)24 b(fron-)427 4886 y(tend)19 +b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c(if)g +Fp(SANE)p 2316 4886 V 31 w(INFO)p 2567 4886 V 31 w(RELOAD)p +2928 4886 V 30 w(OPTIONS)c Fq(had)19 b(been)427 4999 +y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p 1492 +4999 V 30 w(control)p 1907 4999 V 30 w(option\(\))p Fq(,)20 +b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may)427 +5112 y(ha)n(v)o(e)d(changed.)1905 5381 y(34)p eop +%%Page: 35 36 +35 35 bop 0 123 a Fm(4.3.10)99 b Fc(sane)p 595 123 30 +4 v 35 w(read)0 356 y Fq(This)19 b(function)j(is)e(used)g(to)g(read)g +(image)g(data)g(from)g(the)g(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)27 b(Ar)n(gument)20 b Fp(buf)e Fq(is)h(a)g(pointer)0 +469 y(to)27 b(a)g(memory)g(area)h(that)f(is)g(at)g(least)h +Fp(maxlen)c Fq(bytes)k(long.)41 b(The)26 b(number)i(of)f(bytes)i +(returned)g(is)e(stored)h(in)f Fp(*len)p Fq(.)37 b(A)0 +582 y(back)o(end)31 b(must)e(set)h(this)f(to)g(zero)h(when)f(a)g +(status)h(other)g(than)g Fp(SANE)p 2262 582 28 4 v 31 +w(STATUS)p 2623 582 V 30 w(GOOD)c Fq(is)j(returned\).)48 +b(When)29 b(the)h(call)0 695 y(succeeds,)c(the)d(number)i(of)e(bytes)i +(returned)h(can)d(be)h(an)o(ywhere)h(in)e(the)h(range)h(from)e(0)g(to)h +Fp(maxlen)c Fq(bytes.)227 941 y Fp(SANE_Status)50 b(sane_read)g +(\(SANE_Handle)f(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482 +1054 y(SANE_Int)c(maxlen,)g(SANE_Int)g(*)j(len\);)0 1300 +y Fq(F)o(or)28 b(ef)n(\002cienc)o(y)i(reasons,)h(medium)e(to)g(lar)n +(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f +(kilobytes\))j(should)g(be)d(used.)46 b(Re-)0 1413 y(turning)29 +b(short)g(reads)g(is)e(allo)n(wed)i(to)e(allo)n(w)h(for)g(small)g(b)n +(uf)n(fers)h(in)e(the)h(back)o(end.)43 b(If)28 b(this)g(function)i(is)d +(called)i(when)f(no)0 1526 y(data)c(is)g(a)n(v)n(ailable,)h(one)f(of)g +(tw)o(o)f(things)i(may)e(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h +(that)g(is)f(in)g(ef)n(fect)i(for)f(handle)h Fp(h)p Fq(.)114 +1772 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e +(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f +(at)f(least)h(one)g(data)f(byte)h(is)227 1885 y(a)n(v)n(ailable)h(\(or) +e(until)g(some)g(error)g(occurs\).)114 2073 y(2.)45 b(If)37 +b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c(mode,)k(the)d(call)g +(returns)h(immediately)g(with)e(status)i Fp(SANE)p 3656 +2073 V 31 w(STA-)227 2186 y(TUS)p 397 2186 V 32 w(GOOD)21 +b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0 2432 +y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f +(call)h(to)f Fp(sane)p 2024 2432 V 31 w(set)p 2220 2432 +V 31 w(io)p 2361 2432 V 32 w(mode\(\))p Fq(.)0 2604 y(This)g(function)j +(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g +(codes.)227 2850 y Fp(SANE)p 452 2850 V 31 w(STATUS)p +813 2850 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d +(cancelled)j(through)f(a)e(call)h(to)g Fp(sane)p 3297 +2850 V 31 w(cancel)p Fq(.)227 2996 y Fp(SANE)p 452 2996 +V 31 w(STATUS)p 813 2996 V 30 w(EOF)p Fr(:)45 b Fq(No)27 +b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h(frame.)44 +b(If)28 b Fp(sane)p 3199 2996 V 31 w(read)e Fq(sends)427 +3109 y(back)f(an)o(y)e(image)h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g +(return)g(with)g Fp(SANE)p 2540 3109 V 31 w(STATUS)p +2901 3109 V 30 w(EOF)p Fq(.)227 3255 y Fp(SANE)p 452 +3255 V 31 w(STATUS)p 813 3255 V 30 w(JAMMED)p Fr(:)43 +b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 3401 +y Fp(SANE)p 452 3401 V 31 w(STATUS)p 813 3401 V 30 w(NO)p +953 3401 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e +(out)h(of)g(documents.)227 3547 y Fp(SANE)p 452 3547 +V 31 w(STATUS)p 813 3547 V 30 w(COVER)p 1118 3547 V 31 +w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227 +3694 y Fp(SANE)p 452 3694 V 31 w(STATUS)p 813 3694 V +30 w(IO)p 953 3694 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.) +227 3840 y Fp(SANE)p 452 3840 V 31 w(STATUS)p 813 3840 +V 30 w(NO)p 953 3840 V 32 w(MEM)p Fr(:)44 b Fq(An)23 +b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 +3986 y Fp(SANE)p 452 3986 V 31 w(STATUS)p 813 3986 V +30 w(ACCESS)p 1173 3986 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 +b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n +(\002cient)427 4099 y(or)24 b(in)l(v)n(alid)h(authentication.)0 +4407 y Fm(4.3.11)99 b Fc(sane)p 595 4407 30 4 v 35 w(cancel)0 +4640 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f +(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g +(operation)g(of)e(the)0 4753 y(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)227 4999 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);) +1905 5381 y Fq(35)p eop +%%Page: 36 37 +36 36 bop 0 123 a Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o +(y)h(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i +(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 236 +y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f +(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j +(asynchronously)i(\(e.g.,)0 349 y(from)37 b(within)g(a)f(signal)j +(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f +(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h +Fq(imply)0 462 y(that)g(the)f(currently)i(pending)g(operation)h(has)d +(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e +(cancellation)i(has)d(been)0 574 y Fl(initiated)p Fq(.)68 +b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d +(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0 +687 y Fp(SANE)p 225 687 28 4 v 31 w(STATUS)p 586 687 +V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j +(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0 +800 y(this)i(implies)h(that)f(a)f(frontend)i(must)f Fl(not)i +Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g(cancelled)i +(operation)g(has)e(returned.)0 1108 y Fm(4.3.12)99 b +Fc(sane)p 595 1108 30 4 v 35 w(set)p 810 1108 V 35 w(io)p +965 1108 V 35 w(mode)0 1341 y Fq(This)21 b(function)j(is)e(used)g(to)f +(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p Fq(.)k(The)21 +b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d(non-blocking.)0 +1454 y(If)27 b(ar)n(gument)j Fp(m)c Fq(is)i Fp(SANE)p +850 1454 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g(is)f(set)h(to)g +(non-blocking)j(mode,)e(otherwise)g(it')-5 b(s)28 b(set)g(to)f +(blocking)j(mode.)0 1567 y(This)23 b(function)j(can)e(be)g(called)g +(only)h(after)f(a)f(call)h(to)g Fp(sane)p 1917 1567 V +30 w(start\(\))c Fq(has)k(been)g(performed.)227 1813 +y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 +b(SANE_Bool)c(m\);)0 2060 y Fq(By)33 b(def)o(ault,)38 +b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60 +b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0 +2173 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f +(status)i(v)n(alue)f Fp(SANE)p 2107 2173 V 31 w(STATUS)p +2468 2173 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39 +b(Blocking)0 2286 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o +(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i +Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 2286 V 31 w(FALSE)d +Fq(is)0 2398 y(guaranteed)e(to)c(complete)i(successfully)-6 +b(.)0 2570 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f +(the)h(follo)n(wing)h(status)g(codes:)227 2816 y Fp(SANE)p +452 2816 V 31 w(STATUS)p 813 2816 V 30 w(INVAL)p Fr(:)44 +b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227 +2963 y Fp(SANE)p 452 2963 V 31 w(STATUS)p 813 2963 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(the)f(requested)i(I/O)d(mode.)0 3270 y Fm(4.3.13)99 +b Fc(sane)p 595 3270 30 4 v 35 w(get)p 810 3270 V 35 +w(select)p 1205 3270 V 34 w(fd)0 3503 y Fq(This)25 b(function)j(is)e +(used)g(to)g(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g +(for)d(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 +3616 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h +(a)f(call)h(to)f Fp(sane)p 1850 3616 28 4 v 31 w(read\(\))d +Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29 +b(If)21 b(the)h(call)0 3729 y(completes)j(successfully)-6 +b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d +Fp(*fd)p Fq(.)227 3976 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 4222 y Fq(This)37 +b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g +Fp(sane)p 2056 4222 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed) +h(and)f(the)g(returned)0 4335 y(\002le-descriptor)j(is)c(guaranteed)k +(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h +(image)f(acquisition)j(\(i.e.,)g(un-)0 4448 y(til)e Fp(sane)p +339 4448 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 4448 +V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h +Fp(sane)p 2810 4448 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0 +4561 y Fp(SANE)p 225 4561 V 31 w(STATUS)p 586 4561 V +30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i +(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the) +0 4674 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p +962 4674 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h +Fp(SANE)p 2202 4674 V 31 w(STATUS)p 2563 4674 V 30 w(EOF)p +Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 4786 +y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f +(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p +3167 4786 V 31 w(read\(\))p Fq(.)0 4958 y(A)30 b(back)o(end)k(may)e +(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31 +b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0 +5071 y Fp(SANE)p 225 5071 V 31 w(STATUS)p 586 5071 V +30 w(UNSUPPORTED)p Fq(.)1905 5381 y(36)p eop +%%Page: 37 38 +37 37 bop 0 123 a Fq(Note)25 b(that)h(the)g(only)g(operation)i +(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c(a)g(host)i +(operating-system)i(dependent)0 236 y(test)23 b(whether)h(the)e +(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h(test)g(can)g(be)g +(implemented)h(using)g Fp(select\(\))18 b Fq(or)23 b +Fp(poll\(\))0 349 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f(other)i +(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l(,)23 +b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0 +462 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)f +(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g +(until)g(a)f(call)g(to)0 574 y Fp(sane)p 225 574 28 4 +v 31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 +b(man)o(y)f(input)i(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 +b(,)22 b(support)i(for)f(this)g(operation)i(is)d(strongly)0 +687 y(encouraged)27 b(as)c(it)g(permits)i(an)e(application)k(to)d(do)f +(other)i(w)o(ork)e(while)h(image)g(acquisition)j(is)c(in)h(progress.)0 +859 y(This)f(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n +(wing)h(status)g(codes:)227 1105 y Fp(SANE)p 452 1105 +V 31 w(STATUS)p 813 1105 V 30 w(INVAL)p Fr(:)44 b Fq(No)22 +b(image)i(acquisition)j(is)c(pending.)227 1251 y Fp(SANE)p +452 1251 V 31 w(STATUS)p 813 1251 V 30 w(UNSUPPORTED)p +Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g(support)h(this)g +(operation.)0 1559 y Fm(4.3.14)99 b Fc(sane)p 595 1559 +30 4 v 35 w(strstatus)0 1792 y Fq(This)28 b(function)i(can)f(be)f(used) +h(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i +(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 1905 +y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h +(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f +(\(full-stop\).)32 b(The)22 b(function)j(is)0 2018 y(guaranteed)k(to)c +(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g +(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this) +g(function)h(is)0 2131 y(performed.)227 2377 y Fp(const)53 +b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g +(status\);)0 2729 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0 +2994 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i +(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b +Fp(sane)p 2797 2994 28 4 v 31 w(init\(\))17 b Fq(and)22 +b Fp(sane)p 3547 2994 V 31 w(exit\(\))0 3107 y Fq(initialize)j(and)d(e) +o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31 +b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f +(initialization)j(and)d(before)0 3220 y(e)o(xiting)i(the)f(back)o(end.) +0 3392 y(Function)j Fp(sane)p 573 3392 V 31 w(get)p 769 +3392 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h +(after)g Fp(sane)p 2572 3392 V 31 w(init\(\))c Fq(has)k(been)h(called.) +36 b(It)26 b(returns)0 3505 y(the)32 b(list)f(of)h(the)f(de)n(vices)i +(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 +b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0 +3618 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f +(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n +(ferent)h(calls.)30 b(It)21 b(should)j(be)0 3731 y(noted)i(that)f(this) +g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g +(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of) +0 3844 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36 +b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f +(ability)h(for)f(a)f(user)i(to)e(directly)0 3956 y(select)g(a)e +(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g +(function.)0 4128 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e +(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352 +4128 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h +(at)0 4241 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o +(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e +(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 4354 y(at)e(an)o(y)h(gi)n(v)o +(en)g(time.)0 4526 y(An)f(opened)i(de)n(vice)g(can)f(be)f(setup)i +(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f +(functions)j Fp(sane)p 3460 4526 V 30 w(get)p 3655 4526 +V 32 w(opt-)0 4638 y(ion)p 170 4638 V 31 w(descriptor\(\))k +Fq(and)38 b Fp(sane)p 1280 4638 V 31 w(control)p 1696 +4638 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n +(vice,)42 b(obtaining)e(option)0 4751 y(descriptors)d(and)e(setting)h +(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f +(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0 +4864 y(read)28 b(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be) +o(ginning)h(and)f(then)g(b)n(uild)g(a)f(dialog)i(\(either)f(graphical)i +(or)d(a)g(command-line)0 4977 y(oriented)22 b(option)f(list\))f(that)h +(allo)n(ws)f(to)f(control)j(the)e(a)n(v)n(ailable)i(options.)29 +b(It)20 b(should)h(be)f(noted)h(that)f(the)g(number)h(of)e(options)0 +5090 y(is)24 b(\002x)o(ed)f(for)i(a)e(gi)n(v)o(en)i(handle.)31 +b(Ho)n(we)n(v)o(er)l(,)24 b(as)g(options)i(are)e(set,)g(other)h +(options)h(may)e(become)g(acti)n(v)o(e)h(or)f(inacti)n(v)o(e.)31 +b(Thus,)1905 5381 y(37)p eop +%%Page: 38 39 +38 38 bop 536 2582 a @beginspecial 0 @llx 0 @lly 601 +@urx 542 @ury 3060 @rhi @setspecial +%%BeginDocument: figs/flow.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: flow.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Tue Dec 3 22:09:10 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 601 542 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-161.0 577.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr +% Polyline +n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr +% Polyline +n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr +% Polyline +n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 6600 m +gs 1 -1 sc (image acquisition) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 3825 m +gs 1 -1 sc (device setup) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 7515 m +gs 1 -1 sc (- go back to) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5775 7515 m +gs 1 -1 sc (sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +7275 7515 m +gs 1 -1 sc (if more frames desired) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 3300 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 5100 m +gs 1 -1 sc (- sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 4500 m +gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 4080 m +gs 1 -1 sc (sane_control_option\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 3600 m +gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 5700 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 6900 m +gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6000 m +gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6450 m +gs 1 -1 sc (sane_read\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 8100 m +gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 1200 m +gs 1 -1 sc (- sane_init\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 9300 m +gs 1 -1 sc (- sane_exit\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +3600 1800 m +gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 2700 m +gs 1 -1 sc (- sane_open\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 8700 m +gs 1 -1 sc (- sane_close\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4800 2175 m +gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23 +b(\003o)n(w)0 3152 y(after)35 b(setting)i(an)e(option,)j(it)d(may)f(be) +h(necessary)i(to)e(re-read)h(some)f(or)g(all)g(option)h(descriptors.)66 +b(While)35 b(setting)h(up)0 3265 y(the)28 b(de)n(vice,)h(it)e(is)g +(also)h(admissible)h(to)e(call)h Fp(sane)p 1655 3265 +28 4 v 31 w(get)p 1851 3265 V 31 w(parameters\(\))21 +b Fq(to)28 b(get)f(an)g(estimate)i(of)e(what)g(the)h(image)0 +3378 y(parameters)e(will)d(look)h(lik)o(e)g(once)h(image)f(acquisition) +i(be)o(gins.)0 3549 y(The)36 b(de)n(vice)h(handle)h(can)e(be)g(put)h +(in)f(blocking)i(or)e(non-blocking)k(mode)c(by)h(a)e(call)i(to)f +Fp(sane)p 3186 3549 V 31 w(set)p 3382 3549 V 31 w(io)p +3523 3549 V 32 w(mode\(\))p Fq(.)0 3661 y(De)n(vices)30 +b(are)f(required)i(to)e(support)i(blocking)g(mode)e(\(which)h(is)e(the) +i(def)o(ault)g(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0 +3774 y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems) +d(such)h(as)e(UNIX.)0 3945 y(After)g(the)g(de)n(vice)g(is)g(setup)h +(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f +(a)f(call)h(to)g Fp(sane)p 3077 3945 V 30 w(start\(\))p +Fq(.)i(The)d(back-)0 4058 y(end)33 b(calculates)h(the)f(e)o(xact)f +(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g +(to)f Fp(sane)p 3023 4058 V 31 w(get)p 3219 4058 V 31 +w(parameters\(\))0 4171 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n +(alues,)k(rather)c(than)h(estimates.)60 b(Whether)35 +b(the)f(physical)i(image)e(acquisition)i(starts)f(at)f(this)0 +4284 y(point)41 b(or)e(during)i(the)e(\002rst)h(call)f(to)h +Fp(sane)p 1450 4284 V 31 w(read\(\))35 b Fq(is)40 b(unspeci\002ed)h(by) +f(the)g(SANE)c(API.)i(If)h(non-blocking)44 b(I/O)0 4396 +y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e(desired,)j(the) +d(frontend)i(may)e(attempt)h(to)f(call)h Fp(sane)p 2949 +4396 V 31 w(set)p 3145 4396 V 31 w(io)p 3286 4396 V 32 +w(mode\(\))c Fq(and/or)0 4509 y Fp(sane)p 225 4509 V +31 w(get)p 421 4509 V 31 w(select)p 782 4509 V 30 w(fd\(\))c +Fq(at)i(this)h(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d +(f)o(ail)h(if)f(the)h(back)o(end)h(does)g(not)e(support)0 +4622 y(the)h(requested)i(operation.)0 4642 y + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 4642 a +0 4642 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 4642 a 151 x Fq(Image)k(data)h(is)f(collected)i(by)e +(repeatedly)j(calling)f Fp(sane)p 1914 4793 28 4 v 30 +w(read\(\))27 b Fq(until)k(this)f(function)i(will)e(return)h(an)f +(end-of-\002le)0 4906 y(status)40 b(\()p Fp(SANE)p 500 +4906 V 31 w(STATUS)p 861 4906 V 30 w(EOF)p Fq(\).)c(This)i(indicates)j +(the)e(end)g(of)f(the)h(current)h(frame.)74 b(If)38 b(the)g(frontend)j +(e)o(xpects)f(ad-)0 5019 y(ditional)e(frames)f(\(e.g.,)h(the)e(indi)n +(vidual)j(channels)f(of)e(a)g(red/green/blue)k(image)d(or)e(multiple)j +(images\),)i(it)35 b(can)i(call)0 5132 y Fp(sane)p 225 +5132 V 31 w(start\(\))20 b Fq(again.)31 b(If)24 b(the)h +Fp(SANE)p 1349 5132 V 31 w(PFLAG)p 1655 5132 V 30 w(LAST)p +1905 5132 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g Fp(flags)p +Fq(,)d(the)k(current)h(image)e(is)g(com-)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 0 5151 +a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(38)p +eop +%%Page: 39 40 +39 39 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 32 a 91 x Fq(plete.)60 +b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38 +b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 123 +28 4 v 31 w(PFLAG)p 2715 123 V 31 w(MORE)p 2966 123 V +31 w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 236 y(further)e(calls)e +(to)g Fp(sane)p 794 236 V 31 w(start\(\))c Fq(can)30 +b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30 +b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 349 y(be)f(set)g(at)f +(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g +(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d +(no)0 462 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.) +34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set) +f(this)h(bit,)g(and)g(then)g(later)0 574 y(at)33 b(the)g(actual)h(call) +f(to)f Fp(sane)p 980 574 V 31 w(start\(\))d Fq(return)34 +b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 574 V 31 w(STATUS)p +2749 574 V 30 w(NO)p 2889 574 V 31 w(DOCS)p Fq(.)c(Such)j(a)f(sequence) +j(is)0 687 y(permitted)27 b(to)f(transmit)h(multiple)g(images)g(from)e +(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j(pages.)36 +b(This)26 b(beha)n(viour)j(should)0 800 y(be)21 b(controlled)i(by)e +(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n(w)h(single-page)i +(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 913 +y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g(all)d +(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p 2933 913 +V 31 w(PFLAG)p 3239 913 V 31 w(LAST)p 3490 913 V 30 w(FRAME)e +Fq(on)0 1026 y(and)29 b Fp(SANE)p 384 1026 V 31 w(PFLAG)p +690 1026 V 31 w(MORE)p 941 1026 V 31 w(IMAGES)c Fq(of)n(f)k(is)f +(encountered,)34 b(or)28 b(an)h(error)h(other)g(than)f +Fp(SANE)p 3085 1026 V 31 w(STATUS)p 3446 1026 V 30 w(EOF)e +Fq(occurs)0 1139 y(in)21 b(a)g(SANE)e(function.)30 b(Note)21 +b(that)h Fp(SANE)p 1342 1139 V 31 w(STATUS)p 1703 1139 +V 30 w(NO)p 1843 1139 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w) +o(ay)f(for)h(the)f(back)o(end)j(to)d(indicate)0 1252 +y(the)j(end)g(of)f(a)g(multiple)i(image)f(scan.)0 1422 +y(A)c(frontend)k(may)d(choose)i(to)e(skip)i(frames)f(\(e.g.)28 +b(because)23 b(it)e(cannot)i(parse)g(them\),)e(which)h(is)f +(accomplished)k(by)c(simply)0 1535 y(calling)30 b Fp(sane)p +500 1535 V 31 w(start)25 b Fq(again,)30 b(which)f(will)f(get)h(you)g +(to)f(the)h(ne)o(xt)f(frame,)i(without)f(ha)n(ving)i(to)d(read)h(and)g +(discard)h(the)0 1648 y(current)25 b(one.)0 1817 y(In)d(order)h(to)f +(prematurely)i(stop)f(scanning)h(and)f(to)e(reset)i(the)f(back)o(end)j +(state,)d Fp(sane)p 2707 1817 V 31 w(cancel\(\))c Fq(can)k(be)g(called) +h(at)f(an)o(y)0 1930 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d +(well)h(after)g(normal)g(termination)i(of)e(a)f(multiple)h(image)g +(scan)h(as)e(described)j(abo)o(v)o(e.)0 2100 y(When)33 +b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e +(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 2100 V +31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0 +2213 y(e)o(xiting)e(the)f(application,)37 b(function)d +Fp(sane)p 1443 2213 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55 +b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0 +2326 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d +(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0 +2496 y(The)e(follo)n(wing)i(C)d(sample)j(code)f(implements)h(a)e +(reference)j(loop)e(for)g(acquiring)i(multiple)f(images:)0 +2760 y Fp(SANE_Parameters)48 b(parms;)0 2873 y(SANE_Status)268 +b(status;)0 3099 y(do)0 3212 y({)109 3325 y(do)109 3438 +y({)218 3551 y(/*)54 b(Now)f(start)f(acquiring)f(the)i(next)g(frame.)e +(*/)218 3664 y(status=sane_sta)o(rt)o(\(ha)o(nd)o(le)o(\);)218 +3890 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h(problem,)d(and)i(no)h +(more)e(frames)g(can)h(be)273 4002 y(*)h(read)f(at)g(this)g(time.)f +(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S)49 b(still)273 +4115 y(*)54 b(being)e(clear,)g(this)h(will)f(break)h(out)g(of)g(_BOTH_) +f(loops.)273 4228 y(*/)218 4341 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o +(OD\))48 b(break;)218 4567 y(/*)54 b(Now)f(let)g(us)h(see)f(what)g(the) +g(next)g(frame)f(brings.)f(*/)218 4680 y(status=sane_get)o(_p)o(ara)o +(me)o(te)o(rs)o(\(h)o(and)o(le)o(,&)o(pa)o(rm)o(s\);)218 +4906 y(/*)j(This)f(actually)d(should)i(not)h(fail,)g(but)g(maybe)f(the) +h(doc)h(feeder)273 5019 y(*)g(jammed)e(or)h(something,)d(so)k(we)g +(break)e(as)h(well,)g(if)g(something)273 5132 y(*)h(is)f(wrong.)0 +5146 y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 0 5146 a 0 5146 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 0 5146 a 0 5146 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 0 5146 a 1905 +5381 a Fq(39)p eop +%%Page: 40 41 +40 40 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 32 a 273 123 a Fp(*/)218 +236 y(if)54 b(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48 +b(break;)218 462 y(/*)54 b(Now)f(we)h(check)e(the)h(announced)e +(parameters,)e(if)54 b(we)f(can)h(make)e(use)273 574 +y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g +(the)g(next)g(frame.)273 687 y(*/)218 800 y(if)h(\()g(do_i_like_that\() +o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;)218 +1026 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle)g +(filenames,)273 1139 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e +(files,)i(ask)h(user)273 1252 y(*)h(for)f(confirmation,)c(...)273 +1365 y(*/)218 1478 y(setup_for_trans)o(fe)o(r\(.)o(..)o(\);)218 +1704 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f(frame)f(data)h(and)g +(process)f(it.)h(This)g(should)273 1817 y(*)h(return)e(SANE_STATUS_GO)o +(OD)o(,)c(until)53 b(the)g(frame)f(is)i(complete,)273 +1929 y(*)g(what)f(causes)e(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273 +2042 y(*/)218 2155 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54 +b(\()g(status=sane_rea)o(d\()o(..)o(.\))48 b(\))54 b(\))545 +2268 y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red) +o(\(\))o(;)218 2494 y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f +(anything)e(but)i(EOF,)g(break)f(out.)h(*/)218 2607 y(if)h(\(status)d +(!=)j(SANE_STATUS_EO)o(F\))48 b({)436 2720 y(break;)218 +2833 y(})218 3059 y(/*)54 b(Now)f(loop)g(until)f(we)i(have)e(all)i +(frames)d(of)j(an)g(image.)d(*/)109 3171 y(})j(while\(!\(parms.f)o(la)o +(g)49 b(&)54 b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0 +3397 y(/*)g(O.K.)e(-)i(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h +(it)h(together,)c(save)j(it,)55 3510 y(*)h(flush)e(buffers,)f(transmit) +g(it,)i(increment)d(filenames,)g(etc.)55 3623 y(*/)0 +3849 y(/*)k(Now)f(check)f(for)h(more)g(pending)e(images.)h(If)h(we)h +(have)f(more,)f(redo)h(from)f(start.)55 3962 y(*)i(Some)e(backends)f +(might)i(cheat)f(here)h(and)g(send)f(us)i(for)f(an)h(extra)e(round)g +(which)55 4075 y(*)i(will)e(fail)h(at)h(sane_start,)49 +b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c(if)k(they)55 +4188 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start)f(of)i(the)f +(last)g(frame)f(we)i(read.)55 4301 y(*/)0 4413 y(})g(while\(parms.fla)o +(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S\);)0 +4639 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j +(go)f(back)g(to)h(option-control)55 4752 y(*)g(loop.)55 +4865 y(*/)0 5091 y(sane_cancel\(han)o(dl)o(e\))o(;)0 +5102 y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 0 5102 a 0 5102 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 0 5102 a 0 5102 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 0 5102 a 1905 +5381 a Fq(40)p eop +%%Page: 41 42 +41 41 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 32 a 0 32 a + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 0 32 a 0 +32 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 0 32 a 0 32 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 0 32 a 91 x Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31 +b(Options)0 369 y Fq(While)g(most)h(back)o(end)h(options)g(are)e +(completely)i(self-describing,)k(there)32 b(are)g(cases)g(where)f(a)g +(user)g(interf)o(ace)j(might)0 482 y(w)o(ant)24 b(to)g(special-case)k +(the)c(handling)j(of)d(certain)i(options.)32 b(F)o(or)24 +b(e)o(xample,)h(the)f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g +(four)0 595 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e +(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33 +b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 708 y(w)o(ould)25 +b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g +(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will) +d(w)o(ant)h(to)0 821 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g +(\(lo)n(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h +(or)d(a)h(high\(er\))h(resolution)i(scan)d(of)0 934 y(a)h(subpart)i(of) +e(the)g(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f +(scan)h(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0 +1047 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g +(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n +(v)o(e)h(well-de\002ned)0 1160 y(meanings.)0 1440 y Fm(4.5.1)99 +b(Option)25 b(Number)h(Count)0 1654 y Fq(Option)e(number)h(0)e(has)h +(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g +(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 1654 +28 4 v 30 w(TYPE)p 3556 1654 V 31 w(INT)d Fq(and)0 1767 +y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n +(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g +(includes)i(option)e(number)h(0\).)0 1880 y(This)23 b(means)h(that)f +(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f +(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o +(ycle)0 1993 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h +(until)h Fp(sane)p 1963 1993 V 31 w(get)p 2159 1993 V +31 w(option)p 2520 1993 V 30 w(descriptor\(\))17 b Fq(returns)25 +b Fp(NULL)p Fq(,)c(or)j(a)0 2105 y(frontend)i(can)e(directly)h(read)f +(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 2386 +y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 2468 +y + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 2468 a 0 2468 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 2468 a 132 x Fq(Option)33 b Fp(resolution)28 +b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j(at)c(which)i(an)e +(image)h(should)i(be)d(acquired.)59 b(When)33 b(the)0 +2713 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g(dif)n(ferent)j(v)n +(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h(to)f(de\002ne)h +(the)g(options)h Fp(x)p 3327 2713 28 4 v 33 w(resolution)0 +2825 y Fq(and)40 b Fp(y)p 230 2825 V 33 w(resolution)p +Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i Fp(resolution)34 +b Fr(or)40 b Fq(the)g(options)i Fp(x)p 3142 2825 V 32 +w(resolution)34 b Fr(and)0 2938 y Fp(y)p 60 2938 V 32 +w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0 3091 +y(The)k(type)h(of)g(this)g(option)h(is)e(either)i Fp(SANE)p +1417 3091 V 31 w(TYPE)p 1668 3091 V 31 w(INT)c Fq(or)j +Fp(SANE)p 2212 3091 V 31 w(TYPE)p 2463 3091 V 31 w(FIXED)p +Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460 3091 V 30 w(UNIT)p +3710 3091 V 31 w(DPI)0 3204 y Fq(\(dots/inch\).)0 3356 +y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g +(back)o(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h +(a)e(manner)i(consistent)0 3469 y(with)c(the)h(abo)o(v)o(e)g +(de\002nition.)955 3469 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 955 3469 a 955 3469 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 955 3469 +a 955 3469 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 955 3469 a 0 3749 a Fm(4.5.3)99 b(Pr)n(e)o(view)25 +b(Mode)g(Option)0 3963 y Fq(The)g(boolean)j(option)f +Fp(preview)22 b Fq(is)j(used)i(by)f(a)f(frontend)j(to)e(inform)g(the)g +(back)o(end)i(when)e(image)g(acquisition)j(should)0 4076 +y(be)e(optimized)i(for)e(speed,)i(rather)g(than)e(quality)i(\(\223pre)n +(vie)n(w)f(mode\224\).)41 b(When)27 b(set)g(to)g Fp(SANE)p +3003 4076 28 4 v 31 w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 +4189 y(in)e(ef)n(fect,)g(when)g(set)g(to)g Fp(SANE)p +1012 4189 V 31 w(FALSE)d Fq(image)j(acquisition)j(should)f(proceed)f +(in)f(normal)h(quality)g(mode.)33 b(The)25 b(setting)0 +4302 y(of)c(this)h(option)h Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e +(other)i(option.)29 b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h +(options)g(are)f(concerned,)i(the)e(pre)n(vie)n(w)0 4415 +y(mode)i(is)g(completely)i(side)e(ef)n(fect)h(free.)30 +b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g(frontend)i(will)e +(tak)o(e)g(care)h(of)e(appropriately)0 4528 y(setting)i(the)e(scan)h +(resolution)i(for)d(pre)n(vie)n(w)h(mode)f(\(through)j(option)e +Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e(free)h(to)f(o)o(v)o +(erride)0 4640 y(the)j Fp(resolution)21 b Fq(v)n(alue)27 +b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h(mode,)f(b)n(ut)g +(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)g(to)f(the)0 +4753 y(frontend)35 b(where)n(v)o(er)e(possible.)1081 +4674 y + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 1081 4674 a 1081 4674 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 1081 4674 a 79 x Fq(When)f(the)h +Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f +(transfer)g(the)f(image)f(in)0 4866 y(frame)24 b(type)g +Fp(SANE)p 639 4866 28 4 v 31 w(FRAME)p 945 4866 V 30 +w(RAW)e Fq(if)h(possible.)1584 4866 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 1584 4866 a 1584 +4866 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 1584 4866 a 1584 4866 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 1584 4866 a 0 5019 a Fq(This)j(option)i +(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 5132 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)1905 +5381 y(41)p eop +%%Page: 42 43 +42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221 +@urx 205 @ury 1836 @rhi @setspecial +%%BeginDocument: figs/area.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: area.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Wed Dec 4 19:19:37 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 221 205 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-59.0 231.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% Polyline +n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr +/Helvetica findfont 180.00 scalefont setfont +2550 2302 m +gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +7.500 slw +% Polyline +n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr +n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr +n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3375 3150 m +gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1500 m +gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2700 1050 m +gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1050 3600 m +gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +4425 525 m +gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1080 585 m +gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 1725 1650 m 1725 1800 l gs col-1 s gr +% Polyline +n 1650 1725 m 1800 1725 l gs col-1 s gr +% Polyline +n 3375 2700 m 3375 2850 l gs col-1 s gr +% Polyline +n 3300 2775 m 3450 2775 l gs col-1 s gr +15.000 slw +% Polyline +n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23 +b(area)h(options)0 2124 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 +2351 y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g +(are)f(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29 +b(The)22 b(scan)i(area)f(is)f(de\002ned)0 2464 y(by)h(tw)o(o)f(points)j +(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e +(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0 +2577 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e +(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e +(the)h(scan)g(surf)o(ace)h(as)0 2690 y(seen)25 b(by)g(the)g(sensor)h +(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i +(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 +b(this)h(reason,)0 2803 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i +(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f +(simultaneously)k(the)c Fl(smallest)0 2916 y Fq(and)f(the)f +(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h +(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0 +3029 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f +(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g +(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0 +3141 y(necessary)i(con)l(v)o(ersions.)0 3307 y(The)d(names)h(of)g(the)f +(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o +(en)g(in)f(the)h(table)h(belo)n(w:)1200 3529 y Fr(Name)100 +b(Description)1200 3642 y Fp(tl-x)107 b Fq(T)-7 b(op-left)24 +b Fh(x)f Fq(coordinate)j(v)n(alue)1200 3755 y Fp(tl-y)107 +b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n(alue)1200 +3868 y Fp(br-x)107 b Fq(Bottom-right)25 b Fh(x)e Fq(coordinate)j(v)n +(alue)1200 3981 y Fp(br-y)107 b Fq(Bottom-right)25 b +Fh(y)h Fq(coordinate)g(v)n(alue)0 4200 y(There)e(are)f(se)n(v)o(eral)i +(rules)f(that)h(should)g(be)e(follo)n(wed)i(by)f(front)g(and)g(back)o +(ends)i(re)o(garding)f(these)g(options:)136 4428 y Fk(\017)46 +b Fq(Back)o(ends)25 b(must)f(attach)h(a)e(unit)h(of)f(either)i(pix)o +(els)g(\()p Fp(SANE)p 2091 4428 28 4 v 31 w(UNIT)p 2342 +4428 V 31 w(PIXEL)p Fq(\))20 b(or)k(millimeters)h(\()p +Fp(SANE)p 3484 4428 V 31 w(UNIT)p 3735 4428 V 31 w(MM)p +Fq(\))227 4541 y(to)f(these)g(options.)31 b(The)23 b(unit)h(of)g(all)f +(four)h(options)i(must)d(be)h(identical.)136 4723 y Fk(\017)46 +b Fq(Whene)n(v)o(er)25 b(meaningful,)g(a)f(back)o(end)h(should)g +(attach)g(a)e(range)i(or)e(a)h(w)o(ord-list)h(constraint)h(to)d(these)i +(options.)136 4906 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine) +i(the)f(size)g(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j +(that)d(the)h(options)h(ha)n(v)o(e)f(range)227 5019 y(constraints)i +(associated.)51 b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i +(e)o(xist,)f(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 +5132 y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g +(y)f(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h +(surf)o(ace)g(size.)1905 5381 y(42)p eop +%%Page: 43 44 +43 43 bop 136 123 a Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o(ork)g +(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i(missing.) +0 143 y + -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch +pop /CBarY65 exch def + 0 143 a 0 143 a + 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint +exch pop /CBarY66 exch def + 0 143 a 136 310 a Fk(\017)46 +b Fq(A)21 b(frontend)i(may)f(temporarily)i(set)d(the)h(v)n(alues)h(in)e +(a)g(w)o(ay)h(that)g Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f +Fp(br-x)d Fq(and)j Fp(tl-y)d Fq(is)j(lar)n(ger)227 423 +y(than)j Fp(br-y)p Fq(.)676 423 y + -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch +pop /CBarY67 exch def + 676 423 a 676 423 a + 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint +exch pop /CBarY68 exch def + +676 423 a 676 423 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore + 676 423 a 0 731 a Fm(4.5.5)99 b(Depth)26 +b(option)0 813 y + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 813 a 0 813 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 813 a 151 x Fq(Option)20 +b Fp(depth)c Fq(is)j(used)h(to)f(select)h(the)g(image)f(depth)h(in)g +(bits/sample)h(in)e(multi)g(bit)h(mode)f(-)g(\(this)h(means)f(for)h(24) +f(bit)g(RGB)0 1077 y(mode)j(this)h(v)n(alue)g(must)f(be)g(8\).)28 +b(The)22 b(type)h(of)f(this)g(option)i(is)e Fp(SANE)p +2174 1077 28 4 v 31 w(TYPE)p 2425 1077 V 31 w(INT)p Fq(.)d(The)j(unit)h +(is)f Fp(SANE)p 3291 1077 V 31 w(UNIT)p 3542 1077 V 30 +w(BIT)p Fq(.)e(F)o(or)0 1190 y(1)30 b(bit)h(modes)g(\(Lineart)h(or)e +(Halftone\))i(this)f(option)h(has)f(to)g(be)f(inacti)n(v)o(e.)52 +b(F)o(or)29 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0 +1303 y(Halftone\))25 b(the)f(back)o(end)i(should)f(use)f(the)g +(well-kno)n(wn)g(option)h Fp(mode)p Fq(.)0 1588 y(This)h(option)i(is)e +(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 1700 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 +1813 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 1813 a 0 1813 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 1813 a 0 1813 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 1813 a 308 +x Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 2203 y + -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch +pop /CBarY73 exch def + 0 +2203 a 0 2203 a + 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint +exch pop /CBarY74 exch def + 0 2203 a 151 x Fq(The)30 b Fp(gamma-table)24 +b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 2354 +28 4 v 31 w(CONSTRAINT)p 2225 2354 V 29 w(RANGE)d Fq(of)j(the)h(type)g +Fp(SANE)p 3208 2354 V 31 w(TYPE)p 3459 2354 V 31 w(INT)d +Fq(which)0 2467 y(represents)22 b(the)d(gamma)g(correction)j(table)e +(for)g(gray)-6 b(.)28 b(In)19 b(color)h(mode)g(the)f +Fp(gamma-table)14 b Fq(may)19 b(be)g(used)h(to)f(set)g(a)g(com-)0 +2580 y(mon)f(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28 +b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12 +b Fp(green-gamma-tab)o(le)0 2693 y Fq(and)32 b Fp(blue-gamma-table)24 +b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g +(correction)k(for)d(each)h(color)g(separately)-6 b(.)0 +2806 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h +(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f +Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 2919 y Fp(blue-gamma-tabl)o(e)19 +b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options) +h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0 +3032 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f +(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h +(reduce)g(\(if)0 3145 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g +(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45 +b(This)29 b(should)h(e.g.)44 b(look)0 3258 y(lik)o(e)24 +b(this:)0 3504 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o +(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 3617 y(green_value)c(=)k +(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\)) +o(\))0 3730 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o +(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 3976 y Fq(The)24 +b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e +(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h +(shado)n(w)-6 b(,)0 4089 y(contrast,)24 b(brightness,)i(threshold,)f +(analog)p 1379 4089 V 35 w(gamma.)j(These)22 b(functions)j(are)e +(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0 +4202 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0 +4486 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 4599 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4712 y + -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch +pop /CBarY75 exch def + 0 +4712 a 0 4712 a + 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint +exch pop /CBarY76 exch def + 0 4712 a 0 4712 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore + 0 4712 a 1905 5381 +a Fq(43)p eop +%%Page: 44 45 +44 44 bop 0 123 a Fm(4.5.7)99 b(Scan)26 b(Mode)f(options)0 +204 y + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 204 a 0 204 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 204 a 152 x Fq(The)d(option)i +Fp(mode)19 b Fq(de\002nes)k(a)f Fp(SANE)p 1222 356 28 +4 v 31 w(CONSTRAINT)p 1803 356 V 28 w(STRING)p 2161 356 +V 30 w(LIST)e Fq(of)i(type)h Fp(SANE)p 2926 356 V 31 +w(TYPE)p 3177 356 V 31 w(STRING)p Fq(.)18 b(It)k(is)g(used)0 +469 y(to)34 b(select)i(the)e(scanmode)i(\(e.g.)61 b(Color)34 +b(or)g(Gray\).)61 b(W)-7 b(ell)34 b(kno)n(wn)h(modes)g(are:)50 +b Fp(Color)p Fq(,)34 b Fp(Gray)p Fq(,)g Fp(Halftone)c +Fq(and)0 582 y Fp(Lineart)p Fq(.)46 b Fp(Color)27 b Fq(and)k +Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g(or)f(16)h +(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 b Fp(Lineart)c +Fq(are)0 695 y(single)e(bit)f(modes.)0 807 y(This)f(w)o(ay)h(a)f +(frontend)i(can)f(select)h(e.g)e(the)h(mode)g Fp(Gray)d +Fq(for)j(scanning)h(a)f(f)o(ax.)0 1092 y(This)i(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +1205 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1318 +y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 1318 a 0 1318 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 1318 a 0 1318 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 1318 a 308 x +Fm(4.5.8)99 b(Scan)26 b(Sour)n(ce)g(options)0 1707 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + +0 1707 a 0 1707 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 1707 a 152 x Fq(The)35 b(option)h +Fp(source)c Fq(is)j(used)h(to)f(select)h(the)g(scan)f(source)i(\(e.g.) +63 b(Automatic)37 b(Document)f(Feeder\).)64 b(It)35 b(de\002nes)h(a)0 +1972 y Fp(SANE)p 225 1972 28 4 v 31 w(CONSTRAINT)p 806 +1972 V 28 w(STRING)p 1164 1972 V 30 w(LIST)20 b Fq(of)j(type)g +Fp(SANE)p 1930 1972 V 31 w(TYPE)p 2181 1972 V 31 w(STRING)p +Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b +Fp(Flatbed)p Fq(,)0 2085 y Fp(Transparancy)49 b(Adapter)20 +b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0 +2369 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2482 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2595 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 0 +2595 a 0 2595 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 0 2595 a 0 2595 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 0 2595 a 308 x Fm(4.5.9)99 +b(Thr)n(eshold)0 2966 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 2966 a 0 2966 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 2966 a 170 +x Fq(The)31 b(option)i Fp(threshold)27 b Fq(is)k(used)i(to)e(de\002ne)h +(the)g(threshold)i(for)d(Lineart)i(and)f(maybe)g(Halftone)h(mode.)53 +b(In)31 b(multi)0 3249 y(bit)36 b(modes)g(this)g(option)i(should)f(be)f +(set)g(inacti)n(v)o(e.)67 b(The)35 b(type)h(of)g(this)g(option)i(is)d +Fp(SANE)p 2975 3249 28 4 v 31 w(TYPE)p 3226 3249 V 31 +w(FIXED)p Fq(.)d(The)k(unit)0 3362 y(is)g Fp(SANE)p 321 +3362 V 31 w(UNIT)p 572 3362 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i +(range)g(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68 +b(It)36 b(de\002nes)g(the)g(minimum)0 3474 y(intensity)27 +b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data) +h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v) +n(alues)i(in)e(the)0 3587 y(follo)n(wing)h(w)o(ay:)0 +3700 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white) +g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40 +b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 3813 y(intensities)e(brighter)g +(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e +(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0 +3926 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29 +b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f +(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0 +4039 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14 +b(.)g(.)g(70)23 b(percent\).)0 4211 y(This)j(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +4324 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4436 +y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 4436 a 0 4436 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 4436 a 0 4436 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 4436 a 308 x +Fm(4.5.10)99 b(Analog)24 b(gamma)0 4826 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 4826 a 0 +4826 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 4826 a 151 x Fq(The)37 b(option)i Fp(analog-gamma)31 +b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h +(analog)h(gamma)e(function)i(of)f(the)0 5090 y(scanner)33 +b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g +(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31 +b(type)h(of)f(this)h(option)g(is)0 5110 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 5110 a 0 +5110 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 5110 a 0 5110 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 5110 a 1905 5381 a Fq(44)p +eop +%%Page: 45 46 +45 45 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 32 a 91 x Fp(SANE)p +225 123 28 4 v 31 w(TYPE)p 476 123 V 31 w(FIXED)p Fq(.)27 +b(The)k(unit)g(is)g Fp(SANE)p 1486 123 V 30 w(UNIT)p +1736 123 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g +(de\002ned)g(by)g(the)g(back)o(end)i(as)0 236 y(supported.)38 +b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37 +b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f +(correction)k(has)d(no)0 349 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n +(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29 +b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0 +462 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g +Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n +(wed)g(to)g(em-)0 574 y(ulate)29 b(an)e(analog)i(gamma)e(function)j(by) +e(a)f(digital)i(gamma)e(table.)42 b(The)27 b(back)o(end)j(has)e(to)f +(disable)j(\(or)d(not)h(de\002ne\))h(this)0 687 y(option)c(when)f(the)g +(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(gamma)d(function.)0 848 y(When)37 b(analog)i(gamma,)h(highlight)f(and) +f(shado)n(w)f(functions)j(are)d(a)n(v)n(ailable)j(at)d(the)g(same)g +(time)g(then)h(the)f(back)o(end)0 961 y(author)32 b(has)g(to)e(care)i +(about)g(the)f(order)h(in)e(which)i(the)f(functions)i(are)e +(implemented)i(in)e(the)g(scanner)i(hardw)o(are.)52 b(The)0 +1074 y(SANE)26 b(standard)31 b(e)o(xpects)f(that)f(changing)i(the)e +(analog)h(gamma)e(v)n(alue)i(has)f(no)f(ef)n(fect)i(on)e(the)h(shado)n +(w)h(and)f(highlight)0 1187 y(function.)59 b(When)33 +b(the)g(analog)i(gamma)d(function)j(is)e(e)o(x)o(ecuted)i(in)d(the)i +(scanner)g(hardw)o(are)h(before)f(the)f(shado)n(w)h(and)0 +1299 y(highlight)d(functions)g(then)e(the)g(back)o(end)i(should)f(do)e +(a)g(compensation.)47 b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g +(highlight)i(v)n(alues)0 1412 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g +(corrected)j(with)d(the)h(rele)n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 +1573 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1686 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1799 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 +1799 a 0 1799 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 1799 a 0 1799 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 1799 a 291 x Fm(4.5.11)99 +b(Shado)o(w)0 2154 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 2154 a 0 2154 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 2154 a 158 x +Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g(de\002ne)g(the) +g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v)o(el.)69 +b(The)36 b(type)i(of)f(this)g(option)h(is)0 2425 y Fp(SANE)p +225 2425 28 4 v 31 w(TYPE)p 476 2425 V 31 w(FIXED)p Fq(.)26 +b(The)k(unit)g(is)g Fp(SANE)p 1482 2425 V 30 w(UNIT)p +1732 2425 V 31 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g(should)g(be) +f(0.0.)14 b(.)g(.)g(100.0)29 b(if)g(pos-)0 2538 y(sible.)47 +b(It)29 b(is)h(used)g(to)f(de\002ne)h(the)g(maximum)f(intensity)j(le)n +(v)o(el)e(that)g(creates)h(an)e(image)h(data)g(v)n(alue)g(of)g(0)f +(\(black\).)48 b(The)0 2651 y(back)o(end)26 b(has)e(to)f(scale)i(the)e +(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0 2764 +y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h(that)g(the)f(sensiti)n(vity)k +(range)d(is)f(not)h(reduced,)k(only)c(the)f(minimum)h(intensity)h +(produces)h(an)0 2877 y(image)30 b(data)g(v)n(alue)h(of)e(0)h +(\(black\).)48 b(A)29 b(v)n(alue)h(of)g(50.0)g(means)g(that)g(that)g(a) +f(medium)h(intensity)i(and)e(e)n(v)o(erything)i(that)e(is)0 +2990 y(dark)o(er)e(produces)h(an)e(image)g(data)h(v)n(alue)f(of)g(0)f +(\(black\).)41 b(A)25 b(v)n(alue)j(of)e(100.0)i(means)f(the)g(sensiti)n +(vity)j(range)e(is)e(reduced)0 3103 y(to)i(0,)g(all)g(image)g(data)g(v) +n(alues)h(are)f(0)g(\(black\).)43 b(If)28 b(the)g(scanner)h(is)f(not)g +(able)h(to)e(co)o(v)o(er)h(the)h(full)f(range)h(the)f(back)o(end)i(has) +0 3215 y(to)25 b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35 +b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e +(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0 +3328 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p +Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31 +b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0 +3441 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g +(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g +(disable)i(\(or)e(not)h(de\002ne\))0 3554 y(this)24 b(option)h(when)f +(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(shado)n(w)e(function.)0 3715 y(This)i(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3827 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3940 +y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 3940 a 0 3940 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 3940 a 0 3940 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 3940 a 292 x +Fm(4.5.12)99 b(Highlight)0 4314 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 4314 a 0 4314 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 +4314 a 140 x Fq(The)26 b(option)i Fp(highlight)21 b Fq(is)26 +b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f(white)g +(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g(is)0 +4567 y Fp(SANE)p 225 4567 28 4 v 31 w(TYPE)p 476 4567 +V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p +1461 4567 V 31 w(UNIT)p 1712 4567 V 31 w(PERCENT)p Fq(.)d(The)j(v)n +(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 +b(if)h(possi-)0 4680 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h +(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e +(maximum)h(possible)h(image)f(data)g(v)n(alue)0 4793 +y(\(white/full)c(intensity\).)31 b(The)23 b(back)o(end)j(has)e(to)f +(scale)i(the)e(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0 +4906 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h(sensiti)n(vity)i(range)e +(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h(ha)n(v)o(e)g(maximum)f +(v)n(alue)h(\(white)f(/)g(full)0 5019 y(intensity\).)31 +b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a)f(medium)h(intensity)i +(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j(produces)f(the)f(max-) +0 5132 y(imum)f(possible)j(image)e(data)g(v)n(alue)h(\(white)f(/)f +(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e(100.0)i(means)f(that)g +(the)g(sensiti)n(vity)j(range)d(is)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 5151 a +0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(45)p +eop +%%Page: 46 47 +46 46 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 32 a 91 x Fq(not)21 +b(reduced,)j(only)d(the)h(maximum)f(intensity)i(produces)h(an)d(image)g +(data)h(with)f(maximum)g(possible)i(v)n(alue)f(\(white)f(/)g(full)0 +236 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h(able)g(to)f +(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has)f(to)f +(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 349 y(\(e.g.)35 +b(30.)14 b(.)g(.)g(70)25 b(percent\).)38 b(In)25 b(color)i(mode)f +(there)h(can)f(be)g(options)h Fp(highlight-red)p Fq(,)20 +b Fp(highlight-gree)o(n)f Fq(and)0 462 y Fp(highlight-blue)p +Fq(,)g(in)26 b(this)h(case)g Fp(highlight)21 b Fq(has)26 +b(to)g(be)g(disabled.)39 b(It)26 b(is)g(not)g(allo)n(wed)h(to)f +(emulate)h(a)f(highlight)0 574 y(function)h(by)f(a)f(digital)i(gamma)d +(table.)35 b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h +(de\002ne\))g(this)g(option)g(when)g(the)f(scanner)0 +687 y(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h(highlight) +g(function.)0 859 y(This)g(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +972 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1085 +y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 1085 a 0 1085 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 1085 a 0 1085 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 1085 a 308 x +Fm(4.5.13)99 b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0 +1474 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 1474 a 0 1474 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 1474 a 152 x Fq(The)18 b(option)h +Fp(lamp-on)14 b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h +(scanner)h(on.)27 b(The)17 b(type)i(of)f(this)h(option)g(is)f +Fp(SANE)p 3431 1626 28 4 v 31 w(TYPE)p 3682 1626 V 31 +w(BUTTON)p Fq(.)0 1739 y(The)23 b(unit)h(is)g Fp(SANE)p +637 1739 V 31 w(UNIT)p 888 1739 V 30 w(NONE)p Fq(.)d(When)j(the)g +(option)h(is)e(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f +(turned)h(on.)0 1910 y(The)18 b(option)h Fp(lamp-off)14 +b Fq(is)k(used)h(to)f(turn)g(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.) +27 b(The)18 b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p +3499 1910 V 31 w(TYPE)p 3750 1910 V 30 w(BUTTON)p Fq(.)0 +2023 y(The)23 b(unit)h(is)g Fp(SANE)p 637 2023 V 31 w(UNIT)p +888 2023 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g +(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0 +2195 y(These)h(options)h(are)f(not)g(mandatory)-6 b(,)27 +b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i(them,)d(it)h(must)f +(implement)i(them)e(in)g(a)g(manner)0 2308 y(consistent)h(with)e(the)g +(abo)o(v)o(e)g(de\002nition.)0 2421 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 2421 a 0 2421 +a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 2421 a 0 2421 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 2421 a 308 x Fm(4.5.14)99 b(Scanner)26 +b(b)n(uttons)0 2792 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 2792 a 0 2792 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 2792 a 169 +x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)e(state)h +(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5 +b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 3074 +y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g +(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to) +d(the)g(same)0 3187 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f +(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h +(w)o(ould)f(be)g(implemented:)0 3300 y(Fi)n(v)o(e)25 +b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e +(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o +(ant)f(to)0 3413 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i +(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n +(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0 +3526 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g +(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n +(utton\).)47 b(F)o(or)0 3639 y(three)24 b(people)i(the)d(image)h(is)g +(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g +(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0 +3923 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e +(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n +(wing)i(options:)0 4036 y Fp(scanner-buttons)o(-l)o(oc)o(k)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 4036 28 4 v 31 +w(TYPE)p 1951 4036 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25 +b(=)e Fp(SANE)p 2813 4036 V 31 w(FALSE)0 4149 y(scanner-buttons)o(-s)o +(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809 +4149 V 31 w(TYPE)p 2060 4149 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0 +4262 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 4262 V 31 w(TYPE)p +2442 4262 V 30 w(BUTTON)0 4375 y Fq(When)18 b(setting)i(these)f +(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p +2091 4375 V 31 w(INFO)p 2342 4375 V 31 w(RELOAD)p 2703 +4375 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 4375 V 31 +w(INFO)p 3696 4375 V 31 w(RELOAD)p 4057 4375 V 30 w(PARAMS)0 +4488 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 4660 +y(A)34 b(frontend)k(has)e(to)f(disable)j(the)d(usage)i(of)e(the)h +(scanner)n(-b)n(uttons)41 b(by)36 b(def)o(ault.)66 b(This)35 +b(is)h(important)h(because)g(other)0 4773 y(frontends)26 +b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g +(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25 +b(important)g(thing)0 4885 y(is)f(that)h(some)f(scanners)i(do)f(not)f +(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g +(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0 +4998 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g +(scanner\).)0 5018 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 0 5018 a 0 5018 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 0 5018 a 0 5018 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 0 5018 a 1905 5381 a Fq(46)p eop +%%Page: 47 48 +47 47 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fq(A)31 b(frontend)j(that)e(w)o(ants)g(to)g(read)h(the)f(b)n(utton)h +(status)g(has)f(to)g(lock)h(the)f(b)n(utton)h(functions)h(at)e +(\002rst.)53 b(F)o(or)31 b(this)h(it)227 236 y(does)d(set)g(the)f +(option)i Fp(scanner-buttons)o(-lo)o(ck)21 b Fq(to)28 +b Fp(SANE)p 2390 236 28 4 v 31 w(TRUE)p Fq(.)d(While)k(setting)h(the)e +(v)n(alue)h(of)g(option)227 349 y Fp(scanner-buttons)o(-lo)o(ck)20 +b Fq(to)27 b Fp(SANE)p 1667 349 V 31 w(TRUE)e Fq(the)j(back)o(end)i +(does)e(check)h(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-) +227 462 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 +b(The)28 b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j +(where)e(e)n(v)o(ery)g(user)g(has)g(read)h(and)227 574 +y(write)24 b(access)h(to.)336 787 y Fr(\226)46 b Fq(If)20 +b(the)h(lock\002le)g(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j +(creates)f(the)e(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d +(\(PID\))427 900 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27 +b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f +(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 1013 y +Fq(is)k(set)f(to)h Fp(SANE)p 953 1013 V 31 w(TRUE)336 +1159 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h +(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g +(back)o(end)i(has)e(to)g(check)g(if)427 1272 y(the)f(process)i(with)d +(the)h(PID)f(stored)i(in)e(the)h(lock\002le)h(still)f(is)g(running.)46 +b(If)28 b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427 +1385 y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j +Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g +Fp(SANE)p 3340 1385 V 31 w(FALSE)p Fq(.)c(If)k(not)427 +1498 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of) +h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g +(access)427 1611 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e +(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23 +b(set)h(to)g Fp(SANE)p 3194 1611 V 30 w(TRUE)136 1823 +y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i +(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37 +b(If)28 b(it)g(is)h Fp(SANE)p 3472 1823 V 31 w(TRUE)c +Fq(then)227 1936 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h +(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 1936 +V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136 +2124 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n +(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f +(once)g(per)g(second)g(\(while)g(not)227 2237 y(scanning\):)336 +2424 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h +Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o +Fq(.)35 b(The)27 b(back)o(end)j(checks)427 2537 y(if)37 +b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i +(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427 +2650 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h +(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option) +427 2763 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20 +b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f +(means)g(the)h(b)n(utton)h(is)427 2876 y(not)23 b(pressed,)h(a)d(v)n +(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30 +b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427 +2989 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f +(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42 +b(The)27 b(back)o(end)427 3102 y(has)c(to)f(implement)h(a)f(timeout)h +(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h +(within)f(a)e(prede\002ned)j(time)427 3215 y(\(e.g.)50 +b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50 +b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427 +3328 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b +Fp(SANE)p 1862 3328 V 31 w(FALSE)d Fq(and)j(does)h(set)f +Fp(SANE)p 2881 3328 V 31 w(INFO)p 3132 3328 V 31 w(RELOAD)p +3493 3328 V 30 w(OPTIONS)427 3440 y Fq(to)20 b(inform)g(the)g(frontend) +i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n +(-b)n(utton)k(functions.)30 b(If)20 b(access)427 3553 +y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o +(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 3699 y Fr(\226)46 +b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i +Fp(scanner-buttons-)o(st)o(at)o(us)136 3887 y Fk(\017)46 +b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g +(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g +Fp(scanner-buttons-)o(lo)o(ck)227 4000 y Fq(to)34 b Fp(SANE)p +556 4000 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g +(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f +(same.)227 4113 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es) +g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g +Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 4226 y Fp(SANE)p +452 4226 V 31 w(FALSE)p Fq(.)227 4376 y Fp(sane)p 452 +4376 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g +(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11 +b Fq(to)18 b Fp(SANE)p 3601 4376 V 31 w(FALSE)p Fq(.)0 +4495 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 0 4495 a 0 4495 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 0 4495 a 0 4495 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 0 4495 a 1905 +5381 a Fq(47)p eop +%%Page: 48 49 +48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51 +b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g +(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h +(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895 +y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e +(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f +(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h +(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e +(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h +(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367 +y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e +(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5 +b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480 +y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g +(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i +(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h +(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g +(access)g(to)g(the)g(system.)227 2743 y(Controlling)34 +b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e) +n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227 +2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges) +i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i +(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36 +b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d +(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47 +b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n +(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227 +3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i +(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g +(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that) +g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f +(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g +(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i +(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24 +b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n +(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22 +b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l +(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f +(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834 +y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h +(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h +(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19 +b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e +(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws) +227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices) +h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44 +b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24 +b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g +(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i +(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g +(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740 +y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i +(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114 +4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client) +h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o +(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p +eop +%%Page: 49 50 +49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f +(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e +(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i +(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45 +b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h +(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227 +536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k +(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o +(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0 +896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h +(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h +(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0 +1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0 +1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7 +b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g +(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0 +2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44 +b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28 +b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h +(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n +(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44 +b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30 +b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c +(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).) +0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29 +b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10 +b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227 +2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g +(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h +(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43 +b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g +Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37 +b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227 +3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e +Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6 +b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43 +b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40 +b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f +(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g +(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d +(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227 +3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o +(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues) +g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f +(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g +(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47 +b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0 +4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378 +y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C) +e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e +(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737 +y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w) +o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g +(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28 +b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g +(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f +(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h +(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop +%%Page: 50 51 +50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded) +j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g +(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227 +236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29 +b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f +(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0 +525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by) +e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g +(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j +(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b +Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e +(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i +(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30 +b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j +(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g +(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25 +b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e +(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f +(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g +(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of) +d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518 +y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h +(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h +(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h +(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g +(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\)) +f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h +(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back) +o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0 +2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p +545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838 +y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e +(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20 +b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0 +2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g +(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g +(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744 +3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p +1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52 +b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p +1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52 +b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32 +b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35 +b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36 +b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687 +y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39 +b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i +(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v) +o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h +(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0 +3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f +(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e +(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o +(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g +(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31 +w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h +(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59 +b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26 +b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e +Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h +(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n +(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o +(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5 +b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o +(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0 +4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g +(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748 +y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28 +b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw) +o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g +(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n +(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p +0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19 +b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak) +g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5 +b(.)1905 5381 y Fq(50)p eop +%%Page: 51 52 +51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0 +356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f +(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055 +596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196 +b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822 +y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822 +V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h +(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6 +b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344 +V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has) +g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p +2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0 +1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f +Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765 +y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p +760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open) +i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760 +2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p +985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V +30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071 +2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577 +y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y +Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k +(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0 +2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099 +V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has) +e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d +Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23 +b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31 +b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j +(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p +Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g +(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0 +3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g +(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0 +3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p +760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077 +4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p +1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252 +4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d +Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h +(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905 +5381 y(51)p eop +%%Page: 52 53 +52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p +1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h +(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706 +705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97 +b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28 +w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h +(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29 +b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h +(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50 +b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n +(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A) +o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445 +1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 +1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 +4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V +34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i +(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i +(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694 +y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p +1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187 +2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040 +2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31 +w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294 +b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033 +V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p +1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 +b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 +3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 +b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371 +V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e +Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f +(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23 +b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the) +g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34 +b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40 +b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75 +b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c +Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945 +y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080 +3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p +1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h +Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p +Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V +31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058 +V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28 +b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g +(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f +(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n +(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c +Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31 +b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h +Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32 +b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v) +o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37 +b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g +(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f +(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o +(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622 +y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24 +b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g +(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call) +0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p +Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned) +h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f +(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26 +b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36 +b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f +Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p +Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h +(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p +eop +%%Page: 53 54 +53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on) +d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i +(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0 +236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f +(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946 +236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V +31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h +(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28 +b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462 +y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply) +i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i +(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28 +b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that) +f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0 +687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545 +995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V +35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886 +1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p +1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061 +1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061 +1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b +Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e +(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0 +2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40 +b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g +(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j +Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g +(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750 +30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).) +940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y +Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p +2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p +2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116 +3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891 +3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913 +y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g +(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h +(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23 +b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19 +b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e +(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33 +b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g +(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section) +g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d +(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31 +b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0 +4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073 +4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28 +b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n +(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27 +b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data) +g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0 +4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g +(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5 +b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g +(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50 +b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.) +0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence) +j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted) +j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j +(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f +(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905 +5381 y(53)p eop +%%Page: 54 55 +54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25 +b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g +(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31 +w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j +(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f +(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0 +349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g +(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i +(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18 +b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g +(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35 +b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36 +b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33 +b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742 +y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g +(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j +(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i +(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o +(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0 +968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31 +b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6 +b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v) +o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i +(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0 +1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j +(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i +(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h +(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609 +30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f +(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635 +b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30 +w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53 +b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f +(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0 +2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p +810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h +(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854 +b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31 +w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53 +b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967 +3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006 +y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g +(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31 +b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string) +h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24 +b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j +(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17 +b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j +(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0 +4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512 +y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o +(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n +(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g +(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo) +n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0 +4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g +(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i +(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22 +b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e +(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0 +5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905 +5381 y(54)p eop +%%Page: 55 56 +55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b +Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20 +b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30 +b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f +(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j +(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0 +349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26 +b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f +(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f +(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31 +w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p +Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v +35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g +(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5 +b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i +(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h +(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o +(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y +Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e +Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop +%%Page: 56 57 +56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51 +b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28 +b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.) +35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0 +1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g +(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h +(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0 +2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h +(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18 +b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e +(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c +(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0 +2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g +(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j +(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o +(an)o(e/)1905 5381 y Fq(56)p eop +%%Page: 57 58 +57 57 bop 0 586 a Fs(Index)0 1012 y Fq(analog)25 b(gamma)e(option,)i +(44)0 1125 y(array)-6 b(,)24 b(50)0 1321 y(bit)g(depth)g(option,)h(43)0 +1434 y(br)n(-x,)f(42)0 1547 y(br)n(-y)-6 b(,)24 b(42)0 +1742 y(code)g(\003o)n(w)-6 b(,)22 b(37)0 1938 y(de)n(vice-name,)k(18)0 +2051 y(domain,)e(26)0 2247 y(enumeration)i(types,)f(49)0 +2443 y(gamma)e(table)h(options,)i(43)0 2639 y(hightlight)g(options,)g +(45)0 2835 y(image)e(data)g(format,)g(10)0 3031 y(lamp-of)n(f)h +(option,)f(46)0 3144 y(lamp-on)h(option,)g(46)0 3340 +y(mailing)g(list,)e(56)0 3453 y(mode)h(options,)h(44)0 +3649 y(netw)o(ork)g(authorization,)i(54)0 3762 y(NUL,)21 +b(16)0 3957 y(option)k(count,)g(41)0 4070 y(Option)p +256 4070 28 4 v 34 w(Descriptor)p 671 4070 V 36 w(Array)-6 +b(,)23 b(52)0 4266 y(passw)o(ord,)i(26)0 4379 y(pointer)l(,)g(49)0 +4492 y(pre)n(vie)n(w)f(mode,)f(41)0 4688 y(resolution)j(option,)f(41)0 +4884 y(SANE)p 244 4884 V 31 w(Action,)f(29)0 4997 y(SANE)p +244 4997 V 31 w(A)l(CTION)p 616 4997 V 32 w(GET)p 826 +4997 V 31 w(V)-12 b(ALUE,)20 b(29)0 5110 y(SANE)p 244 +5110 V 31 w(A)l(CTION)p 616 5110 V 32 w(SET)p 811 5110 +V 31 w(A)-5 b(UT)n(O,)21 b(29)2095 1012 y(SANE)p 2339 +1012 V 31 w(A)l(CTION)p 2711 1012 V 32 w(SET)p 2906 1012 +V 31 w(V)-12 b(ALUE,)20 b(29)2095 1125 y(SANE)p 2339 +1125 V 31 w(Authorization)p 2871 1125 V 37 w(Callback,)25 +b(26)2095 1238 y(SANE)p 2339 1238 V 31 w(Bool,)f(15)2095 +1351 y(SANE)p 2339 1351 V 31 w(Byte,)g(14,)f(49)2095 +1463 y(sane)p 2260 1463 V 35 w(cancel,)h(35)2095 1576 +y(SANE)p 2339 1576 V 31 w(CAP)p 2548 1576 V 32 w(AD)l(V)-12 +b(ANCED,)19 b(23)2095 1689 y(SANE)p 2339 1689 V 31 w(CAP)p +2548 1689 V 32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(23)2095 +1802 y(SANE)p 2339 1802 V 31 w(CAP)p 2548 1802 V 32 w(EMULA)-10 +b(TED,)19 b(23)2095 1915 y(SANE)p 2339 1915 V 31 w(CAP)p +2548 1915 V 32 w(HARD)p 2839 1915 V 31 w(SELECT)-7 b(,)20 +b(23)2095 2028 y(SANE)p 2339 2028 V 31 w(CAP)p 2548 2028 +V 32 w(IN)m(A)l(CTIVE,)h(23)2095 2141 y(SANE)p 2339 2141 +V 31 w(CAP)p 2548 2141 V 32 w(SOFT)p 2804 2141 V 31 w(DETECT)-7 +b(,)20 b(23)2095 2254 y(SANE)p 2339 2254 V 31 w(CAP)p +2548 2254 V 32 w(SOFT)p 2804 2254 V 31 w(SELECT)-7 b(,)20 +b(23)2095 2367 y(SANE)p 2339 2367 V 31 w(Char)l(,)k(16,)f(49)2095 +2480 y(sane)p 2260 2480 V 35 w(close,)h(28)2095 2593 +y(SANE)p 2339 2593 V 31 w(CONSTRAINT)p 2949 2593 V 30 +w(NONE,)d(24)2095 2705 y(SANE)p 2339 2705 V 31 w(CONSTRAINT)p +2949 2705 V 30 w(RANGE,)f(24)2095 2818 y(SANE)p 2339 +2818 V 31 w(CONSTRAINT)p 2949 2818 V 30 w(STRING)p 3309 +2818 V 31 w(LIST)-7 b(,)21 b(24)2095 2931 y(SANE)p 2339 +2931 V 31 w(Constraint)p 2746 2931 V 36 w(T)-7 b(ype,)23 +b(22)2095 3044 y(SANE)p 2339 3044 V 31 w(CONSTRAINT)p +2949 3044 V 30 w(W)o(ORD)p 3257 3044 V 31 w(LIST)-7 b(,)22 +b(24)2095 3157 y(sane)p 2260 3157 V 35 w(control)p 2550 +3157 V 35 w(option,)j(29)2095 3270 y(SANE)p 2339 3270 +V 31 w(CURRENT)p 2797 3270 V 30 w(MAJOR,)d(13)2095 3383 +y(SANE)p 2339 3383 V 31 w(De)n(vice,)i(17)2095 3496 y(sane)p +2260 3496 V 35 w(e)o(xit,)f(27)2095 3609 y(SANE)p 2339 +3609 V 31 w(F)-7 b(ALSE,)21 b(15)2095 3722 y(SANE)p 2339 +3722 V 31 w(FIX,)h(16)2095 3835 y(SANE)p 2339 3835 V +31 w(Fix)o(ed,)i(15)2095 3948 y(SANE)p 2339 3948 V 31 +w(FIXED)p 2639 3948 V 32 w(SCALE)p 2961 3948 V 30 w(SHIFT)-7 +b(,)22 b(15)2095 4060 y(SANE)p 2339 4060 V 31 w(Frame,)h(31)2095 +4173 y(SANE)p 2339 4173 V 31 w(FRAME)p 2685 4173 V 31 +w(BLUE,)e(10,)i(31)2095 4286 y(SANE)p 2339 4286 V 31 +w(FRAME)p 2685 4286 V 31 w(GRA)-10 b(Y)e(,)22 b(10,)h(31)2095 +4399 y(SANE)p 2339 4399 V 31 w(FRAME)p 2685 4399 V 31 +w(GREEN,)e(10,)i(31)2095 4512 y(SANE)p 2339 4512 V 31 +w(FRAME)p 2685 4512 V 31 w(MIME,)f(10,)i(12,)f(31)2095 +4625 y(SANE)p 2339 4625 V 31 w(FRAME)p 2685 4625 V 31 +w(RA)-8 b(W)g(,)21 b(10,)j(31)2095 4738 y(SANE)p 2339 +4738 V 31 w(FRAME)p 2685 4738 V 31 w(RED,)e(10,)h(31)2095 +4851 y(SANE)p 2339 4851 V 31 w(FRAME)p 2685 4851 V 31 +w(RGB,)f(10,)h(31)2095 4964 y(sane)p 2260 4964 V 35 w(get)p +2405 4964 V 33 w(de)n(vices,)i(27)2095 5077 y(sane)p +2260 5077 V 35 w(get)p 2405 5077 V 33 w(option)p 2668 +5077 V 35 w(descriptor)l(,)i(28)1905 5381 y(57)p eop +%%Page: 58 59 +58 58 bop 0 123 a Fq(sane)p 165 123 28 4 v 34 w(get)p +309 123 V 34 w(parameters,)25 b(31)0 236 y(sane)p 165 +236 V 34 w(get)p 309 236 V 34 w(select)p 548 236 V 35 +w(fd,)e(36)0 349 y(SANE)p 244 349 V 31 w(Handle,)h(17,)f(49)0 +462 y(SANE)p 244 462 V 31 w(INFO)p 488 462 V 32 w(INEXA)l(CT)-7 +b(,)21 b(30)0 574 y(SANE)p 244 574 V 31 w(INFO)p 488 +574 V 32 w(RELO)m(AD)p 888 574 V 30 w(OPTIONS,)f(30,)k(34)0 +687 y(SANE)p 244 687 V 31 w(INFO)p 488 687 V 32 w(RELO)m(AD)p +888 687 V 30 w(P)-8 b(ARAMS,)20 b(30)0 800 y(sane)p 165 +800 V 34 w(init,)k(26)0 913 y(SANE)p 244 913 V 31 w(Int,)g(15)0 +1026 y(SANE)p 244 1026 V 31 w(NET)p 453 1026 V 32 w(A)-5 +b(UTHORIZE,)19 b(54)0 1139 y(SANE)p 244 1139 V 31 w(NET)p +453 1139 V 32 w(CANCEL,)h(54)0 1252 y(SANE)p 244 1252 +V 31 w(NET)p 453 1252 V 32 w(CLOSE,)g(51)0 1365 y(SANE)p +244 1365 V 31 w(NET)p 453 1365 V 32 w(CONTR)l(OL)p 913 +1365 V 30 w(OPTION,)h(52)0 1478 y(SANE)p 244 1478 V 31 +w(NET)p 453 1478 V 32 w(EXIT)-7 b(,)21 b(55)0 1591 y(SANE)p +244 1591 V 31 w(NET)p 453 1591 V 32 w(GET)p 663 1591 +V 31 w(DEVICES,)f(51)0 1704 y(SANE)p 244 1704 V 31 w(NET)p +453 1704 V 32 w(GET)p 663 1704 V 31 w(OPTION)p 1029 1704 +V 31 w(DESCRIPT)n(ORS,)f(52)0 1817 y(SANE)p 244 1817 +V 31 w(NET)p 453 1817 V 32 w(GET)p 663 1817 V 31 w(P)-8 +b(ARAMETERS,)18 b(53)0 1929 y(SANE)p 244 1929 V 31 w(NET)p +453 1929 V 32 w(INIT)-7 b(,)22 b(50)0 2042 y(SANE)p 244 +2042 V 31 w(NET)p 453 2042 V 32 w(OPEN,)e(51)0 2155 y(SANE)p +244 2155 V 31 w(NET)p 453 2155 V 32 w(ST)-8 b(AR)j(T)e(,)19 +b(53)0 2268 y(sane)p 165 2268 V 34 w(open,)24 b(27)0 +2381 y(SANE)p 244 2381 V 31 w(Option)p 526 2381 V 34 +w(Descriptor)l(,)i(19)0 2494 y(SANE)p 244 2494 V 31 w(OPTION)p +610 2494 V 31 w(IS)p 722 2494 V 33 w(A)l(CTIVE,)21 b(22)0 +2607 y(SANE)p 244 2607 V 31 w(OPTION)p 610 2607 V 31 +w(IS)p 722 2607 V 33 w(SETT)-8 b(ABLE,)18 b(22)0 2720 +y(SANE)p 244 2720 V 31 w(P)o(arameters,)24 b(31)0 2833 +y(SANE)p 244 2833 V 31 w(Range,)g(24)0 2946 y(sane)p +165 2946 V 34 w(read,)g(35)0 3059 y(sane)p 165 3059 V +34 w(set)p 299 3059 V 34 w(io)p 403 3059 V 33 w(mode,)g(36)0 +3171 y(sane)p 165 3171 V 34 w(start,)g(34)0 3284 y(SANE)p +244 3284 V 31 w(Status,)g(17)0 3397 y(SANE)p 244 3397 +V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(A)l(CCESS)p +975 3397 V 30 w(DENIED,)21 b(17)0 3510 y(SANE)p 244 3510 +V 31 w(ST)-8 b(A)e(TUS)p 603 3510 V 30 w(CANCELLED,)19 +b(17)0 3623 y(SANE)p 244 3623 V 31 w(ST)-8 b(A)e(TUS)p +603 3623 V 30 w(CO)-5 b(VER)p 938 3623 V 31 w(OPEN,)21 +b(17)0 3736 y(SANE)p 244 3736 V 31 w(ST)-8 b(A)e(TUS)p +603 3736 V 30 w(DEVICE)p 968 3736 V 31 w(B)o(USY)e(,)21 +b(17)0 3849 y(SANE)p 244 3849 V 31 w(ST)-8 b(A)e(TUS)p +603 3849 V 30 w(EOF)j(,)21 b(17)0 3962 y(SANE)p 244 3962 +V 31 w(ST)-8 b(A)e(TUS)p 603 3962 V 30 w(GOOD,)21 b(17,)i(26)0 +4075 y(SANE)p 244 4075 V 31 w(ST)-8 b(A)e(TUS)p 603 4075 +V 30 w(INV)e(AL,)21 b(17)0 4188 y(SANE)p 244 4188 V 31 +w(ST)-8 b(A)e(TUS)p 603 4188 V 30 w(IO)p 729 4188 V 32 +w(ERR)l(OR,)21 b(17)0 4301 y(SANE)p 244 4301 V 31 w(ST)-8 +b(A)e(TUS)p 603 4301 V 30 w(J)-5 b(AMMED,)21 b(17)0 4413 +y(SANE)p 244 4413 V 31 w(ST)-8 b(A)e(TUS)p 603 4413 V +30 w(NO)p 765 4413 V 32 w(DOCS,)21 b(17)0 4526 y(SANE)p +244 4526 V 31 w(ST)-8 b(A)e(TUS)p 603 4526 V 30 w(NO)p +765 4526 V 32 w(MEM,)21 b(17)0 4639 y(SANE)p 244 4639 +V 31 w(ST)-8 b(A)e(TUS)p 603 4639 V 30 w(UNSUPPOR)-5 +b(TED,)17 b(17)0 4752 y(SANE)p 244 4752 V 31 w(String,)24 +b(16,)f(49)0 4865 y(SANE)p 244 4865 V 31 w(String)p 496 +4865 V 34 w(Const,)h(16)0 4978 y(sane)p 165 4978 V 34 +w(strstatus,)i(37)0 5091 y(SANE)p 244 5091 V 31 w(TR)l(UE,)21 +b(15)2095 123 y(SANE)p 2339 123 V 31 w(TYPE)p 2599 123 +V 31 w(BOOL,)g(21)2095 236 y(SANE)p 2339 236 V 31 w(TYPE)p +2599 236 V 31 w(B)o(UTT)n(ON,)g(21)2095 349 y(SANE)p +2339 349 V 31 w(TYPE)p 2599 349 V 31 w(FIXED,)g(21)2095 +462 y(SANE)p 2339 462 V 31 w(TYPE)p 2599 462 V 31 w(GR)l(OUP)-10 +b(,)21 b(21)2095 574 y(SANE)p 2339 574 V 31 w(TYPE)p +2599 574 V 31 w(INT)-7 b(,)23 b(21)2095 687 y(SANE)p +2339 687 V 31 w(TYPE)p 2599 687 V 31 w(STRING,)e(21)2095 +800 y(SANE)p 2339 800 V 31 w(Unit,)i(20)2095 913 y(SANE)p +2339 913 V 31 w(UNFIX,)f(16)2095 1026 y(SANE)p 2339 1026 +V 31 w(UNIT)p 2588 1026 V 32 w(BIT)-7 b(,)22 b(21)2095 +1139 y(SANE)p 2339 1139 V 31 w(UNIT)p 2588 1139 V 32 +w(DPI,)g(21)2095 1252 y(SANE)p 2339 1252 V 31 w(UNIT)p +2588 1252 V 32 w(MICR)l(OSECOND,)e(21)2095 1365 y(SANE)p +2339 1365 V 31 w(UNIT)p 2588 1365 V 32 w(MM,)i(21)2095 +1478 y(SANE)p 2339 1478 V 31 w(UNIT)p 2588 1478 V 32 +w(NONE,)f(21)2095 1591 y(SANE)p 2339 1591 V 31 w(UNIT)p +2588 1591 V 32 w(PERCENT)-7 b(,)20 b(21)2095 1704 y(SANE)p +2339 1704 V 31 w(UNIT)p 2588 1704 V 32 w(PIXEL,)h(21)2095 +1817 y(SANE)p 2339 1817 V 31 w(V)-10 b(alue)p 2576 1817 +V 34 w(T)j(ype,)23 b(20)2095 1929 y(SANE)p 2339 1929 +V 31 w(VERSION)p 2766 1929 V 31 w(CODE,)e(14)2095 2042 +y(SANE)p 2339 2042 V 31 w(VERSION)p 2766 2042 V 31 w(MAJOR,)h(14)2095 +2155 y(SANE)p 2339 2155 V 31 w(W)-7 b(ord,)24 b(14,)f(49)2095 +2268 y(scan)i(area)f(options,)h(42)2095 2381 y(scan)g(resolution,)h(41) +2095 2494 y(scanner)g(b)n(utton)f(options,)g(46)2095 +2607 y(shado)n(w)f(options,)i(45)2095 2720 y(source)f(options,)g(44) +2095 2833 y(structure,)h(50)2095 3029 y(threshold)g(option,)f(44)2095 +3142 y(tl-x,)f(42)2095 3254 y(tl-y)-6 b(,)24 b(42)2095 +3367 y(T)-7 b(ype)24 b(Strings,)g(18)2095 3563 y(union,)h(50)2095 +3676 y(username,)g(26)2095 3872 y(V)-10 b(endor)25 b(Strings,)f(18)2095 +4068 y(well-kno)n(wn)h(options,)g(41)1905 5381 y(58)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/sane2/0.07/sane2-0.07.tex b/sane2/0.07/sane2-0.07.tex new file mode 100644 index 00000000..c3afa7d0 --- /dev/null +++ b/sane2/0.07/sane2-0.07.tex @@ -0,0 +1,2632 @@ +\documentclass[11pt,DVIps]{report} + +\usepackage{times,epsfig,changebar,html} + +\setlength{\parindent}{0pt} +\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex} +\setlength{\textwidth}{6.5in} +\setlength{\textheight}{8.5in} +\setlength{\marginparwidth}{0pt} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\marginparsep}{0pt} +\addtolength{\topmargin}{-0.75in} + +\title{\huge SANE Standard Version 2.0 proposal 0.07 - rauch/beck} +\author{} +\date{Dec 5, 2002} + +\makeindex + +\begin{document} + +\newcommand{\filename}[1]{{\tt #1}} +\newcommand{\code}[1]{{\tt #1}} +\newcommand{\var}[1]{{\it #1}} +\newcommand{\defn}[1]{#1\index{#1}} + +\begin{latexonly} + \setcounter{changebargrey}{0} % black change bars +\end{latexonly} + +\maketitle +\tableofcontents +\listoffigures +\listoftables + + +\chapter{Preface} + +The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +\ref{chap:contact}. + +The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + + +\section{About This Document} + +This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +The remainder of this document is organized as follows. +Chapter~\ref{chap:intro} provides introductional material. +Chapter~\ref{chap:environ} presents the environment SANE is designed +for. Chapter~\ref{chap:api} details the SANE Application Programmer +Interface. Chapter~\ref{chap:net} specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter~\ref{chap:contact} gives information on how +to join the SANE development process. + +\subsection{Typographic Conventions} + +Changes since the last revision of this document are highlighted +like this: + +\begin{changebar} + Paragraphs that changed since the last revision of the documention + are marked like this paragraph. +\end{changebar} + +\chapter{Introduction}\label{chap:intro} + +SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +\section{Terminology} + +An application that uses the SANE interface is called a SANE {\em + frontend}. A driver that implements the SANE interface is called a +SANE {\em backend}. A {\em meta backend\/} provides some means to +manage one or more other backends. + + +\chapter{The SANE Environment}\label{chap:environ} + +SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE {\em option\/}. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +\code{brightness} whose value is an integer in the range from 0 to +255. + +With self-describing options, a backend need not be concerned with +{\em presentation\/} issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the {\em meaning\/} of each option. It simply provides +means to present and alter the options defined by the backend. + + +\section{Attaching to a SANE backend} + +The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +\begin{itemize} + +\item {\bf Static linking:} A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called \code{be} + would normally export a function called \code{sane\_read()}. If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend \code{be} include a + header file that has lines of the form: + \begin{quote} +\begin{verbatim} +#define sane_read be_sane_read +\end{verbatim} + \end{quote} + With definitions of this kind, backend \code{be} will export + function name \code{be\_sane\_read()}. Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +\item {\bf Dynamic linking:} A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix \code{sane\_}), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + + More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends {\em on demand}. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +\item {\bf Network connection:} Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +\end{itemize} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth} + \caption{Example SANE Hiearchy} + \label{fig:hierarchy} + \end{center} +\end{figure} + +The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine +A uses a dynamic-linking based meta backend called \code{dll} to +access the backends called \code{pnm}, \code{mustek}, and \code{net}. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called \code{saned}. The \code{saned} in +turn has access to the \code{hp} and \code{autolum} backends through +another instance of the \code{dll} backend. The \code{autolum} meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called \code{qcam}. + +Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + + +\section{Image Data Format}\label{sec:imageformat}\index{image data format} + +Arguably the most important aspect of an image acquisition system is how +images are represented. The SANE approach is to define a simple yet powerful +representation that is sufficient for vast majority of applications and +devices. While the representation is simple, the interface has been defined +carefully to allow extending it in the future without breaking backwards +compatibility. Thus, it will be possible to accommodate future applications or +devices that were not anticipated at the time this standard was created. + +A SANE image is a rectangular area. The rectangular area is subdivided into a +number of rows and columns. At the intersection of each row and column is a +(preferable quadratic) pixel. A pixel consists of one or more sample values. +Each sample value represents one channel (e.g., the red channel). + +The SANE API transmits an image as a sequence of frames. Each frame covers +the same rectangular area as the entire image, but may contain only a subset +of the channels in the final image. For example, a red/green/blue image could +either be transmitted as a single frame that contains the sample values for +all three channels or it could be transmitted as a sequence of three frames: +the first frame containing the red channel, the second the green channel, and +the third the blue channel. + +When transmitting an image frame by frame, the frontend needs to know what +part of the image a frame represents (and how many frames it should expect). +For that purpose, the SANE API tags every frame with a type and a format +descriptor. + +\begin{changebar} + There are two different types of frames: pixel oriented frames + \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames + \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the + following sections. The frame types used by version~1 of this standard + (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}}, + \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and + \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by + \code{\defn{SANE\_FRAME\_RAW}}. + + \subsection{Pixel oriented frames} + + The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The + frame contains one or more channels of data in a channel-interleaved format, + that represents sample values from a property of the individual pixels that + is subject to further description in the \code{format\_desc} member of the + \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparameters} + on page~\pageref{sec:sanegetparameters} for details about the format + descriptions. +\end{changebar} + + Each sample value has a certain bit depth. The bit depth is fixed for the + entire image and can be as small as one bit. Valid bit depths are 1, 8, or + 16 bits per sample. If a device's natural bit depth is something else, it is + up to the driver to scale the sample values appropriately (e.g., a 4 bit + sample could be scaled by a factor of four to represent a sample value of + depth 8). + +\begin{changebar} + The complete image may consist of several different channels. The number of channels + is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}. + The image may be transmitted in an arbitary number of frames which can be + determined by watching the \code{SANE\_PFLAG\_LAST\_FRAME} flag in said type (or by + counting the channels). Note: This frame type replaces all frame types of + the SANE standard version 1. +\end{changebar} + +Conceptually, each pixel oriented frame is transmitted a byte at a time. Each +byte may contain 8 sample values (for an image bit depth of 1), one full +sample value (for an image bit depth of 8), or a partial sample value (for an +image bit depth of 16 or bigger). In the latter case, the bytes of each +sample value are transmitted in the machine's native byte order. +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +\end{quote} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/xfer.eps,width=0.5\textwidth} + \caption{Transfer order of image data bytes} + \label{fig:xfer} + \end{center} +\end{figure} + +The order in which the sample values in a frame are transmitted is illustrated +in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by +row and each row is transmitted from left-most to right-most column. The +left-to-right, top-to-bottom transmission order applies when the image is +viewed in its normal orientation (as it would be displayed on a screen, for +example). + +If a frame contains multiple channels, then the channels are transmitted in an +interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case +where a frame contains a complete red/green/blue image with a bit-depth of 8. + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/image-data.eps,width=0.8\textwidth} + \caption{Bit and byte order of image data} + \label{fig:pixels} + \end{center} +\end{figure} + +For a bit depth of 1, each byte contains 8 sample values of a {\em single\/} +channel. In other words, a bit depth 1 frame is transmitted in a byte +interleaved fashion. The first sample of each byte is represented by the most +significant bit. + +\begin{changebar} +For gray channels at a bit depth of 1 only two sample values are possible: 1 +represents minimum intensity (black) and 0 represents maximum intensity +(white). For all other channel types and bit depths a sample value of 0 +represents minimum intensity and larger values represent increasing intensity. + +\subsection{Arbitrary data frames} + +It also is possible to transmit arbitrary (not necessaryly pixel oriented) +data. This allows transmission of compressed images like jpeg, tiff, etc. + +The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}. +The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is +given in the \code{format\_desc} member of the \code{SANE\_Parameters} +structured type (see See section~\ref{sec:sanegetparameters} on +page~\pageref{sec:sanegetparameters}). As such, it is assumed to be +incomprehensible to the frontend, except for selected types the frontend is +specifically capable of handling internally. The frontend is free to ignore +those frames, or employ any appropriate means to otherwise handle this data +(like saving them to disk or spawning an external viewer). +\end{changebar} + +\chapter{The SANE Application Programmer Interface (API)}\label{chap:api} + +\begin{changebar} +This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called \filename{sane/sane-2.h}. This file should +normally be included via a C pre-processor directive of the form: +\begin{verbatim} + #include +\end{verbatim} +\end{changebar} + + +\section{Version Control} + +The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +The SANE API provides the following five macros to manage version +numbers. +\begin{quote} + \begin{description} + \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the + number of the SANE standard that the interface implements. + + \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:] + \label{sec:saneversioncode} + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (\var{maj}), the minor version number \var{min}, + and the build revision of a backend (\var{bld}). The major and + minor version numbers must be in the range 0\ldots255 and the + build revision must be in the range 0\ldots65535. + + Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + + Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + + \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the + major version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the + minor version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the + build revision component of the version code passed in argument + \var{vc}. + \end{description} +\end{quote} + + +\section{Data Types} + +\subsection{Base Types} + +The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +\begin{quote} + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\ + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};} +\end{quote} +\verb|SANE_Byte| must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. \verb|SANE_Word| must be +capable of holding any of the following: +\begin{itemize} + \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE| + \item signed integers in the range $-2^{31}\ldots2^{31}-1$ + \item fixed point values in the range $-32768\ldots32767.9999$ with + a resolution of $1/65536$ + \item 32 bits (for bit sets) +\end{itemize} +Note that the SANE standard does not define what C type +\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some +platforms, the latter may map to \verb|long int| whereas on others it +may map to \verb|int|. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +\subsection{Boolean Type} + +\code{\defn{SANE\_Bool}} is used for variables that can take one of +the two truth values \code{\defn{SANE\_FALSE}} and +\code{\defn{SANE\_TRUE}}. The former value is defined to be 0, +whereas the latter is 1.\footnote{This is different from ANSI C where + any non-zero integer value represents logical TRUE.} The C +declarations for this type are given below. +\begin{quote} +\begin{verbatim} +#define SANE_FALSE 0 +#define SANE_TRUE 1 +typedef SANE_Word SANE_Bool; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Bool| whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +\subsection{Integer Type} + +\code{\defn{SANE\_Int}} is used for variables that can take integer +values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is +given below. +\begin{quote} +\begin{verbatim} +typedef SANE_Word SANE_Int; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Int| whenever a given variable or formal argument has a +fixed interpretation as an integer object. + + +\subsection{Fixed-point Type} + +\code{\defn{SANE\_Fixed}} is used for variables that can take fixed +point values in the range $-32768$ to $32767.9999$ with a resolution +of $1/65535$. The C declarations relating to this type are given +below. +\begin{quote} +\begin{verbatim} +#define SANE_FIXED_SCALE_SHIFT 16 +typedef SANE_Word SANE_Fixed; +\end{verbatim} +\end{quote} +The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of $1/65536$. + +Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Fixed| whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE + fixed-point value that is smaller than the double value \var{d}. + No range checking is performed. If the value of \var{d} is out of + range, the result is undefined. + + \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest + double machine number that corresponds to fixed-point value + \var{w}. + + \end{description} +\end{quote} +SANE does {\em not\/} require that the following two expressions hold +true (even if the values of \var{w} and \var{d} are in range): +\begin{quote} +\begin{verbatim} +SANE_UNFIX(SANE_FIX(d)) == d +SANE_FIX(SANE_UNFIX(w)) == w +\end{verbatim} +\end{quote} +In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + + +\subsection{Text} + +\subsubsection{Character Type} + +Type \code{\defn{SANE\_Char}} represents a single text character or +symbol. At present, this type maps directly to the underlying C +\verb|char| type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +\verb|sizeof(SANE_Char)==sizeof(char)|. +\begin{quote} +\begin{verbatim} +typedef char SANE_Char; +\end{verbatim} +\end{quote} + +\subsubsection{String Type} + +Type \code{\defn{SANE\_String}} represents a text string as a sequence +of C \verb|char| values. The end of the sequence is indicated by a +\verb|'\0'| (\defn{NUL}) character. +\begin{quote} +\begin{verbatim} +typedef SANE_Char *SANE_String; +typedef const SANE_Char *SANE_String_Const; +\end{verbatim} +\end{quote} +The type \code{\defn{SANE\_String\_Const}} is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +\begin{quote} +\begin{verbatim} +const SANE_String str; +\end{verbatim} +\end{quote} +declares a string pointer that is constant (not a string pointer that +points to a constant value). + + +\subsection{Scanner Handle Type} + +Access to a scanner is provided through an opaque type called +\code{\defn{SANE\_Handle}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef void *SANE_Handle; +\end{verbatim} +\end{quote} +While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a \verb|SANE_Handle|. In +particular, SANE does not require that a value of this type is a legal +pointer value. + + +\subsection{Status Type} + +Most SANE operations return a value of type \code{\defn{SANE\_Status}} +to indicate whether the completion status of the operation. If an +operation completes successfully, \verb|SANE_STATUS_GOOD| is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table \ref{tab:status}. It is recommended to use function +\code{sane\_strstatus()} to convert status codes into a legible +string. + +\begin{table}[htbp] + \begin{center} + \begin{tabular}{|l|r|l|} + \hline + \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} & + \multicolumn{1}{c|}{\bf Description} \\ + \hline\hline +\code{\defn{SANE\_STATUS\_GOOD}} + & 0 & Operation completed succesfully. \\ +\code{\defn{SANE\_STATUS\_UNSUPPORTED}} + & 1 & Operation is not supported. \\ +\code{\defn{SANE\_STATUS\_CANCELLED}} + & 2 & Operation was cancelled. \\ +\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}} + & 3 & Device is busy---retry later. \\ +\code{\defn{SANE\_STATUS\_INVAL}} + & 4 & Data or argument is invalid. \\ +\code{\defn{SANE\_STATUS\_EOF}} + & 5 & No more data available (end-of-file). \\ +\code{\defn{SANE\_STATUS\_JAMMED}} + & 6 & Document feeder jammed. \\ +\code{\defn{SANE\_STATUS\_NO\_DOCS}} + & 7 & Document feeder out of documents. \\ +\code{\defn{SANE\_STATUS\_COVER\_OPEN}} + & 8 & Scanner cover is open. \\ +\code{\defn{SANE\_STATUS\_IO\_ERROR}} + & 9 & Error during device I/O. \\ +\code{\defn{SANE\_STATUS\_NO\_MEM}} + & 10 & Out of memory. \\ +\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}} + & 11 & Access to resource has been denied. \\ + \hline + \end{tabular} + \caption{Status Codes}\label{tab:status} + \end{center} +\end{table} + + +\subsection{Device Descriptor Type} +\begin{changebar} + +Each SANE device is represented by a structure of type +\code{\defn{SANE\_Device}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const vendor; + SANE_String_Const model; + SANE_String_Const type; + SANE_String_Const email_backend_author; + SANE_String_Const backend_website; + SANE_String_Const device_location; + SANE_String_Const comment; + SANE_String_Const reserved_string; + SANE_Int backend_version_code; + SANE_Int backend_capablity_flags; + SANE_Int reserved_int; + } +SANE_Device; +\end{verbatim} +\end{quote} +\end{changebar} +\index{device-name} +The structure provides the unique name of the scanner in member +\code{name}. It is this unique name that should be passed in a call +to \code{sane\_open()}. The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is {\em recommended\/} that backends keep +unique names below 32 characters in length. However, applications +{\em must\/} be able to cope with arbitrary length unique names. + +The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members \code{vendor}, \code{model}, and \code{type} are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +\begin{table}[htbp] + \begin{center} + \leavevmode + \hspace{\fill} + \begin{tabular}[t]{|ll|} + \hline + \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\ + \hline\hline + \code{AGFA} & \code{Microtek} \\ + \code{Abaton} & \code{Minolta} \\ + \code{Acer} & \code{Mustek} \\ + \code{Apple} & \code{NEC} \\ + \code{Artec} & \code{Nikon} \\ + \code{Avision} & \code{Plustek} \\ + \code{CANON} & \code{Polaroid} \\ + \code{Connectix} & \code{Ricoh} \\ + \code{Epson} & \code{Sharp} \\ + \code{Fujitsu} & \code{Siemens} \\ + \code{Hewlett-Packard} & \code{Tamarack} \\ + \code{IBM} & \code{UMAX} \\ + \code{Kodak} & \code{Noname} \\ + \code{Logitech} & \\ + \hline + \end{tabular} + \hspace{\fill} + \begin{tabular}[t]{|l|} + \hline + \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\ + \hline\hline + \code{film scanner} \\ + \code{flatbed scanner} \\ + \code{frame grabber} \\ + \code{handheld scanner} \\ + \code{multi-function peripheral} \\ + \code{sheetfed scanner} \\ + \code{still camera} \\ + \code{video camera} \\ + \code{virtual device} \\ + \hline + \end{tabular} + \hspace{\fill} + \caption{Predefined Device Information Strings} + \label{tab:devinfo} + \end{center} +\end{table} +Note that vendor string \code{Noname} can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +\begin{changebar} +The backend has to set up the string \code{email\_backend\_author} +with the name and the email address of the backend author or a contact person +in the format: +\begin{verbatim} +Firstname Lastname +\end{verbatim} + +The string \code{backend\_website} has to be set up by the backend +with the website or ftp address of the backend in the format: +\begin{verbatim} +http://www.domain.org/sane-hello/index.html +\end{verbatim} + +The backend should fill the string \code{device\_location} with a +text that describes where a user can find this device, the text +should be read from the backend config file. This could e.g. look +like this: +\begin{verbatim} +building 93, 2nd plane, room 2124 +\end{verbatim} + +The string \code{comment} can be used to display any comment to the user, +the text should be read from the backend config file. + +The string \code{reserved\_string} is planed for future use, the backend +has to set this string to "". + +With member \code{backend\_version\_code} a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +The member \code{backend\_capability\_flags} contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +The member \code{reserved\_int} is planned for future use, the backend has +to set the value of the integer to 0. +\end{changebar} + +\subsection{Option Descriptor Type}\label{sec:odesc} + +Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +\code{\defn{SANE\_Option\_Descriptor}} type is given below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const title; + SANE_String_Const desc; + SANE_Value_Type type; + SANE_Unit unit; + SANE_Int size; + SANE_Int cap; + SANE_Constraint_Type constraint_type; + union + { + const SANE_String_Const *string_list; + const SANE_Word *word_list; + const SANE_Range *range; + } + constraint; + } +SANE_Option_Descriptor; +\end{verbatim} +\end{quote} + +\subsubsection{Option Name} + +Member \code{name} is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (\code{a}--\code{z}), +digits (\code{0}--\code{9}), or the dash character (\code{-}) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +\subsubsection{Option Title} + +Member \code{title} is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +\subsubsection{Option Description} + +Member \code{desc} is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +\subsubsection{Option Value Type} + +Member \code{type} specifies the type of the option value. The +possible values for type \code{\defn{SANE\_Value\_Type}} are described +in Table \ref{tab:valuetype}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|p{0.6\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type + \verb|SANE_Bool|. \\ + +\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type + \verb|SANE_Int|. \\ + +\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type + \verb|SANE_Fixed|. \\ + +\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type + \verb|SANE_String|. \\ + +\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper. \\ + +\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members \code{title} and +\code{type} are valid in the option descriptor. \\ + + \hline + \end{tabular} + \caption{Option Value Types (\code{SANE\_Value\_Type})} + \label{tab:valuetype} + \end{center} +\end{table} + +\subsubsection{Option Value Unit} + +Member \code{unit} specifies what the physical unit of the option +value is. The possible values for type \code{\defn{SANE\_U\-nit}} are +described in Table \ref{tab:units}. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\ +\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\ +\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\ +\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\ +\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\ +\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\ +\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\ + +\hline + \end{tabular} + \caption{Physical Units (\code{SANE\_Unit})} + \label{tab:units} + \end{center} +\end{table} + +\subsubsection{Option Value Size}\label{sec:valuesize} + +Member \code{size} specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +\begin{quote} + \begin{description} + \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating \code{NUL} character is considered to be part of the + string. Note that the terminating \code{NUL} character must + always be present in string option values. + \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size + must be a positive integer multiple of the size of a + \verb|SANE_Word|. The option value is a vector of length + \[ \code{size}/\code{sizeof(SANE\_Word)}. \] + \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to + \code{sizeof(SANE\_Word)}. + \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The + option size is ignored. + \end{description} +\end{quote} + +\subsubsection{Option Capabilities} + +Member \code{cap} describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table \ref{tab:capabilities}. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro + returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is currently active. + + \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This + macro returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is software settable. + \end{description} +\end{quote} + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.59\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option + value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\ + +\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both + simultaneously). \\ + +\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option + value can be detected by software. If + \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/} + be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability + may or may not be set. If this capability is set but neither + \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT} + are, then there is no way to control the option. That is, the + option provides read-out of the current value only. \\ + +\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option. \\ + +\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling \code{sane\_control\_option()} + with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\ + +\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value). \\ + +\code{\defn{SANE\_CAP\_ADVANCED}} & 64 & + If set, this capability indicates that the option should be + considered an ``advanced user option.'' A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). + \\ + +\hline + \end{tabular} + \caption{Option Capabilities} + \label{tab:capabilities} + \end{center} +\end{table} + +\subsubsection{Option Value Constraints} + +It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member \code{constraint\_type} indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member \code{constraint}. The possible values of type +\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the +\code{constraint} union is described in Table~\ref{tab:constraints}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained. + The option can take any of the values possible for the option's + type. \\ + + \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member \code{constraint.range} points to + a range of the type \code{\defn{SANE\_Range}}. This type is illustrated + below: + \begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Word min; + SANE_Word max; + SANE_Word quant; + } +SANE_Range; +\end{verbatim} + \end{quote} + All three members in this structure are interpreted according to the + option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). + Members \code{min} and \code{max} specify the minimum and maximum + values, respectively. If member \code{quant} is non-zero, it + specifies the quantization value. If $l$ is the minimum value, $u$ + the maximum value and $q$ the (non-zero) quantization of a range, + then the legal values are $v=k\cdot q+l$ for all non-negative + integer values of $k$ such that $v<=u$. \\ + +\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + \code{constraint.word\_list} points to a list of words that + enumerates the legal values. The first element in that list is an + integer (\verb|SANE_Int|) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\ + +\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated + list of strings that enumerate the legal values for the option + value. +\\\hline + \end{tabular} + \caption{Option Value Constraints} + \label{tab:constraints} + \end{center} +\end{table} + + +\subsection{Internationalization}\label{sec:i18n} +\begin{changebar} +All backend texts should be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +\subsubsection{How is a text marked for translation} + +The keyword \code{SANE\_I18N} is used to mark a text for translation. +\code{SANE\_I18N} has to be defined as a dummy prototype: + + \begin{quote} +\begin{verbatim} +#ifndef SANE_I18N +# define SANE_I18N(text) text +#endif +\end{verbatim} + \end{quote} + +You should not mark prototypes or variables with \code{SANE\_I18N} +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and +variables (\verb|SANE_I18N(option[7].name)|). + +A correct marked text can look like this:\\ +\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\ +or\\ +\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\ +It also is allowed to mark texts in structs because the +prototype \code{SANE\_I18N} has no effect to the compiler. + +\subsubsection{Which texts shall be marked for translation?} +All option texts that are visible for the user should be marked for +translation. This is: +\begin{itemize} +\item +member \code{title} +\item +member \code{desc} +\item +member \code{string\_list} +\end{itemize} +of \code{SANE\_Option\_Descriptor}. + +It is not allowed to mark/translate member \code{name}. +Please also do not mark any error or debug messages that are +displayed by the backend. + +\subsubsection{File formats and translation functions} +The recommended file formats for translation tables are the \code{po} files +and \code{mo} or \code{gmo} files. +The po file contains the original text marked with the keyword \code{msgid} +and the translated text marked with the keyword \code{msgstr}. +A \code{po} file that contains all needed \code{msgid}s can be created +e.g. by the gnu gettext tool \verb|xgettext| with the option +\verb|-k SANE_I18N|. +The translator adds the translated texts to the \code{po} files. +The gettext tool \code{msgfmt} converts the \code{po} files to the +\code{mo} or \code{gmo} files.\\ + +Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function \code{gettext} +to translate the texts. This e.g. can look like this:\\ +\verb|snprintf(buf, sizeof(buf), gettext("english text"));| + +If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the \code{po} files to create its +own translation tables from it.\\ + +Note that it is strongly recommended to use the gettext tools. +\end{changebar} + + +\section{Operations} + +\subsection{\code{sane\_init}} + +This function must be called before any other SANE function can be called. +The behavior of a SANE backend is undefined if this function is not called +first or if the status code returned by \code{sane\_init} is different from +\code{\defn{SANE\_STATUS\_GOOD}}. The version code of the backend is returned +in the value pointed to by \code{version\_code}. If that pointer is +\code{NULL}, no version code is returned. Argument \code{authorize} is either +a pointer to a function that is invoked when the backend requires +authentication for a specific resource or \code{NULL} if the frontend does not +support authentication. +\begin{quote}\index{sane\_init} +\begin{verbatim} +SANE_Status sane_init (SANE_Int * version_code, + SANE_Authorization_Callback authorize); +\end{verbatim} +\end{quote} + +The authorization function may be called by a backend in response to +any of the following calls: +\begin{quote} + \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start} +\end{quote} +If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +The authentication function type has the following declaration: +\begin{quote}\index{SANE\_Authorization\_Callback} + \index{domain}\index{username}\index{password} +\begin{verbatim} +#define SANE_MAX_USERNAME_LEN 128 +#define SANE_MAX_PASSWORD_LEN 128 + +typedef void (*SANE_Authorization_Callback) + (SANE_String_Const resource, + SANE_Char username[SANE_MAX_USERNAME_LEN], + SANE_Char password[SANE_MAX_PASSWORD_LEN]); +\end{verbatim} +\end{quote} +Three arguments are passed to the authorization function: +\code{resource} is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The \code{username} +and \code{password} arguments are (pointers to) an array of +\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN} +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +{\em must\/} be ASCII-NUL terminated. + +\subsection{\code{sane\_exit}} + +This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to \code{sane\_clo\-se()}, but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than \code{sane\_init()} may be called (regardless +of the status value returned by \code{sane\_exit()}. Neglecting to +call this function may result in some resources not being released +properly. +\begin{quote}\index{sane\_exit} +\begin{verbatim} +void sane_exit (void); +\end{verbatim} +\end{quote} + + +\subsection{\code{sane\_get\_devices}} + +This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a \code{NULL} terminated array of pointers to \verb|SANE_Device| +structures in \code{*device\_list}. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to \code{sane\_exit()} is performed. This +function can be called repeatedly to detect when new devices become +available. If argument \code{local\_only} is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +\begin{quote}\index{sane\_get\_devices} +\begin{verbatim} +SANE_Status sane_get_devices (const SANE_Device *** device_list, + SANE_Bool local_only); +\end{verbatim} +\end{quote} + +This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an +insufficient amount of memory is available. + +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + SANE does not require that this function is called before a + \code{sane\_open()} call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. +\begin{changebar} + The same information about + a device has to be returned when \code{sane\_open} is called. +\end{changebar} +\end{quote} + + +\subsection{\code{sane\_open}} + +This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +\code{name}. If the call completes successfully, a handle for the +device is returned in \code{*h}. +\begin{changebar} +The description of the device +is returned in \code{**device\_description}. This is the +same description that is returned in the list by \code{sane\_get\_devices}. +The returned data \code{*h} and \code{*device\_description} is guaranteed +to remain unchanged and valid until a call to \code{sane\_close()} +is performed. +\end{changebar} +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +\begin{quote}\index{sane\_open} +\begin{verbatim} +SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h, +const SANE_Device ** device_description); +\end{verbatim} +\end{quote} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently + busy (in use by somebody else). +\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_close}} + +This function terminates the association between the device handle +passed in argument \code{h} and the device it represents. If the +device is presently active, a call to \code{sane\_cancel()} is +performed first. After this function returns, handle \code{h} must +not be used anymore. + +\begin{quote}\index{sane\_close} +\begin{verbatim} +void sane_close (SANE_Handle h); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_get\_option\_descriptor}} + +This function is used to access option descriptors. The function +returns the option descriptor for option number \code{n} of the device +represented by handle \code{h}. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle \code{h} (the count +includes option 0). If $n$ is not a valid option index, the function +returns \code{NULL}. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +\begin{quote}\index{sane\_get\_option\_descriptor} +\begin{verbatim} +const SANE_Option_Descriptor * + sane_get_option_descriptor (SANE_Handle h, SANE_Int n); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_control\_option}}\label{sec:control} + +This function is used to set or inquire the current value of option +number \code{n} of the device represented by handle \code{h}. The +manner in which the option is controlled is specified by parameter +\code{a}. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +\code{v}. It is a pointer to the memory that holds the option value. +The memory area pointed to by \code{v} must be big enough to hold the +entire option value (determined by member \code{size} in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument \code{v} may be shorter since the backend will stop +reading the option value upon encountering the first \code{NUL} +terminator in the string. If argument \code{i} is not \code{NULL}, +the value of \code{*i} will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +\begin{quote}\index{sane\_control\_option} +\begin{verbatim} +SANE_Status sane_control_option (SANE_Handle h, SANE_Int n, + SANE_Action a, void *v, + SANE_Int * i); +\end{verbatim} +\end{quote} + +The way the option is affected by a call to this function is +controlled by parameter \code{a} which is a value of type +\code{\defn{SANE\_Action}}. The possible values and their meaning is +described in Table~\ref{tab:actions}. + +\begin{table}[h] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\ + +\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The + option value passed through argument \code{v} may be modified by the + backend if the value cannot be set exactly. \\ + +\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter \code{v} is completely ignored in this case and + may be \code{NULL}. \\ + +\hline + \end{tabular} + \caption{Action Values (\code{SANE\_Action})} + \label{tab:actions} + \end{center} +\end{table} + +After setting a value via an action value of +\verb|SANE_ACTION_SET_VALUE|, additional information on how well the +request has been met is returned in \code{*i} (if \code{i} is +non-\code{NULL}). The returned value is a bitset that may contain any +combination of the values described in Table~\ref{tab:info}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in \code{*i} has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an + option may affect the value or availability of one or more {\em + other\/} options. When this happens, the SANE backend sets this + member in \code{*i} to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may + affect the parameter values (see \code{sane\_get\_parameters()}). + If setting an option affects the parameter values, this member will + be set in \code{*i}. Note that this member may be set even if the + parameters did not actually change. However, it is guaranteed that + the parameters never change without this member being set. \\ + +\hline + \end{tabular} + \caption{Additional Information Returned When Setting an Option} + \label{tab:info} + \end{center} +\end{table} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not + supported for the specified handle and option number. +\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + + +\subsection{\code{sane\_get\_parameters}\label{sec:sanegetparameters}} + +This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (\code{sane\_start()} has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +\code{sane\_start()} gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle \code{h} of the device for which the +parameters should be obtained and a pointer \code{p} to a parameter +structure. The parameter structure is described in more detail below. + +\begin{quote}\index{sane\_get\_parameters} +\begin{verbatim} +SANE_Status sane_get_parameters (SANE_Handle h, + SANE_Parameters * p); +\end{verbatim} +\end{quote} + +The scan parameters are returned in a structure of type +\code{\defn{SANE\_Parameters}}. The C declaration of this structure +is given below. +\begin{changebar} +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Frame format; + SANE_Int flags; + SANE_Int lines; + SANE_Int depth; + SANE_Int pixels_per_line; + SANE_Int bytes_per_line; + SANE_Int channels_per_image; + SANE_String format_desc; + SANE_String proposed_filename; + SANE_Int dpi_x; + SANE_Int dpi_y; + char reserved[32]; /* 32 bytes for future use */ + } +SANE_Parameters; +\end{verbatim} +\end{quote} +\end{changebar} + +\begin{changebar} +Member \code{format} specifies the format of the next frame to be +returned. The possible values for type \code{\defn{SANE\_Frame}} are +described in Table~\ref{tab:frameformat}. The meaning of these +values is described in more detail in Section~\ref{sec:imageformat}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|c|c|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf SANE standard} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\ +\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\ +\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\ +\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\ +\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\ + +\hline + \end{tabular} + \caption{Frame Format (\code{SANE\_Frame})} + \label{tab:frameformat} + \end{center} +\end{table} + +The \code{flags} member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +\begin{itemize} + +\item +\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). Note, that it is possible to transmit +multiple images in succession. + +\item +\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. It is permissible to set that value to 1 "in good +faith", as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer. E.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at \code{sane\_start()}. + +\item +\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +\item +\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tells if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +\end{itemize} + +Note, that \code{flags} is compatible to member \code{last\_frame} of +\code{SANE\_Parameters} of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). + + + +Member \code{lines} specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call \code{sane\_read()} until it +returns a status of \code{SANE\_STATUS\_EOF}. +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. + +Member \code{bytes\_per\_line} specifies the number of bytes that +comprise one scan line. +If \code{bytes\_per\_line} is set to 0, which can currently only be the case for +\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line +length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF} +with an arbitrary block length. + +Member \code{depth} specifies the number of bits per sample. +Note, that only 0 (for not applicable), 1, and n*8 are allowed +values. Data with other depths has to be scaled up accordingly. + +Member \code{pixels\_per\_line} specifies the number of pixels that +comprise one scan line. + +Assume $B$ is the number of channels in the frame, then the bit depth +$d$ (as given by member \code{depth}) and the number of pixels per +line $n$ (as given by this member \code{pixels\_per\_line}) are +related to $c$, the number of bytes per line (as given by member +\code{bytes\_per\_line}) as follows: +\[ + c >= \left\{ + \begin{array}{ll} + \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\ + B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$} + \end{array} + \right. +\] +Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +Member \code{channels\_per\_image} specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +\code{channels\_per\_image} has to be the same for all frames for this image. + +Member \code{format\_desc} is used for the new frametypes +\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs +between the two types: + +\begin{itemize} +\item +\code{SANE\_FRAME\_RAW}: +The \code{format\_desc} contains a description of the channel data and +an optional depth information separated by a colon(:). + +A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}". + +Channel interleaved data is described by a comma separated list of channel descriptions, +for example "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}", +the channel data is sent in the given order. + +The depth information does {\bf not} define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member \code{depth}. + +Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be \code{infrared} or +a wavelength description like \code{1100nm}, but be aware that a +frontend may not be able to display such channels with useful colors. + +Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member \code{channels\_per\_image}. + +\item +\code{SANE\_FRAME\_MIME}: +The \code{format\_desc} contains the MIME type/subtype *(;parameter) +fields as described in RFC 1521, 4. The Content-Type header field, +without the prefixing "Content-Type:". +Note, that it is discouraged to transfer proprietary file formats over +SANE. If at all possible, please stick to the IANA assigned MIME types, +and make sure the data stream is compliant with the corresponding +specification. +When data is transmitted with the frame type \code{SANE\_FRAME\_MIME} +all data has to be transmitted within one frame, multiple frames +are not allowed (so the flag \code{last\_frame} has to be set +when using this frame type). +A fully compliant SANE backend is required to transmit in either +SANE native frametypes, or in a MIME type, for which a converting +meta backend exists and is freely available for all platforms. + +Other formats may be transmitted, but the only thing the average +frontend can do with them, is save them. This is not considered a +good option, as it does not facilitate transmitting the data to a +client application that may be running the frontend. +However, if the data transferred by the backend is not an image in +nature, it wouldn't make sense to try converting it anyway, so it is +acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that +case. But even then, try to stick to well known stuff with freely +existing standards and viewers as well. +\end{itemize} + +The member \code{proposed\_filename} can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to "". + +In the case of raw frames, \code{proposed\_filename} is expected to hold +the basename for the image, with the extension determined by the save function +of the frontend, as the frontend can fully understand the data and is thus +able to encode it in any format it wishes. + +For MIME frames \code{proposed\_filename} can contain either: + +\begin{itemize} +\item +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +\item +A complete filename, including extension. +\end{itemize} + +Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +In any case, if the frontend makes use of this field, the frontend +must mangle this proposal or the final filename it produces with +its help to suit local filesystem restrictions. + +Special care should be taken not to cause security flaws this way. +For Unix, that means killing out all path separators (/) [to avoid +to save away stuff in obscure places or create critical files like +/etc/hosts.allow] and avoiding to overwrite existing files. +(Creating of leading dot files - like .rhosts - is not an issue here, +because that's only a proposed filename extension as mentioned above. + +The string \code{proposed\_comment} can be used to transmit additional +image data, that can be stored in the comment areas several fileformats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. + +The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different +resolutions of each image. It is not permissible to change resolution +between frames of the same image. + +The member \code{reserved} is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. +\end{changebar} + + +\subsection{\code{sane\_start}} + +This function initiates aquisition of an image from the device +represented by handle \code{h}. +\begin{quote}\index{sane\_start} +\begin{verbatim} +SANE_Status sane_start (SANE_Handle h); +\end{verbatim} +\end{quote} +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The + operation should be retried later. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_INVAL}:] The scan cannot be started with the current + set of options. The frontend should reload the option descriptors, as if + \code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} had been returned from a call to + \code{sane\_control\_option()}, since the device's capabilities may have + changed. +\end{description} +\end{quote} + + +\subsection{\code{sane\_read}} + +This function is used to read image data from the device represented +by handle \code{h}. Argument \code{buf} is a pointer to a memory area +that is at least \code{maxlen} bytes long. The number of bytes +returned is stored in \code{*len}. A backend must set this to zero +when a status other than \code{SANE\_STA\-TUS\_GOOD} is returned). +When the call succeeds, the number of bytes returned can be anywhere in +the range from 0 to \code{maxlen} bytes. +\begin{quote}\index{sane\_read} +\begin{verbatim} +SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf, + SANE_Int maxlen, SANE_Int * len); +\end{verbatim} +\end{quote} +For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle \code{h}. +\begin{enumerate} +\item If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +\item If the device is in non-blocking I/O mode, the call returns + immediately with status \code{SANE\_STA\-TUS\_GOOD} and with + \code{*len} set to zero. +\end{enumerate} +The I/O mode of handle \code{h} can be set via a call to +\code{sane\_set\_io\_mode()}. + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the + current frame. If \code{sane\_read} sends back any image data it +is not allowed to return with \code{SANE\_STATUS\_EOF}. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_cancel}} + +This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +\code{h}. +\begin{quote}\index{sane\_cancel} +\begin{verbatim} +void sane_cancel (SANE_Handle h); +\end{verbatim} +\end{quote} +This function can be called at any time (as long as handle \code{h} is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does {\em not\/} imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been {\em initiated}. Cancellation +completes only when the cancelled call returns (typically with a +status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must {\em not\/} call any other operation until the +cancelled operation has returned. + + +\subsection{\code{sane\_set\_io\_mode}} + +This function is used to set the I/O mode of handle \code{h}. The I/O mode +can be either blocking or non-blocking. If argument \code{m} is +\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise it's set to +blocking mode. This function can be called only after a call to +\code{sane\_start()} has been performed. +\begin{quote}\index{sane\_set\_io\_mode} +\begin{verbatim} +SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m); +\end{verbatim} +\end{quote} +By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete +successfully. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support +the requested I/O mode. +\end{description} +\end{quote} + + +\subsection{\code{sane\_get\_select\_fd}} + +This function is used to obtain a (platform-specific) file-descriptor +for handle \code{h} that is readable if and only if image data is +available (i.e., when a call to \code{sane\_read()} will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in \code{*fd}. +\begin{quote}\index{sane\_get\_select\_fd} +\begin{verbatim} +SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd); +\end{verbatim} +\end{quote} +This function can be called only after a call to \code{sane\_start()} +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until \code{sane\_cancel()} or \code{sane\_start()} get called again +or until \code{sane\_read()} returns with status +\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call \code{sane\_read()}. + +A backend may elect not to support this operation. In such a case, +the function returns with status code +\code{SANE\_STATUS\_UNSUPPORTED}. + +Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using \code{select()} +or \code{poll()} under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to \code{sane\_read()} is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_strstatus}} + +This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return \code{NULL}. +The returned pointer is valid at least until the next call to this +function is performed. +\begin{quote}\index{sane\_strstatus} +\begin{verbatim} +const SANE_String_Const sane_strstatus (SANE_Status status); +\end{verbatim} +\end{quote} + +\section{Code Flow}\index{code flow} + +The code flow for the SANE API is illustrated in +Figure~\ref{fig:flow}. Functions \code{sane\_init()} and +\code{sane\_exit()} initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +\begin{figure}[htb] + \begin{center} + \leavevmode + \psfig{file=figs/flow.eps,height=0.5\textheight} + \caption{Code flow} + \label{fig:flow} + \end{center} +\end{figure} + +Function \code{sane\_get\_devices()} can be called any time after +\code{sane\_init()} has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +Once a device has been chosen, it is opened using a call to +\code{sane\_open()}. Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +An opened device can be setup through the corresponding device handle +using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and +\code{sane\_control\_option()}. While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. However, as options are set, other options +may become active or inactive. Thus, after setting an option, it +may be necessary to re-read some or all option descriptors. While +setting up the device, it is also admissible to call +\code{sane\_get\_parameters()} to get an estimate of what the image +parameters will look like once image acquisition begins. + +The device handle can be put in blocking or non-blocking mode by a +call to \code{sane\_set\_io\_mode()}. Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +After the device is setup properly, image acquisition can be started +by a call to \code{sane\_start()}. The backend calculates the exact +image parameters at this point. So future calls to +\code{sane\_get\_parameters()} will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to \code{sane\_read()} is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +\begin{changebar} +Image data is collected by repeatedly calling \code{sane\_read()} +until this function will return an end-of-file status +(\code{SANE\_STATUS\_EOF}). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels of a red/green/blue image or multiple images), +it can call \code{sane\_start()} again. +If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the +current image is complete. In this case, it should be tested, if +\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set. +If yes, further calls to \code{sane\_start()} can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on +and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other +than \code{SANE\_STATUS\_EOF} occurs in a SANE function. +Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend +to indicate the end of a multiple image scan. + +A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling \code{sane\_start} again, which will get +you to the next frame, without having to read and discard the current one. + +In order to prematurely stop scanning and to reset the backend state, +\code{sane\_cancel()} can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. + +When done using the device, the handle should be closed by a call to +\code{sane\_close()}. Finally, before exiting the application, +function \code{sane\_exit()} must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +The following C sample code implements a reference loop for acquiring +multiple images: + +\begin{verbatim} +SANE_Parameters parms; +SANE_Status status; + +do +{ + do + { + /* Now start acquiring the next frame. */ + status=sane_start(handle); + + /* if that failed, we have a problem, and no more frames can be + * read at this time. Due to SANE_PFLAG_MORE_IMAGES still + * being clear, this will break out of _BOTH_ loops. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now let us see what the next frame brings. */ + status=sane_get_parameters(handle,&parms); + + /* This actually should not fail, but maybe the doc feeder + * jammed or something, so we break as well, if something + * is wrong. + */ + if (status != SANE_STATUS_GOOD) break; + + /* Now we check the announced parameters, if we can make use + * of the frame data. If not, we skip over to the next frame. + */ + if ( do_i_like_that(&parms) == NO ) continue; + + /* Set up for reading the data here. Mangle filenames, + * allocate memory, rewind multiframe files, ask user + * for confirmation, ... + */ + setup_for_transfer(...); + + /* Now we read in the frame data and process it. This should + * return SANE_STATUS_GOOD, until the frame is complete, + * what causes SANE_STATUS_EOF to be returned. + */ + while( SANE_STATUS_GOOD == ( status=sane_read(...) ) ) + read_in_and_process_data_as_required(); + + /* If transfer was broken due to anything but EOF, break out. */ + if (status != SANE_STATUS_EOF) { + break; + } + + /* Now loop until we have all frames of an image. */ + } while(!(parms.flag & SANE_PFLAG_LAST_FRAME)); + +/* O.K. - we now have a complete image. Fit it together, save it, + * flush buffers, transmit it, increment filenames, etc. + */ + +/* Now check for more pending images. If we have more, redo from start. + * Some backends might cheat here and send us for an extra round which + * will fail at sane_start, as they were not able to determine if they + * would have more data at the start of the last frame we read. + */ +} while(parms.flags & SANE_PFLAG_MORE_IMAGES); + +/* No more data. Fine. Reset the backend and go back to option-control + * loop. + */ + +sane_cancel(handle); +\end{verbatim} + +\end{changebar} + + +\section{Well-Known Options}\index{well-known options} + +While most backend options are completely self-describing, there are +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +\subsection{Option Number Count}\index{option count} + +Option number 0 has an empty string as its name. The value of this +option is of type \code{SANE\_TYPE\_INT} and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a +frontend can directly read out the value of option number 0. + +\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option} + +\begin{changebar} +Option \code{resolution} is used to select the resolution at which an +image should be acquired. When the backend wants to allow different +values for x- and y-resolution it has to define the options +\code{x\_resolution} and \code{y\_resolution}. Note that only +the option \code{resolution} {\bf or} the options +\code{x\_resolution} {\bf and} \code{y\_resolution} may be active. + +The type of this option is either \code{SANE\_TYPE\_INT} or +\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\subsection{Preview Mode Option}\index{preview mode} + +The boolean option \code{preview} is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to \code{SANE\_TRUE}, +preview mode is in effect, when set to \code{SANE\_FALSE} image +acquisition should proceed in normal quality mode. The setting of +this option \emph{must not\/} affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option \code{resolution}). A backend is free to override the +\code{resolution} value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. +\begin{changebar} +When the \code{preview} option is set the backend should transfer +the image in frame type \code{SANE\_FRAME\_RAW} if possible. +\end{changebar} + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +\subsection{Scan Area Options}\index{scan area options} + +The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure~\ref{fig:area}. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the {\em smallest} and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the {\em largest}. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +\begin{figure}[tbp] + \begin{center} + \leavevmode + \psfig{file=figs/area.eps,height=0.3\textheight} + \caption{Scan area options} + \label{fig:area} + \end{center} +\end{figure} + +The names of the four options that define the scan area are given in +the table below: +\begin{center} +\begin{tabular}{ll} +{\bf Name} & {\bf Description} \\ +\code{\defn{tl-x}} & Top-left $x$ coordinate value \\ +\code{\defn{tl-y}} & Top-left $y$ coordinate value \\ +\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\ +\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\ +\end{tabular} +\end{center} +There are several rules that should be followed by front and backends +regarding these options: +\begin{itemize} + +\item Backends must attach a unit of either pixels + (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to + these options. The unit of all four options must be identical. + +\item Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +\item A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +\item A frontend must work properly with any or all of these options + missing. + +\begin{changebar} +\item A frontend may temporarily set the values in a way that +\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than +\code{br-y}. +\end{changebar} + +\end{itemize} + +\subsection{Depth option}\index{bit depth option} +\begin{changebar} +Option \code{depth} is used to select the image depth in bits/sample +in multi bit mode - (this means for 24 bit RGB mode this value must be 8). +The type of this option is \code{SANE\_TYPE\_INT}. +The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option \code{mode}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Gamma table options}\index{gamma table options} +\begin{changebar} +The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE} +of the type \code{SANE\_TYPE\_INT} which represents the gamma correction +table for gray. In color mode the \code{gamma-table} may be used to set +a common gamma correction for red, green and blue. The options +\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table} +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +\code{gamma-table} option, only the \code{red-}, \code{green-} and +\code{blue-gamma-table} or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +\begin{verbatim} +red_value = gamma-table(red-gamma-table(value)) +green_value = gamma-table(green-gamma-table(value)) +blue_value = gamma-table(blue-gamma-table(value)) +\end{verbatim} + +The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog\_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Mode options}\index{mode options} +\begin{changebar} +The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: \code{Color}, \code{Gray}, \code{Halftone} +and \code{Lineart}. \code{Color} and \code{Gray} are multi bit +modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart} +are single bit modes.\\ +This way a frontend can select e.g the mode \code{Gray} +for scanning a fax.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + +\subsection{Scan Source options}\index{source options} +\begin{changebar} +The option \code{source} is used to select the scan source +(e.g. Automatic Document Feeder). +It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and +\code{Automatic Document Feeder}.\\ + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Threshold}\index{threshold option} +\begin{changebar} +The option \code{threshold} is used to define the threshold +for Lineart and maybe Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It defines the minimum intensity to get a white point / full intensity +(image data bit = 0). The backend has to +scale the values in the following way:\\ +A value of 0.0 means all pixels get white /full intensity (all image data +bits are 0). A value of 50.0 means intensities brighter than medium gray +get white / full intensity (bit 0). A value of 100.0 means all pixels get +black (all image data bits are 1). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Analog gamma}\index{analog gamma option} +\begin{changebar} +The option \code{analog-gamma} is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_NONE}. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options \code{analog-gamma-red}, +\code{analog-gamma-green} and \code{analog-gamma-blue}. +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect on the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Shadow}\index{shadow options} +\begin{changebar} +The option \code{shadow} is used to define the shadow level / black point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). The backend has to scale the values in the following way:\\ +A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{shadow-red}, \code{shadow-green} +and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Highlight}\index{hightlight options} +\begin{changebar} +The option \code{highlight} is used to define the highlight level / white point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). The backend has to scale the values in the +following way:\\ +A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{highlight-red}, \code{highlight-green} +and \code{highlight-blue}, in this case \code{highlight} has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option} +\begin{changebar} +The option \code{lamp-on} is used to turn the lamp of the scanner on. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned on. + +The option \code{lamp-off} is used to turn the lamp of the scanner off. +The type of this option is \code{SANE\_TYPE\_BUTTON}. +The unit is \code{SANE\_UNIT\_NONE}. When the option is set +then the lamp of the scanner is turned off. + +These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition.\\ +\end{changebar} + + +\subsection{Scanner buttons}\index{scanner button options} +\begin{changebar} +Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image.\\ + +A backend that does make available the scanner-buttons has to +implement the following options:\\ +\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\ +\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\ +\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\ +When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS} +or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined. + +A frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +\begin{itemize} + +\item +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +\code{scanner-buttons-lock} to \code{SANE\_TRUE}. +While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE} +the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + + \begin{itemize} + \item + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \item + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \end{itemize} + +\item +The frontend does read the value of option \code{scanner-buttons-lock}. If +it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons. +If it is \code{SANE\_FALSE} then access has been denied. + +\item +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): + \begin{itemize} + \item + The frontend does set option \code{scanner-buttons-status-update}. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option \code{scanner-buttons-status}, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immedeatly and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE} + and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the \code{scanner-buttons-status} to 0. + + \item + The frontend does read the value of option \code{scanner-buttons-status} + \end{itemize} + +\item +When the frontend does exit or it does not want to use the buttons +it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of \code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\code{sane\_close()} should do the same as setting option +\code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\end{itemize} +\end{changebar} + + + +\input{net.tex} + +\chapter{Contact Information}\label{chap:contact} + +The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +\begin{quote}\index{mailing list} +\begin{verbatim} +majordomo@mostang.com +\end{verbatim} +\end{quote} +To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the +above address. + +A complete list of commands supported can be obtained by sending a +mail with a subject of ``\code{help}'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +\begin{quote} +\url{http://www.mostang.com/sane/} +\end{quote} + +\newpage +\input{sane.ind} + +\end{document} diff --git a/sane2/0.08/doc000.html b/sane2/0.08/doc000.html new file mode 100644 index 00000000..644c2e05 --- /dev/null +++ b/sane2/0.08/doc000.html @@ -0,0 +1,132 @@ + +Next +Previous +Previous +Contents +Index +


+Contents +

Contents

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1 Preface
1.1 About This Document
1.1.1 Typographic Conventions
2 Introduction
2.1 Terminology
3 The SANE Environment
3.1 Attaching to a SANE backend
3.2 Image Data Format
3.2.1 Pixel oriented frames
3.2.2 Arbitrary data frames
4 The SANE Application Programmer Interface (API)
4.1 Version Control
4.2 Data Types
4.2.1 Base Types
4.2.2 Boolean Type
4.2.3 Integer Type
4.2.4 Fixed-point Type
4.2.5 Text
4.2.5.1 Character Type
4.2.5.2 String Type
4.2.6 Scanner Handle Type
4.2.7 Status Type
4.2.8 Device Descriptor Type
4.2.9 Option Descriptor Type
4.2.9.1 Option Name
4.2.9.2 Option Title
4.2.9.3 Option Description
4.2.9.4 Option Value Type
4.2.9.5 Option Value Unit
4.2.9.6 Option Value Size
4.2.9.7 Option Capabilities
4.2.9.8 Option Value Constraints
4.2.10 Internationalization
4.2.10.1 How is a text marked for translation
4.2.10.2 Which texts shall be marked for translation?
4.2.10.3 File formats and translation functions
4.3 Operations
4.3.1 sane_init
4.3.2 sane_exit
4.3.3 sane_get_devices
4.3.4 sane_open
4.3.5 sane_close
4.3.6 sane_get_option_descriptor
4.3.7 sane_control_option
4.3.8 sane_get_parameters
4.3.9 sane_start
4.3.10 sane_read
4.3.11 sane_cancel
4.3.12 sane_set_io_mode
4.3.13 sane_get_select_fd
4.3.14 sane_strstatus
4.4 Code Flow
4.5 Well-Known Options
4.5.1 Option Number Count
4.5.2 Scan Resolution Options
4.5.3 Preview Mode Option
4.5.4 Scan Area Options
4.5.5 Depth Option
4.5.6 Scan Mode Options
4.5.7 Scan Source Options
4.5.8 Threshold Option
4.5.9 Gamma Table Options
4.5.10 Analog Gamma
4.5.11 Shadow Option
4.5.12 Highlight Option
4.5.13 Lamp Options
4.5.14 Scanner Button Options
4.5.15 Batch Scan Options
5 Network Protocol
5.1 Data Type Encoding
5.1.1 Primitive Data Types
5.1.2 Type Constructors
5.2 Remote Procedure Call Requests
5.2.1 SANE_NET_INIT
5.2.2 SANE_NET_GET_DEVICES
5.2.3 SANE_NET_OPEN
5.2.4 SANE_NET_CLOSE
5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS
5.2.6 SANE_NET_CONTROL_OPTION
5.2.7 SANE_NET_GET_PARAMETERS
5.2.8 SANE_NET_START
5.2.9 SANE_NET_CANCEL
5.2.10 SANE_NET_AUTHORIZE
5.2.11 SANE_NET_EXIT
6 Contact Information
+ +

List of Figures

+ + + + + + + +
1Example SANE Hiearchy
2Transfer order of image data bytes
3Bit and byte order of image data
4Code flow
5Scan area options
+ + + +

List of Tables

+ + + + + + + + + + + +
1Status Codes
2Predefined Device Information Strings
3Option Value Types (SANE_Value_Type)
4Physical Units (SANE_Unit)
5Option Capabilities
6Option Value Constraints
7Action Values (SANE_Action)
8Additional Information Returned When Setting an Option
9Frame Format (SANE_Frame)
+ +


+Next +Previous +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc001.html b/sane2/0.08/doc001.html new file mode 100644 index 00000000..4c024a9b --- /dev/null +++ b/sane2/0.08/doc001.html @@ -0,0 +1,63 @@ + +Next +Up +Previous +Contents +Index +
+./sane + + + + +

+ + + + + + + +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ +

SANE Standard Version 2.0 proposal 0.08 - rauch/beck

+
+
Dec 8, 2002
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc002.html b/sane2/0.08/doc002.html new file mode 100644 index 00000000..fb16c3d7 --- /dev/null +++ b/sane2/0.08/doc002.html @@ -0,0 +1,31 @@ + +Next +Up +Previous +Contents +Index +
+ +Preface +

1 Preface

+ +

The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +6. + +

The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + +

1.1 About This Document


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc003.html b/sane2/0.08/doc003.html new file mode 100644 index 00000000..c6872c9c --- /dev/null +++ b/sane2/0.08/doc003.html @@ -0,0 +1,46 @@ + +Next +Up +Previous +Contents +Index +
+ +About This Document +

1.1 About This Document

+ +

This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +

The remainder of this document is organized as follows. +Chapter 2 provides introductional material. +Chapter 3 presents the environment SANE is designed +for. Chapter 4 details the SANE Application Programmer +Interface. Chapter 5 specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter 6 gives information on how +to join the SANE development process. + +

1.1.1 Typographic Conventions

+ +

Changes since the last revision of this document are highlighted +like this: + +

+ Paragraphs that changed since the last revision of the documention + are marked like this paragraph. + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc004.html b/sane2/0.08/doc004.html new file mode 100644 index 00000000..132e99aa --- /dev/null +++ b/sane2/0.08/doc004.html @@ -0,0 +1,38 @@ + +Next +Up +Previous +Contents +Index +
+ +Introduction +

2 Introduction

+ +

SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +

SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +

2.1 Terminology


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc005.html b/sane2/0.08/doc005.html new file mode 100644 index 00000000..1fbad177 --- /dev/null +++ b/sane2/0.08/doc005.html @@ -0,0 +1,24 @@ + +Next +Up +Previous +Contents +Index +
+ +Terminology +

2.1 Terminology

+ +

An application that uses the SANE interface is called a SANE + frontend. A driver that implements the SANE interface is called a +SANE backend. A meta backend provides some means to +manage one or more other backends. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc006.html b/sane2/0.08/doc006.html new file mode 100644 index 00000000..86d60331 --- /dev/null +++ b/sane2/0.08/doc006.html @@ -0,0 +1,41 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Environment +

3 The SANE Environment

+ +

SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +

Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE option. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +brightness whose value is an integer in the range from 0 to +255. + +

With self-describing options, a backend need not be concerned with +presentation issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the meaning of each option. It simply provides +means to present and alter the options defined by the backend. + +

3.1 Attaching to a SANE backend

3.2 Image Data Format


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc007.html b/sane2/0.08/doc007.html new file mode 100644 index 00000000..d088ed3d --- /dev/null +++ b/sane2/0.08/doc007.html @@ -0,0 +1,104 @@ + +Next +Up +Previous +Contents +Index +
+ +Attaching to a SANE backend +

3.1 Attaching to a SANE backend

+ +

The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +

    + +

  • Static linking: A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called be + would normally export a function called sane_read(). If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend be include a + header file that has lines of the form: +
    +
    +#define sane_read be_sane_read
    +
    +
    + With definitions of this kind, backend be will export + function name be_sane_read(). Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +

  • Dynamic linking: A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix sane_), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + +

    More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends on demand. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +

  • Network connection: Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +

+ +

+

+ + +

Figure 1: Example SANE Hiearchy
+ +
+

+ +

The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure 1. The figure shows that machine +A uses a dynamic-linking based meta backend called dll to +access the backends called pnm, mustek, and net. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called saned. The saned in +turn has access to the hp and autolum backends through +another instance of the dll backend. The autolum meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called qcam. + +

Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc008.html b/sane2/0.08/doc008.html new file mode 100644 index 00000000..293501f9 --- /dev/null +++ b/sane2/0.08/doc008.html @@ -0,0 +1,155 @@ + +Next +Up +Previous +Contents +Index +
+ +Image Data Format +

3.2 Image Data Format

+ +

Arguably the most important aspect of an image acquisition system is how +images are represented. The SANE approach is to define a simple yet powerful +representation that is sufficient for vast majority of applications and +devices. While the representation is simple, the interface has been defined +carefully to allow extending it in the future without breaking backwards +compatibility. Thus, it will be possible to accommodate future applications or +devices that were not anticipated at the time this standard was created. + +

A SANE image is a rectangular area. The rectangular area is subdivided into a +number of rows and columns. At the intersection of each row and column is a +(preferable quadratic) pixel. A pixel consists of one or more sample values. +Each sample value represents one channel (e.g., the red channel). + +

The SANE API transmits an image as a sequence of frames. Each frame covers +the same rectangular area as the entire image, but may contain only a subset +of the channels in the final image. For example, a red/green/blue image could +either be transmitted as a single frame that contains the sample values for +all three channels or it could be transmitted as a sequence of three frames: +the first frame containing the red channel, the second the green channel, and +the third the blue channel. + +

When transmitting an image frame by frame, the frontend needs to know what +part of the image a frame represents (and how many frames it should expect). +For that purpose, the SANE API tags every frame with a type and a format +descriptor. + +

+ There are two different types of frames: pixel oriented frames + SANE_FRAME_RAW and arbitrary data frames + SANE_FRAME_MIME. These types are discussed in detail in the + following sections. The frame types used by the previous version 1 of this + standard (SANE_FRAME_GRAY, SANE_FRAME_RGB, + SANE_FRAME_RED, SANE_FRAME_GREEN, and + SANE_FRAME_BLUE) are obsolete and superseded by + SANE_FRAME_RAW. + +

3.2.1 Pixel oriented frames

+ +

The type of pixel oriented frames is SANE_FRAME_RAW. The + frame contains one or more channels of data in a channel-interleaved format, + that represents sample values from a property of the individual pixels that + is subject to further description in the format_desc member of the + SANE_Parameters structured type. See section 4.3.8 + on page 4.3.8 for details about the format + descriptions. + + +

Each sample value has a certain bit depth. The bit depth is fixed for the + entire image and can be as small as one bit. Valid bit depths are 1, 8, or + 16 bits per sample. If a device's natural bit depth is something else, it is + up to the driver to scale the sample values appropriately (e.g., a 4 bit + sample could be scaled by a factor of four to represent a sample value of + depth 8). + +

+ The complete image may consist of several different channels. The number of channels + is defined by member channels_per_image of SANE_Parameters. + The image may be transmitted in an arbitrary number of frames which can be + determined by watching the SANE_PFLAG_LAST_FRAME flag in said type (or by + counting the channels). Note: This frame type replaces all frame types of + the SANE standard version 1. + + +

Conceptually, each pixel oriented frame is transmitted a byte at a time. Each +byte may contain 8 sample values (for an image bit depth of 1), one full +sample value (for an image bit depth of 8), or a partial sample value (for an +image bit depth of 16 or bigger). In the latter case, the bytes of each +sample value are transmitted in the machine's native byte order. +

+
+ Backend Implementation Note +
+ A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +
+ +

+

+ + +

Figure 2: Transfer order of image data bytes
+ +
+

+ +

The order in which the sample values in a frame are transmitted is illustrated +in Figure 2. As can be seen, the values are transmitted row by +row and each row is transmitted from left-most to right-most column. The +left-to-right, top-to-bottom transmission order applies when the image is +viewed in its normal orientation (as it would be displayed on a screen, for +example). + +

If a frame contains multiple channels, then the channels are transmitted in an +interleaved fashion. Figure 3 illustrates this for the case +where a frame contains a complete red/green/blue image with a bit-depth of 8. + +

+

+ + +

Figure 3: Bit and byte order of image data
+ +
+

+ +

For a bit depth of 1, each byte contains 8 sample values of a single +channel. In other words, a bit depth 1 frame is transmitted in a byte +interleaved fashion. The first sample of each byte is represented by the most +significant bit. + +

+For gray channels at a bit depth of 1 only two sample values are possible: 1 +represents minimum intensity (black) and 0 represents maximum intensity +(white). For all other channel types and bit depths a sample value of 0 +represents minimum intensity and larger values represent increasing intensity. + +

3.2.2 Arbitrary data frames

+ +

It also is possible to transmit arbitrary (not necessaryly pixel oriented) +data. This allows transmission of compressed images like jpeg, tiff, etc. + +

The type of arbitrary data frames is SANE_FRAME_MIME. +The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is +given in the format_desc member of the SANE_Parameters +structured type (see section 4.3.8 on +page 4.3.8). As such, it is assumed to be +incomprehensible to the frontend, except for selected types the frontend is +specifically capable of handling internally. The frontend is free to ignore +those frames, or employ any appropriate means to otherwise handle this data +(like saving them to disk or spawning an external viewer). + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc009.html b/sane2/0.08/doc009.html new file mode 100644 index 00000000..43cd21b4 --- /dev/null +++ b/sane2/0.08/doc009.html @@ -0,0 +1,32 @@ + +Next +Up +Previous +Contents +Index +
+ +The SANE Application Programmer Interface (API) +

4 The SANE Application Programmer Interface (API)

+ +

+This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called sane/sane-2.h. This file should +normally be included via a C pre-processor directive of the form: +

+  #include <sane/sane-2.h>
+
+ + +

4.1 Version Control

4.2 Data Types

4.3 Operations

4.4 Code Flow

4.5 Well-Known Options


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc010.html b/sane2/0.08/doc010.html new file mode 100644 index 00000000..8bb6685b --- /dev/null +++ b/sane2/0.08/doc010.html @@ -0,0 +1,77 @@ + +Next +Up +Previous +Contents +Index +
+ +Version Control +

4.1 Version Control

+ +

The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +

SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +

The SANE API provides the following five macros to manage version +numbers. +

+
+
SANE_CURRENT_MAJOR:
The value of this macro is the + number of the SANE standard that the interface implements. + +

SANE_VERSION_CODE(maj,min,bld):
+ + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (maj), the minor version number min, + and the build revision of a backend (bld). The major and + minor version numbers must be in the range 0...255 and the + build revision must be in the range 0...65535. + +

Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + +

Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + +

SANE_VERSION_MAJOR(vc):
This macro returns the + major version number component of the version code passed in + argument vc. +
SANE_VERSION_MINOR(vc):
This macro returns the + minor version number component of the version code passed in + argument vc. +
SANE_VERSION_BUILD(vc):
This macro returns the + build revision component of the version code passed in argument + vc. +
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc011.html b/sane2/0.08/doc011.html new file mode 100644 index 00000000..9576b8f8 --- /dev/null +++ b/sane2/0.08/doc011.html @@ -0,0 +1,1039 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Types +

4.2 Data Types

+ +

4.2.1 Base Types

+ +

The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +

+ typedef some-scalar-type SANE_Byte;
+ typedef some-scalar-type SANE_Word
; +
+SANE_Byte must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. SANE_Word must be +capable of holding any of the following: +
    +
  • the truth values SANE_FALSE and SANE_TRUE +
  • signed integers in the range -231...231-1 +
  • fixed point values in the range -32768...32767.9999 with + a resolution of 1/65536 +
  • 32 bits (for bit sets) +
+Note that the SANE standard does not define what C type +SANE_Byte and SANE_Word map to. For example, on some +platforms, the latter may map to long int whereas on others it +may map to int. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +

4.2.2 Boolean Type

+ +

SANE_Bool is used for variables that can take one of +the two truth values SANE_FALSE and +SANE_TRUE. The former value is defined to be 0, +whereas the latter is 1.1 The C +declarations for this type are given below. +

+
+#define SANE_FALSE      0
+#define SANE_TRUE       1
+typedef SANE_Word SANE_Bool;
+
+
+Note that SANE_Bool is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Bool whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +

4.2.3 Integer Type

+ +

SANE_Int is used for variables that can take integer +values in the range -232 to 231-1. Its C declaration is +given below. +

+
+typedef SANE_Word SANE_Int;
+
+
+Note that SANE_Int is simply an alias of SANE_Word. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Int whenever a given variable or formal argument has a +fixed interpretation as an integer object. + +

4.2.4 Fixed-point Type

+ +

SANE_Fixed is used for variables that can take fixed +point values in the range -32768 to 32767.9999 with a resolution +of 1/65535. The C declarations relating to this type are given +below. +

+
+#define SANE_FIXED_SCALE_SHIFT  16
+typedef SANE_Word SANE_Fixed;
+
+
+The macro SANE_FIXED_SCALE_SHIFT gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of 1/65536. + +

Note that SANE_Fixed is simply an alias of SANE_Word. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +SANE_Fixed whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +

For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +

+
+ +

SANE_FIX(d):
Returns the largest SANE + fixed-point value that is smaller than the double value d. + No range checking is performed. If the value of d is out of + range, the result is undefined. + +

SANE_UNFIX(w):
Returns the nearest + double machine number that corresponds to fixed-point value + w. + +

+
+SANE does not require that the following two expressions hold +true (even if the values of w and d are in range): +
+
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+
+
+In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + +

4.2.5 Text

+ +

4.2.5.1 Character Type

+ +

Type SANE_Char represents a single text character or +symbol. At present, this type maps directly to the underlying C +char type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +sizeof(SANE_Char)==sizeof(char). +

+
+typedef char SANE_Char;
+
+
+ +

4.2.5.2 String Type

+ +

Type SANE_String represents a text string as a sequence +of C char values. The end of the sequence is indicated by a +'\0' (NUL) character. +

+
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+
+
+The type SANE_String_Const is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +
+
+const SANE_String str;
+
+
+declares a string pointer that is constant (not a string pointer that +points to a constant value). + +

4.2.6 Scanner Handle Type

+ +

Access to a scanner is provided through an opaque type called +SANE_Handle. The C declaration of this type is given +below. +

+
+typedef void *SANE_Handle;
+
+
+While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a SANE_Handle. In +particular, SANE does not require that a value of this type is a legal +pointer value. + +

4.2.7 Status Type

+ +

Most SANE operations return a value of type SANE_Status +to indicate whether the completion status of the operation. If an +operation completes successfully, SANE_STATUS_GOOD is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table 1. It is recommended to use function +sane_strstatus() to convert status codes into a legible +string. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +SANE_STATUS_GOOD + 0 Operation completed succesfully.
+SANE_STATUS_UNSUPPORTED + 1 Operation is not supported.
+SANE_STATUS_CANCELLED + 2 Operation was cancelled.
+SANE_STATUS_DEVICE_BUSY + 3 Device is busy---retry later.
+SANE_STATUS_INVAL + 4 Data or argument is invalid.
+SANE_STATUS_EOF + 5 No more data available (end-of-file).
+SANE_STATUS_JAMMED + 6 Document feeder jammed.
+SANE_STATUS_NO_DOCS + 7 Document feeder out of documents.
+SANE_STATUS_COVER_OPEN + 8 Scanner cover is open.
+SANE_STATUS_IO_ERROR + 9 Error during device I/O.
+SANE_STATUS_NO_MEM + 10 Out of memory.
+SANE_STATUS_ACCESS_DENIED + 11 Access to resource has been denied.
+ +
+

Table 1: Status Codes
+
+

+ +

4.2.8 Device Descriptor Type

+ + +

Each SANE device is represented by a structure of type +SANE_Device. The C declaration of this type is given +below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const vendor;
+    SANE_String_Const model;
+    SANE_String_Const type;
+    SANE_String_Const email_backend_author;
+    SANE_String_Const backend_website;
+    SANE_String_Const device_location;
+    SANE_String_Const comment;
+    SANE_String_Const reserved_string;
+    SANE_Int backend_version_code;
+    SANE_Int backend_capablity_flags;
+    SANE_Int reserved_int;
+  }
+SANE_Device;
+
+
+
+ +The structure provides the unique name of the scanner in member +name. It is this unique name that should be passed in a call +to sane_open(). The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is recommended that backends keep +unique names below 32 characters in length. However, applications +must be able to cope with arbitrary length unique names. + +

The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members vendor, model, and type are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vendor Strings
+ + AGFA Microtek
+ Abaton Minolta
+ Acer Mustek
+ Apple NEC
+ Artec Nikon
+ Avision Plustek
+ CANON Polaroid
+ Connectix Ricoh
+ Epson Sharp
+ Fujitsu Siemens
+ Hewlett-Packard Tamarack
+ IBM UMAX
+ Kodak Noname
+ Logitech
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Type Strings
+ + film scanner
+ flatbed scanner
+ frame grabber
+ handheld scanner
+ multi-function peripheral
+ sheetfed scanner
+ still camera
+ video camera
+ virtual device
+ +
+ +

Table 2: Predefined Device Information Strings
+ +
+

+Note that vendor string Noname can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +

+The backend has to set up the string email_backend_author +with the name and the email address of the backend author or a contact person +in the format: +

+Firstname Lastname <name@domain.org>
+
+ +

The string backend_website should be set up by the backend +with the website or ftp address of the backend in the format: +

+http://www.domain.org/sane-hello/index.html
+
+ +

The backend should fill the string device_location with a +text that describes where a user can find this device. The text +should be configurable by the administrator. This could e.g. look +like this: +

+building 93, 2nd plane, room 2124
+
+ +

The string comment can be used to display any comment about the device +to the user. The text should be configurable by the administrator. + +

The string reserved_string is unused currently but planned for +future use. + +

All unused strings must be set to ``'' by the backend. + +

With member backend_version_code a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +

The member backend_capability_flags contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +

The member reserved_int is planned for future use, the backend has +to set the value of the integer to 0. + + +

4.2.9 Option Descriptor Type

+ +

Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +SANE_Option_Descriptor type is given below. +

+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const title;
+    SANE_String_Const desc;
+    SANE_Value_Type type;
+    SANE_Unit unit;
+    SANE_Int size;
+    SANE_Int cap;
+    SANE_Constraint_Type constraint_type;
+    union
+      {
+        const SANE_String_Const *string_list;
+        const SANE_Word *word_list;
+        const SANE_Range *range;
+      }
+    constraint;
+  }
+SANE_Option_Descriptor;
+
+
+ +

4.2.9.1 Option Name

+ +

Member name is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (a--z), +digits (0--9), or the dash character (-) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +

4.2.9.2 Option Title

+ +

Member title is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +

4.2.9.3 Option Description

+ +

Member desc is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +

4.2.9.4 Option Value Type

+ +

Member type specifies the type of the option value. The +possible values for type SANE_Value_Type are described +in Table 3. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_TYPE_BOOL

0 Option value is of type + SANE_Bool.
+ +

SANE_TYPE_INT

1 Option value is of type + SANE_Int.
+ +

SANE_TYPE_FIXED

2 Option value is of type + SANE_Fixed.
+ +

SANE_TYPE_STRING

3 Option value is of type + SANE_String.
+ +

SANE_TYPE_BUTTON

4 An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper.
+ +

SANE_TYPE_GROUP

5 An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members title and +type are valid in the option descriptor.
+ +

+

+

Table 3: Option Value Types (SANE_Value_Type)
+ +
+

+ +

4.2.9.5 Option Value Unit

+ +

Member unit specifies what the physical unit of the option +value is. The possible values for type SANE_Unit are +described in Table 4. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_UNIT_NONE

0 Value is unit-less (e.g., page count).
+SANE_UNIT_PIXEL 1 Value is in number of pixels.
+SANE_UNIT_BIT 2 Value is in number of bits.
+SANE_UNIT_MM 3 Value is in millimeters.
+SANE_UNIT_DPI 4 Value is a resolution in dots/inch.
+SANE_UNIT_PERCENT 5 Value is a percentage.
+SANE_UNIT_MICROSECOND 6 Value is time in µ-seconds.
+ +

+

+

Table 4: Physical Units (SANE_Unit)
+ +
+

+ +

4.2.9.6 Option Value Size

+ +

Member size specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +

+
+
SANE_TYPE_STRING:
The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating NUL character is considered to be part of the + string. Note that the terminating NUL character must + always be present in string option values. +
SANE_TYPE_INT, SANE_TYPE_FIXED:
The size + must be a positive integer multiple of the size of a + SANE_Word. The option value is a vector of length + +

+

+ size/sizeof(SANE_Word).
+

+

SANE_TYPE_BOOL:
The size must be set to + sizeof(SANE_Word). +
SANE_TYPE_BUTTON, SANE_TYPE_GROUP:
The + option size is ignored. +
+
+ +

4.2.9.7 Option Capabilities

+ +

Member cap describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table 5. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +

+
+ +

SANE_OPTION_IS_ACTIVE(cap):
This macro + returns SANE_TRUE if and only if the option with the + capability set cap is currently active. + +

SANE_OPTION_IS_SETTABLE(cap):
This + macro returns SANE_TRUE if and only if the option with the + capability set cap is software settable. +
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ + +

SANE_CAP_SOFT_SELECT

1 The option + value can be set by a call to sane_control_option().
+ +

SANE_CAP_HARD_SELECT

2 The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE_CAP_SOFT_SELECT (either one of them can be set, but not both + simultaneously).
+ +

SANE_CAP_SOFT_DETECT

4 The option + value can be detected by software. If + SANE_CAP_SOFT_SELECT is set, this capability must + be set. If SANE_CAP_HARD_SELECT is set, this capability + may or may not be set. If this capability is set but neither + SANE_CAP_SOFT_SELECT nor SANE_CAP_HARD_SELECT + are, then there is no way to control the option. That is, the + option provides read-out of the current value only.
+ +

SANE_CAP_EMULATED

8 If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option.
+ +

SANE_CAP_AUTOMATIC

16 If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling sane_control_option() + with an action value of SANE_ACTION_SET_AUTO.
+ +

SANE_CAP_INACTIVE

32 If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value).
+ +

SANE_CAP_ADVANCED

64 + If set, this capability indicates that the option should be + considered an ``advanced user option''. + + If this capability is set for an option of type + SANE_TYPE_GROUP, all options belonging to the group are also + advanced, even if they don't set the capabilty themselves. + + A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). +
+ +

SANE_CAP_HIDDEN

128 + + If set, this capability indicates that the option shouldn't be + displayed to and used by the user directly. Instead a hidden option + is supposed to be automatically used by the frontend, like e.g. the + ``preview'' option. + If this capability is set for an option of type + SANE_TYPE_GROUP, all options belonging to the group are also + hidden, even if they don't set the capabilty themselves. + A frontend typically doesn't display such options by default but there + should be a way to override this default behaviour. + +
+ +

SANE_CAP_ALWAYS_SETTABLE

256 + + If set, this capability indicates that the option may be at any time between + sane_open() and sane_close(). I.e. it's allowed to set it + even while an image is acquired. + +
+ +

+

+

Table 5: Option Capabilities
+ +
+

+ +

4.2.9.8 Option Value Constraints

+ +

It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member constraint_type indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member constraint. The possible values of type +SANE_Constraint_Type and the interpretation of the +constraint union is described in Table 6. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_CONSTRAINT_NONE

0 The value is unconstrained. + The option can take any of the values possible for the option's + type.
+ +

SANE_CONSTRAINT_RANGE

1 This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member constraint.range points to + a range of the type SANE_Range. This type is illustrated + below: +
+
+typedef struct
+  {
+    SANE_Word min;
+    SANE_Word max;
+    SANE_Word quant;
+  }
+SANE_Range;
+
+
+ All three members in this structure are interpreted according to the + option value type (SANE_TYPE_INT or SANE_TYPE_FIXED). + Members min and max specify the minimum and maximum + values, respectively. If member quant is non-zero, it + specifies the quantization value. If l is the minimum value, u + the maximum value and q the (non-zero) quantization of a range, + then the legal values are v=k*q+l for all non-negative + integer values of k such that v<=u.
+ +

SANE_CONSTRAINT_WORD_LIST

2 This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + constraint.word_list points to a list of words that + enumerates the legal values. The first element in that list is an + integer (SANE_Int) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (SANE_TYPE_INT or SANE_TYPE_FIXED).
+ +

SANE_CONSTRAINT_STRING_LIST

3 This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + constraint.string_list points to a NULL terminated + list of strings that enumerate the legal values for the option + value. +
+
+

Table 6: Option Value Constraints
+ +
+

+ +

4.2.10 Internationalization

+ +All backend texts should be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +

4.2.10.1 How is a text marked for translation

+ +

The keyword SANE_I18N is used to mark a text for translation. +SANE_I18N has to be defined as a dummy prototype: + +

+
+#ifndef SANE_I18N
+#  define SANE_I18N(text) text
+#endif
+
+
+ +

You should not mark prototypes or variables with SANE_I18N +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (SANE_I18N(START_SCAN_TEXT)) and +variables (SANE_I18N(option[7].name)). + +

A correct marked text can look like this:
+snprintf(buf, sizeof(buf), SANE_I18N("Start scan")
+or
+#define START_SCAN_TEXT SANE_I18N("Start scan").
+It also is allowed to mark texts in structs because the +prototype SANE_I18N has no effect to the compiler. + +

4.2.10.2 Which texts shall be marked for translation?

+All option texts that are visible for the user should be marked for +translation. This is: +
    +
  • +member title +
  • +member desc +
  • +member string_list +
+of SANE_Option_Descriptor. + +

It is not allowed to mark/translate member name. +Please also do not mark any error or debug messages that are +displayed by the backend. + +

4.2.10.3 File formats and translation functions

+The recommended file formats for translation tables are the po files +and mo or gmo files. +The po file contains the original text marked with the keyword msgid +and the translated text marked with the keyword msgstr. +A po file that contains all needed msgids can be created +e.g. by the gnu gettext tool xgettext with the option +-k SANE_I18N. +The translator adds the translated texts to the po files. +The gettext tool msgfmt converts the po files to the +mo or gmo files.
+ +

Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function gettext +to translate the texts. This e.g. can look like this:
+snprintf(buf, sizeof(buf), gettext("english text")); + +

If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the po files to create its +own translation tables from it.
+ +

Note that it is strongly recommended to use the gettext tools. + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc012.html b/sane2/0.08/doc012.html new file mode 100644 index 00000000..ba52c800 --- /dev/null +++ b/sane2/0.08/doc012.html @@ -0,0 +1,871 @@ + +Next +Up +Previous +Contents +Index +
+ +Operations +

4.3 Operations

+ +

4.3.1 sane_init

+ +

This function must be called before any other SANE function can be called. +The behavior of a SANE backend is undefined if this function is not called +first or if the status code returned by sane_init is different from +SANE_STATUS_GOOD. The version code of the backend is returned +in the value pointed to by version_code. If that pointer is +NULL, no version code is returned. Argument authorize is either +a pointer to a function that is invoked when the backend requires +authentication for a specific resource or NULL if the frontend does not +support authentication. +

+
+SANE_Status sane_init (SANE_Int * version_code,
+                       SANE_Authorization_Callback authorize);
+
+
+ +

The authorization function may be called by a backend in response to +any of the following calls: +

+ sane_open, sane_control_option, sane_start +
+If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +

The authentication function type has the following declaration: +

+ +
+#define SANE_MAX_USERNAME_LEN   128
+#define SANE_MAX_PASSWORD_LEN   128
+
+typedef void (*SANE_Authorization_Callback)
+    (SANE_String_Const resource,
+     SANE_Char username[SANE_MAX_USERNAME_LEN],
+     SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+
+
+Three arguments are passed to the authorization function: +resource is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The username +and password arguments are (pointers to) an array of +SANE_MAX_USERNAME_LEN and SANE_MAX_PASSWORD_LEN +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +must be ASCII-NUL terminated. + +

4.3.2 sane_exit

+ +

This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to sane_close(), but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than sane_init() may be called (regardless +of the status value returned by sane_exit(). Neglecting to +call this function may result in some resources not being released +properly. +

+
+void sane_exit (void);
+
+
+ +

4.3.3 sane_get_devices

+ +

This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a NULL terminated array of pointers to SANE_Device +structures in *device_list. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to sane_exit() is performed. This +function can be called repeatedly to detect when new devices become +available. If argument local_only is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +

+
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+                              SANE_Bool local_only);
+
+
+ +

This function may fail with SANE_STATUS_NO_MEM if an +insufficient amount of memory is available. + +

+
+ Backend Implementation Note +
+ SANE does not require that this function is called before a + sane_open() call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. + + The same information about + a device has to be returned when sane_open is called. + +
+ +

4.3.4 sane_open

+ +

This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +name. If the call completes successfully, a handle for the +device is returned in *h. + +The description of the device +is returned in **device_description. This is the +same description that is returned in the list by sane_get_devices. +The returned data *h and *device_description is guaranteed +to remain unchanged and valid until a call to sane_close() +is performed. + +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +

+
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+
+
+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_DEVICE_BUSY:
The device is currently + busy (in use by somebody else). +
SANE_STATUS_INVAL:
The device name is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.5 sane_close

+ +

This function terminates the association between the device handle +passed in argument h and the device it represents. If the +device is presently active, a call to sane_cancel() is +performed first. After this function returns, handle h must +not be used anymore. + +

+
+void sane_close (SANE_Handle h);
+
+
+ +

4.3.6 sane_get_option_descriptor

+ +

This function is used to access option descriptors. The function +returns the option descriptor for option number n of the device +represented by handle h. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle h (the count +includes option 0). If n is not a valid option index, the function +returns NULL. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +

+
+const SANE_Option_Descriptor *
+    sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+
+
+ +

4.3.7 sane_control_option

+ +

This function is used to set or inquire the current value of option +number n of the device represented by handle h. The +manner in which the option is controlled is specified by parameter +a. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +v. It is a pointer to the memory that holds the option value. +The memory area pointed to by v must be big enough to hold the +entire option value (determined by member size in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument v may be shorter since the backend will stop +reading the option value upon encountering the first NUL +terminator in the string. If argument i is not NULL, +the value of *i will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +

+
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+                                 SANE_Action a, void *v,
+                                 SANE_Int * i);
+
+
+ +

The way the option is affected by a call to this function is +controlled by parameter a which is a value of type +SANE_Action. The possible values and their meaning is +described in Table 7. + +

+

+ + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_ACTION_GET_VALUE

0 Get current option value.
+ +

SANE_ACTION_SET_VALUE

1 Set option value. The + option value passed through argument v may be modified by the + backend if the value cannot be set exactly.
+ +

SANE_ACTION_SET_AUTO

2 Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter v is completely ignored in this case and + may be NULL.
+ +

+

+

Table 7: Action Values (SANE_Action)
+ +
+

+ +

After setting a value via an action value of +SANE_ACTION_SET_VALUE, additional information on how well the +request has been met is returned in *i (if i is +non-NULL). The returned value is a bitset that may contain any +combination of the values described in Table 8. +

+

+ + + + + + + + + + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_INFO_INEXACT

1 This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in *i has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value.
+ +

SANE_INFO_RELOAD_OPTIONS

2 +The setting of an option may affect the + + value, the availability, or the constraint of one or more + other options. + + When this happens, the SANE backend sets this + member in *i to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed.
+ +

SANE_INFO_RELOAD_PARAMS

4 +The setting of an option may affect the parameter values (see +sane_get_parameters()). +If setting an option affects the parameter values, this member will +be set in *i. Note that this member may be set even if the +parameters did not actually change. However, it is guaranteed that +the parameters never change without this member being set. +
+ +

SANE_INFO_INVALIDATE_PREVIEW

8 +The setting of an option may affect the validity of the preview that +was acquired by the frontend earlier. When the preview image would change +significantly if it was scanned again, the SANE backend +sets this member in *i to indicate that the application should inform the +user of the invalidity of the preview. Examples for such option +settings may include setting a different scan source or significantly +changing the exposure. +
+ +

+

+

Table 8: Additional Information Returned When Setting an Option
+ +
+

+ +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_UNSUPPORTED:
The operation is not + supported for the specified handle and option number. +
SANE_STATUS_INVAL:
The option value is not valid. +
SANE_STATUS_IO_ERROR:
An error occured while + communicating with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the option has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.8 sane_get_parameters

+ +

This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (sane_start() has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +sane_start() gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle h of the device for which the +parameters should be obtained and a pointer p to a parameter +structure. The parameter structure is described in more detail below. + +

+
+SANE_Status sane_get_parameters (SANE_Handle h,
+                                 SANE_Parameters * p);
+
+
+ +

The scan parameters are returned in a structure of type +SANE_Parameters. The C declaration of this structure +is given below. + +

+
+typedef struct
+  {
+    SANE_Frame format;
+    SANE_Int flags;
+    SANE_Int lines;
+    SANE_Int depth;
+    SANE_Int pixels_per_line;
+    SANE_Int bytes_per_line;
+    SANE_Int channels_per_image;
+    SANE_String format_desc;
+    SANE_String proposed_filename;
+    SANE_String proposed_comment;
+    SANE_Int dpi_x;
+    SANE_Int dpi_y;
+    char reserved[32]; /* 32 bytes for future use */
+  }
+SANE_Parameters;
+
+
+ + +

+Member format specifies the format of the next frame to be +returned. The possible values for type SANE_Frame are +described in Table 9. The meaning of these +values is described in more detail in section 3.2. +The frame types used by version 1 of this standard +(SANE_FRAME_GRAY, SANE_FRAME_RGB, +SANE_FRAME_RED, SANE_FRAME_GREEN, and +SANE_FRAME_BLUE) are obsolete and superseded by the +frame type SANE_FRAME_RAW. + +

+

+ + + + + + + + + + + + + + + + +
SymbolCodeDescription
+ +

+ +

SANE_FRAME_RAW

5 Arbitrary pixel property transmission.
+SANE_FRAME_MIME 6 Data described by a mime descriptor.
+ +

+

+

Table 9: Frame Format (SANE_Frame)
+ +
+

+ +

The flags member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +

    + +

  • +SANE_PFLAG_LAST_FRAME (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the only frame +or the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). + +

  • +SANE_PFLAG_MORE_IMAGES (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. The frontend is expected to call sane_start +again after the end of the current scan to get more images, e.g. +from an automatic document feeder. It is permissible to set that value to 1 ``in good +faith'', as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer. E.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at sane_start(). + +

  • +SANE_PFLAG_NEW_PAGE (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +

  • +SANE_PFLAG_BACKSIDE (bit 3, bitvalue 8) tells if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +

+ +

Note, that flags is compatible to member last_frame of +SANE_Parameters of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). + + +

Member lines specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call sane_read() until it +returns a status of SANE_STATUS_EOF. + +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. + + +

Member bytes_per_line specifies the number of bytes that comprise one +scan line. + +If this value is not applicable for image data of type +SANE_FRAME_MIME, it must be set to -1. In this case the frontend +should just call sane_read until SANE_STATUS_EOF is returned. + + +

Member depth specifies the number of bits per sample. + +Note, that only -1 (for not applicable), 1, and multiples of 8 are +allowed values. Data with other depths has to be scaled up accordingly. +Depth 1 is only allowed if the image consists of a single channel (lineart or +halftone modes). + + +

Member pixels_per_line specifies the number of pixels that +comprise one scan line. + +If unavailable or not applicable, set to -1. + + +

Assume B is the number of channels in the frame, then the bit depth +d (as given by member depth) and the number of pixels per +line n (as given by this member pixels_per_line) are +related to c, the number of bytes per line (as given by member +bytes_per_line) as follows: + + +

+

+ + c >= \left{ + ll + \lceil B*n / 8\rceil if d=1 +(1) + + B*n *d / 8 if d>1 + + \right. +
+

+ +Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +

+Member channels_per_image specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +channels_per_image has to be the same for all frames for this image. + +

Member format_desc is used to describe the details of the frame +formats. Its meaning differs between the two formats: + +

    +
  • +SANE_FRAME_RAW: +The format_desc contains a description of the channel data and +an optional depth information separated by a colon(:). + +

    A plane is descibed by one channel, e.g. ``gray'' or ``gray:12''. + +

    Channel interleaved data is described by a comma separated list of channel descriptions, +for example ``red,green,blue'' or ``red:8,green:8,blue:8'', +the channel data is sent in the given order. + +

    The depth information does not define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member depth. + +

    Well known channels are red, green, blue and gray. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be infrared or +a wavelength description like 1100nm, but be aware that a +frontend may not be able to display such channels with useful colors. + +

    Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member channels_per_image. + +

  • +SANE_FRAME_MIME: + +

    format_desc contains the MIME Content-Type: header field as described +in RFC 1521 (section 4) without the prefixing "Content-Type:". MIME Types and +subtypes should be either chosen from the RFC or from the list of +IANA-approved values. The data stream must be compliant with the corresponding +specification. + +

    When data is transmitted with the frame type SANE_FRAME_MIME +all data has to be transmitted within one frame, multiple frames +are not allowed (so the flag last_frame has to be set +when using this frame type). + +

    A SANE backend must be able to at least optionally transmit +SANE_FRAME_RAW (possibly with the help of a meta backend), if the +hardware supports delivering image data at all. For data that doesn't +comprise images, it's admisable to only provide MIME frames. As a +general principle, if there are several choices in MIME types, the +format that is most widely implemented should be used. +

+ +

The member proposed_filename can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to ``''. + +

In the case of raw frames, proposed_filename is expected to hold +the basename for the image, with the extension determined by the save function +of the frontend, as the frontend can fully understand the data and is thus +able to encode it in any format it wishes. + +

For MIME frames proposed_filename can contain either: + +

    +
  • +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +

  • +A complete filename, including extension. +
+ +

Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +

The string proposed_comment can be used to transmit additional +image information, that can be stored in the comment areas several file formats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. Set to ``'' if unused. + +

The members dpi_x and dpi_y encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different resolutions of +each image. It is not permissible to change resolution between frames of the +same image. If not applicable, set to -1. + +

The member reserved is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. + + +

4.3.9 sane_start

+ +

This function initiates aquisition of an image from the device +represented by handle h. +

+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes. +
+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_DEVICE_BUSY:
The device is busy. The + operation should be retried later. +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_INVAL:
The scan cannot be started with the current + set of options. The frontend should reload the option descriptors, as if + SANE_INFO_RELOAD_OPTIONS had been returned from a call to + sane_control_option(), since the device's capabilities may have + changed. +
+
+ +

4.3.10 sane_read

+ +

This function is used to read image data from the device represented +by handle h. Argument buf is a pointer to a memory area +that is at least maxlen bytes long. The number of bytes +returned is stored in *len. A backend must set this to zero +when a status other than SANE_STATUS_GOOD is returned). +When the call succeeds, the number of bytes returned can be anywhere in +the range from 0 to maxlen bytes. +

+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+                       SANE_Int maxlen, SANE_Int * len);
+
+
+ +For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. + +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle h. +
    +
  1. If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +

  2. If the device is in non-blocking I/O mode, the call returns + immediately with status SANE_STATUS_GOOD and with + *len set to zero. +
+The I/O mode of handle h can be set via a call to +sane_set_io_mode(). + +

This function may fail with one of the following status codes. +

+
+
SANE_STATUS_CANCELLED:
The operation was cancelled through + a call to sane_cancel. +
SANE_STATUS_EOF:
No more data is available for the + current frame. + +If sane_read sends back any image data it +is not allowed to return with SANE_STATUS_EOF. + +
SANE_STATUS_JAMMED:
The document feeder is jammed. +
SANE_STATUS_NO_DOCS:
The document feeder is out of + documents. +
SANE_STATUS_COVER_OPEN:
The scanner cover is open. +
SANE_STATUS_IO_ERROR:
An error occurred while communicating + with the device. +
SANE_STATUS_NO_MEM:
An insufficent amount of memory + is available. +
SANE_STATUS_ACCESS_DENIED:
Access to the device has + been denied due to insufficient or invalid authentication. +
+
+ +

4.3.11 sane_cancel

+ +

This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +h. +

+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does not imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been initiated. Cancellation +completes only when the cancelled call returns (typically with a +status value of SANE_STATUS_CANCELLED). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must not call any other operation until the +cancelled operation has returned. + +

4.3.12 sane_set_io_mode

+ +

This function is used to set the I/O mode of handle h. The I/O mode +can be either blocking or non-blocking. If argument m is +SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to +blocking mode. This function can be called only after a call to +sane_start() has been performed. +

+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value SANE_STATUS_UNSUPPORTED is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument m set to SANE_FALSE is guaranteed to complete +successfully. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support +the requested I/O mode. +
+
+ +

4.3.13 sane_get_select_fd

+ +

This function is used to obtain a (platform-specific) file-descriptor +for handle h that is readable if and only if image data is +available (i.e., when a call to sane_read() will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in *fd. +

+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start() +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until sane_cancel() or sane_start() get called again +or until sane_read() returns with status +SANE_STATUS_EOF). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +sane_read() call would return SANE_STATUS_EOF. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call sane_read(). + +

A backend may elect not to support this operation. In such a case, +the function returns with status code +SANE_STATUS_UNSUPPORTED. + +

Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using select() +or poll() under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to sane_read() is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +

This function may fail with one of the following status codes: +

+
+
SANE_STATUS_INVAL:
No image acquisition is pending. +
SANE_STATUS_UNSUPPORTED:
The backend does not support + this operation. +
+
+ +

4.3.14 sane_strstatus

+ +

This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return NULL. +The returned pointer is valid at least until the next call to this +function is performed. +

+
+SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+ +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc013.html b/sane2/0.08/doc013.html new file mode 100644 index 00000000..529a4c0a --- /dev/null +++ b/sane2/0.08/doc013.html @@ -0,0 +1,207 @@ + +Next +Up +Previous +Contents +Index +
+ +Code Flow +

4.4 Code Flow

+ +

The code flow for the SANE API is illustrated in +Figure 4. Functions sane_init() and +sane_exit() initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +

+

+ + +

Figure 4: Code flow
+ +
+

+ +

Function sane_get_devices() can be called any time after +sane_init() has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +

Once a device has been chosen, it is opened using a call to +sane_open(). Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +

An opened device can be setup through the corresponding device handle +using functions sane_get_option_descriptor() and +sane_control_option(). While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. + + However, as options are set, other options may become active or inactive or + their constraint may change. Thus, after setting an option, it may be + necessary to re-read the descriptors. + +While +setting up the device, it is also admissible to call +sane_get_parameters() to get an estimate of what the image +parameters will look like once image acquisition begins. + +

The device handle can be put in blocking or non-blocking mode by a +call to sane_set_io_mode(). Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +

After the device is setup properly, image acquisition can be started +by a call to sane_start(). The backend calculates the exact +image parameters at this point. So future calls to +sane_get_parameters() will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to sane_read() is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +sane_set_io_mode() and/or sane_get_select_fd() at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +

+Image data is collected by repeatedly calling sane_read() +until this function will return an end-of-file status +(SANE_STATUS_EOF). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels of a red/green/blue image or multiple images), +it can call sane_start() again. +If the SANE_PFLAG_LAST_FRAME bit is set in flags, the +current image is complete. In this case, it should be tested, if +flags has the SANE_PFLAG_MORE_IMAGES bit set. +If yes, further calls to sane_start() can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +sane_start() return an error like SANE_STATUS_NO_DOCS. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with SANE_PFLAG_LAST_FRAME on +and SANE_PFLAG_MORE_IMAGES off is encountered, or an error other +than SANE_STATUS_EOF occurs in a SANE function. +Note that SANE_STATUS_NO_DOCS also is an allowed way for the backend +to indicate the end of a multiple image scan. + +

A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling sane_start again, which will get +you to the next frame, without having to read and discard the current one. + +

In order to prematurely stop scanning and to reset the backend state, +sane_cancel() can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. + + +

When done using the device, the handle should be closed by a call to +sane_close(). Finally, before exiting the application, +function sane_exit() must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +

+The following C sample code implements a reference loop for acquiring +multiple images: + +

+SANE_Parameters parms;
+SANE_Status     status;
+
+do
+  {
+    do
+      {
+        /* Now start acquiring the next frame. */
+        status = sane_start (handle);
+
+        /* if that failed, we have a problem, and no more frames can be 
+         * read at this time. Due to SANE_PFLAG_MORE_IMAGES still 
+         * being clear, this will break out of _BOTH_ loops. 
+         */
+        if (status != SANE_STATUS_GOOD)
+          break;
+
+        /* Now let us see what the next frame brings. */
+        status = sane_get_parameters (handle, &parms);
+
+        /* This actually should not fail, but maybe the doc feeder 
+         * jammed or something, so we break as well, if something 
+         * is wrong. 
+         */
+        if (status != SANE_STATUS_GOOD)
+          break;
+
+        /* Now we check the announced parameters, if we can make use 
+         * of the frame data. If not, we skip over to the next frame. 
+         */
+        if (do_i_like_that (&parms) == NO)
+          continue;
+
+        /* Set up for reading the data here. Mangle filenames, 
+         * allocate memory, rewind multiframe files, ask user 
+         * for confirmation, ... 
+         */
+        setup_for_transfer (...);
+
+        /* Now we read in the frame data and process it. This should 
+         * return SANE_STATUS_GOOD, until the frame is complete, 
+         * what causes SANE_STATUS_EOF to be returned. 
+         */
+        while (SANE_STATUS_GOOD == (status = sane_read (...)))
+          read_in_and_process_data_as_required ();
+
+        /* If transfer was broken due to anything but EOF, break out. */
+        if (status != SANE_STATUS_EOF)
+          break;
+
+        /* Now loop until we have all frames of an image. */
+      }
+    while (!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+    /* O.K. - we now have a complete image. Fit it together, save it, 
+     * flush buffers, transmit it, increment filenames, etc. 
+     */
+
+    /* Now check for more pending images. If we have more, redo from start. 
+     * Some backends might cheat here and send us for an extra round which 
+     * will fail at sane_start, as they were not able to determine if they 
+     * would have more data at the start of the last frame we read. 
+     */
+  }
+while (parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control 
+ * loop. 
+ */
+
+sane_cancel (handle);
+
+ +

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc014.html b/sane2/0.08/doc014.html new file mode 100644 index 00000000..893a7e6b --- /dev/null +++ b/sane2/0.08/doc014.html @@ -0,0 +1,486 @@ + +Next +Up +Previous +Contents +Index +
+ +Well-Known Options +

4.5 Well-Known Options

+ +

While most backend options are completely self-describing, there are +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +

4.5.1 Option Number Count

+ +

Option number 0 has an empty string as its name. The value of this +option is of type SANE_TYPE_INT and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +sane_get_option_descriptor() returns NULL, or a +frontend can directly read out the value of option number 0. + +

4.5.2 Scan Resolution Options

+ +

Option resolution is used to select the resolution at which an +image should be acquired. + +When the backend wants to allow different +values for x- and y-resolution it has to define the options +x-resolution and y-resolution. Note that only +the option resolution or the options +x-resolution and y-resolution may be active at the +same time. + + +

The type of this option is either SANE_TYPE_INT or +SANE_TYPE_FIXED. The unit is SANE_UNIT_DPI (dots/inch). + +

These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. + +

4.5.3 Preview Mode Option

+ +

The boolean option preview is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to SANE_TRUE, +preview mode is in effect, when set to SANE_FALSE image +acquisition should proceed in normal quality mode. The setting of +this option must not affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option resolution). A backend is free to override the +resolution value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. + +When the preview option is set the backend should transfer +the image in frame type SANE_FRAME_RAW if possible. + + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +

4.5.4 Scan Area Options

+ +

The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure 5. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the smallest and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the largest. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +

+

+ + +

Figure 5: Scan area options
+ +
+

+ +

The names of the four options that define the scan area are given in +the table below: +

+ + + + + + + + + + + + + + + + + + +
+Name Description
+tl-x Top-left x coordinate value
+tl-y Top-left y coordinate value
+br-x Bottom-right x coordinate value
+br-y Bottom-right y coordinate value
+
+
+There are several rules that should be followed by front and backends +regarding these options: +
    + +

  • Backends must attach a unit of either pixels + (SANE_UNIT_PIXEL) or millimeters (SANE_UNIT_MM) to + these options. The unit of all four options must be identical. + +

  • Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +

  • A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +

  • A frontend must work properly with any or all of these options + missing. + + +
  • A frontend may temporarily set the values in a way that +tl-x is larger than br-x and tl-y is larger than +br-y. + + +

+ +

+These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. + + +

+

4.5.5 Depth Option

+Option depth is used to select the image depth in bits/sample +in multi bit mode (e.g. for 24 bit RGB mode this value must be 8). +The type of this option is SANE_TYPE_INT. +The unit is SANE_UNIT_BIT. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option mode. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + + +

4.5.6 Scan Mode Options

+The option mode defines a SANE_CONSTRAINT_STRING_LIST +of type SANE_TYPE_STRING. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: Color, Gray, Halftone +and Lineart. Color and Gray are multi bit +modes (8 or 16 bits/sample), Halftone and Lineart +are single bit modes. When well-known scan modes are used, +a frontend is able to automatically decide which mode is appropriate +for a specific task, e.g the mode Gray +for scanning a fax. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +
+ + +

4.5.7 Scan Source Options

+The option source is used to select the scan source +(e.g. Automatic Document Feeder). +It defines a SANE_CONSTRAINT_STRING_LIST +of type SANE_TYPE_STRING. +Well known sources are: Flatbed, Transparancy Adapter and +Automatic Document Feeder. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +
+ +

+

4.5.8 Threshold Option

+The option threshold is used to define the threshold +for Lineart and maybe Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It defines the minimum intensity to get a white point / full intensity. + +

The backend has to scale the values in the following way: +A value of 0.0 means all pixels get white / full intensity. A value of 50.0 +means intensities brighter than medium gray get white / full intensity. A +value of 100.0 means all pixels get black. If the +scanner is not able to cover the full range the backend has to define a +reduced value range (e.g. 30...70 percent). + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

+

4.5.9 Gamma Table Options

+The gamma-table option defines a SANE_CONSTRAINT_RANGE +of the type SANE_TYPE_INT which represents the gamma correction +table for gray. In color mode the gamma-table may be used to set +a common gamma correction for red, green and blue. The options +red-gamma-table, green-gamma-table and blue-gamma-table +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +gamma-table option, only the red-, green- and +blue-gamma-table or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +
+red_value   = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value  = gamma-table(blue-gamma-table(value))
+
+ +

The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend. + +

It is also discouraged to emulate gamma tables in the backend. The backend +should disable (or not define) this option when the scanner does not support +gamma tables in hardware. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

+

4.5.10 Analog Gamma

+The option analog-gamma is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_NONE. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options analog-gamma-red, +analog-gamma-green and analog-gamma-blue. +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +

When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect on the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

+

4.5.11 Shadow Option

+The option shadow is used to define the shadow level / black point level. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). + +

The backend has to scale the values in the following way: +A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30...70 percent). +In color mode there can be options shadow-red, shadow-green +and shadow-blue, in this case the shadow function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

+

4.5.12 Highlight Option

+The option highlight is used to define the highlight level / white point level. +The type of this option is SANE_TYPE_FIXED. +The unit is SANE_UNIT_PERCENT. The value range +should be 0.0...100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). + +

The backend has to scale the values in the following way: +A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30...70 percent). +In color mode there can be options highlight-red, highlight-green +and highlight-blue, in this case highlight has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +

This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + + +

+

4.5.13 Lamp Options

+ +

The options lamp-on and lamp-off are button options +(SANE_TYPE_BUTTON) and don't have a unit (SANE_UNIT_NONE). + +

Option lamp-on is used to turn on the lamp of the scanner while +lamp-off turns it off. + +

These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. + + +

+

4.5.14 Scanner Button Options

+Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image. + +

A backend that does make available the scanner-buttons has to +implement the following options:
+scanner-buttons-lock is of type SANE_TYPE_BOOL, default = SANE_FALSE
+scanner-buttons-status is of type SANE_TYPE_INT, default = 0
+scanner-buttons-status-update is of type SANE_TYPE_BUTTON
+When setting these options the backend does not set SANE_INFO_RELOAD_OPTIONS +or SANE_INFO_RELOAD_PARAMS if not explictly defined. + +

A frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +

    + +

  • +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +scanner-buttons-lock to SANE_TRUE. +While setting the value of option scanner-buttons-lock to SANE_TRUE +the backend does check if a lockfile (e.g. ``backend''-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + +

      +
    • + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option scanner-buttons-lock is set to SANE_TRUE +
    • + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option scanner-buttons-lock is set to SANE_FALSE. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option scanner-buttons-lock is set to SANE_TRUE +
    + +

  • +The frontend does read the value of option scanner-buttons-lock. If +it is SANE_TRUE then the frontend has access to the scanner buttons. +If it is SANE_FALSE then access has been denied. + +

  • +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): +
      +
    • + The frontend does set option scanner-buttons-status-update. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option scanner-buttons-status, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immediately and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option scanner-buttons-lock to SANE_FALSE + and does set SANE_INFO_RELOAD_OPTIONS to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the scanner-buttons-status to 0. + +

    • + The frontend does read the value of option scanner-buttons-status +
    + +

  • +When the frontend does exit or it does not want to use the buttons +it does set option scanner-buttons-lock to SANE_FALSE. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of scanner-buttons-lock to SANE_FALSE. + +

    sane_close() should do the same as setting option +scanner-buttons-lock to SANE_FALSE. + +

+
+ +

+

4.5.15 Batch Scan Options

+ +

The batch scan options can be used by a frontend to indicate that more than +one image will be scanned in a batch. The backend can optimize for such scans +by e.g. avoiding calibration and not moving home the sensor array in this case. +The backend provides the options batch-scan, +batch-scan-next-tl-x, batch-scan-next-tl-y, +batch-scan-next-br-x, and batch-scan-next-br-y. The option +batch-scan provides a string list with the values of No if +batch scanning isn't used, Start for the first, End for the last +and Loop for any other (intermediate) image. The batch-scan-next +options specify the coordinates of the next scan and follow the same rules as +the scan area options (see section 4.5.4). + +

These options are not mandatory, but if a backend does support them, it must +implement them in a manner consistent with the above definition. In this +case, all options must be implemented. + + +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc015.html b/sane2/0.08/doc015.html new file mode 100644 index 00000000..9f831204 --- /dev/null +++ b/sane2/0.08/doc015.html @@ -0,0 +1,82 @@ + +Next +Up +Previous +Contents +Index +
+ +Network Protocol +

5 Network Protocol

+ +

The SANE interface has been designed to facilitate network access to +image acquisition devices. In particular, most SANE implementations +are expected to support a network backend (net client) and a +corresponding network daemon (net server) that allows accessing image +acquisition devices through a network connection. Network access is +useful in several situations: +

    + +

  • To provide controlled access to resources that are inaccessible + to a regular user. For example, a user may want to access a device + on a host where she has no account on. With the network protocol, + it is possible to allow certain users to access scanners without + giving them full access to the system. + +

    Controlling access through the network daemon can be useful even in + the local case: for example, certain backends may require root + privileges to access a device. Rather than installing each frontend + as setuid-root, a system administrator could instead install the + SANE network daemon as setuid-root. This enables regular users to + access the privileged device through the SANE daemon (which, + presumably, supports a more fine-grained access control mechanism + than the simple setuid approach). This has the added benefit that + the system administrator only needs to trust the SANE daemon, not + each and every frontend that may need access to the privileged + device. + +

  • Network access provides a sense of ubiquity of the available + image acquisition devices. For example, in a local area network + environment, this allows a user to log onto any machine and have + convenient access to any resource available to any machine on the + network (subject to permission constraints). + +

  • For devices that do not require physical access when used (e.g., + video cameras), network access allows a user to control and use + these devices without being in physical proximity. Indeed, if such + devices are connected to the Internet, access from any place in the + world is possible. + +

+ +

The network protocol described in this chapter has been design with +the following goals in mind: +

    + +

  1. Image transmission should be efficient (have low encoding + overhead). + +

  2. Accessing option descriptors on the client side must be + efficient (since this is a very common operation). + +

  3. Other operations, such as setting or inquiring the value of an + option are less performance critical since they typically require + explicit user action. + +

  4. The network protocol should be simple and easy to implement on + any host architecture and any programming language. + +

+The SANE protocol can be run across any transport protocol that +provides reliable data delivery. While SANE does not specify a +specific transport protocol, it is expected that TCP/IP will be among +the most commonly used protocols. + +

5.1 Data Type Encoding

5.2 Remote Procedure Call Requests


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc016.html b/sane2/0.08/doc016.html new file mode 100644 index 00000000..687013ed --- /dev/null +++ b/sane2/0.08/doc016.html @@ -0,0 +1,89 @@ + +Next +Up +Previous +Contents +Index +
+ +Data Type Encoding +

5.1 Data Type Encoding

+ +

5.1.1 Primitive Data Types

+ +

The four primitive types of the SANE standard are encoded as follows: +

+ +

SANE_Byte:
A byte is encoded as an 8 bit value. + Since the transport protocol is assumed to be byte-orientd, the bit + order is irrelevant. + +

SANE_Word:
A word is encoded as 4 bytes (32 + bits). The bytes are ordered from most-significant to + least-significant byte (big-endian byte-order). + +

SANE_Char:
A character is currently encoded as an 8-bit + ISO LATIN-1 value. An extension to support wider character sets (16 or 32 + bits) is planned for the future, but not supported at this point. + +

SANE_String:
A string pointer is encoded as a + SANE_Char array. The trailing NUL byte is considered part + of the array and a NULL pointer is encoded as a zero-length + array. + +
SANE_Handle:
A handle is encoded like a word. + The network backend needs to take care of converting these integer + values to the opaque pointer values that are presented to the user + of the network backend. Similarly, the SANE daemon needs to take + care of converting the opaque pointer values it receives from its + backends into 32-bit integers suitable for use for network encoding. + +

enumeration types:
Enumeration types are encoded + like words. + +

+ +

5.1.2 Type Constructors

+ +

Closely following the type constructors of the C language, the SANE network +protocol supports the following four constructors: +

+ +

pointer:
A pointer is encoded by a word that indicates + whether the pointer is a NULL-pointer which is then followed by the + value that the pointer points to (in the case of a non-NULL pointer; + in the case of a NULL pointer, no bytes are encoded for the pointer + value). + +

array:
An array is encoded by a word that indicates + the length of the array followed by the values of the elements in + the array. The length may be zero in which case no bytes are + encoded for the element values. + +

structure:
A structure is encoded by simply encoding the + structure members in the order in which they appear in the + corresponding C type declaration. + +

union:
A union must always be accompanied by a tag + value that indicates which of the union members is the currently the + active one. For this reason, the union itself is encoded simply by + encoding the value of the currently active member. + +

+ +

Note that for type constructors, the pointer, element, or member +values themselves may have a constructed type. Thus, the above rules +should be applied recursively until a sequence of primitive types has +been found. + +

Also SANE had no need for encoding of circular structures. This +greatly simplifies the network protocol. + +


+
Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc017.html b/sane2/0.08/doc017.html new file mode 100644 index 00000000..036227a2 --- /dev/null +++ b/sane2/0.08/doc017.html @@ -0,0 +1,460 @@ + +Next +Up +Previous +Contents +Index +
+ +Remote Procedure Call Requests +

5.2 Remote Procedure Call Requests

+ +

The SANE network protocol is a client/server-style remote procedure +call (RPC) protocol. This means that all activity is initiated by the +client side (the network backend)---a server is restricted to +answering request by the client. + +

5.2.1 SANE_NET_INIT

+ +

This RPC establishes a connection to a particular SANE network daemon. +It must be the first call in a SANE network session. The parameter +and reply arguments for this call are shown in the table below: +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word version_code SANE_Word status
+ SANE_String user_name SANE_Word version_code
+
+
+The version_code argument in the request is the SANE +version-code of the network backend that is contacting the network +daemon (see Section 4.1). The +``build-revision'' in the version code is used to hold the network +protocol version. The SANE network daemon receiving such a request +must make sure that the network protocol version corresponds to a +supported version since otherwise the encoding of the network stream +may be incompatible (even though the SANE interface itself may be +compatible). The user_name argument is the name of the user +on whose behalf this call is being performed. If the network backend +cannot determine a user-name, it passes a NULL pointer for this +argument. No trust should be placed in the authenticity of this +user-name. The intent of this string is to provide more convenience +to the user. E.g., it could be used as the default-user name in +subsequent authentication calls. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values.2 The version_code argument returns the +SANE version-code that the network daemon supports. See the comments +in the previous paragraph on the meaning of the build-revision in this +version code. + +

5.2.2 SANE_NET_GET_DEVICES

+ +

This RPC is used to obtain the list of devices accessible by the SANE +daemon. +

+ + + + + + + + + + + + +
+ request: reply:
+ void SANE_Word status
+ SANE_Device ***device_list
+
+
+There are no arguments in the request for this call. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The device_list +argument is a pointer to a NULL-terminated array of +SANE_Device pointers. + +

5.2.3 SANE_NET_OPEN

+ +

This RPC is used to open a connection to a remote SANE device. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String device_name SANE_Word status
+ SANE_Word handle
+ SANE_String resource
+
+
+The device_name argument specifies the name of the device to +open. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The handle +argument specifies the device handle that uniquely identifies the +connection. The resource argument is used to request +authentication. If it has a non-NULL value, the network +backend should authenticate the specified resource and then retry this +operation (see Section 5.2.10 for details on how to +authorize a resource). + +

5.2.4 SANE_NET_CLOSE

+ +

This RPC is used to close a connection to a remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection that should be +closed. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.5 SANE_NET_GET_OPTION_DESCRIPTORS

+ +

This RPC is used to obtain all the option descriptors for a +remote SANE device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle Option_Descriptor_Array odesc
+
+
+The handle argument identifies the remote device whose option +descriptors should be obtained. + +

In the reply, the odesc argument is used to return the array of +option descriptors. The option descriptor array has the following +structure: +

+
+struct Option_Descriptor_Array
+  {
+    SANE_Word num_options;
+    SANE_Option_Descriptor **desc;
+  };
+
+
+ +

5.2.6 SANE_NET_CONTROL_OPTION

+ +

This RPC is used to control (inquire, set, or set to automatic) a +specific option of a remote SANE device. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word option SANE_Word info
+ SANE_Word action SANE_Word value_type
+ SANE_Word value_type SANE_Word value_size
+ SANE_Word value_size void *value
+ void *value SANE_String *resource
+
+
+The handle argument identifies the remote device whose option +should be controlled. Argument option is the number (index) of +the option that should be controlled. Argument action +specifies what action should be taken (get, set, or set automatic). +Argument value_type specifies the type of the option value +(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT, +SANE_TYPE_FIXED, SANE_TYPE_STRING, +SANE_TYPE_BUTTON). Argument value_size specifies +the size of the option value in number of bytes (see +Section 4.2.9.6 for the precise meaning of this value). +Finally, argument value is a pointer to the option value. It +must be a writeable area that is at least value_size bytes +large. (Note that this area must be writable even if the action is to +set the option value. This is because the backend may not be able to +set the exact option value, in which case the option value is used to +return the next best value that the backend has chosen.) + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has undefined +values. The info argument returns the information on how well +the backend was able to satisfy the request. For details, see the +description of the corresponding argument in +Section 4.3.7. Arguments value_type and +value_size have the same values as the arguments by the same +name in corresponding request. The values are repeated here to ensure +that both the request and the reply are self-contained (i.e., they can +be encoded and decoded independently). Argument value is holds +the value of the option that has become effective as a result of this +RPC. + +

5.2.7 SANE_NET_GET_PARAMETERS

+ +

This RPC is used to obtain the scan parameters of a remote SANE +device. +

+ + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Parameters params
+
+
+The handle argument identifies the connection to the remote +device whose scan parameters should be returned. + +

In the reply, status indicates the completion status. If the +value is anything other than SANE_STATUS_SUCCESS, the +remainder of the reply has undefined values. The argument +params is used to return the scan parameters. + +

5.2.8 SANE_NET_START

+ +

This RPC is used to start image acquisition (scanning). +

+ + + + + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Status status
+ SANE_Word port
+ SANE_Word byte_order
+ SANE_String resource
+
+
+The handle argument identifies the connection to the remote +device from which the image should be acquired. + +

In the reply, argument resource is set to the name of the +resource that must be authorized before this call can be retried. If +this value is non-NULL, all other arguments have undefined +values (see Section 5.2.10 for details on how to +authorize a resource). Argument, status indicates the +completion status. If the value is anything other than +SANE_STATUS_SUCCESS, the remainder of the reply has +undefined values. The argument port returns the port number +from which the image data will be available. To read the image data, +a network client must connect to the remote host at the indicated port +number. Through this port, the image data is transmitted as a +sequence of data records. Each record starts with the data length in +bytes. The data length is transmitted as a sequence of four bytes. +These bytes should be interpreted as an unsigned integer in big-endian +format. The four length bytes are followed by the number of data +bytes indicated by the length. Except for byte-order, the data is in +the same format as defined for sane_read(). Since some +records may contain no data at all, a length value of zero is +perfectly valid. The special length value of 0xffffffff is +used to indicate the end of the data stream. That is, after receiving +a record length of 0xffffffff, the network client should close +the data connection and stop reading data. + +

Argument byte_order specifies the byte-order of the image +data. A value of 0x1234 indicates little-endian format, a value of +0x4321 indicates big-endian format. All other values are presently +undefined and reserved for future enhancements of this protocol. The +intent is that a network server sends data in its own byte-order and +the client is responsible for adjusting the byte-order, if necessary. +This approach causes no unnecessary overheads in the case where the +server and client byte-order match and puts the extra burden on the +client side when there is a byte-order mismatch. Putting the burden +on the client-side improves the scalability properties of this +protocol. + +

5.2.9 SANE_NET_CANCEL

+ +

This RPC is used to cancel the current operation of a remote SANE +device. +

+ + + + + + + + + +
+ request: reply:
+ SANE_Word handle SANE_Word dummy
+
+
+The handle argument identifies the connection whose operation +should be cancelled. + +

In the reply, the dummy argument is unused. Its purpose is to +ensure proper synchronization (without it, a net client would not be +able to determine when the RPC has completed). + +

5.2.10 SANE_NET_AUTHORIZE

+ + +

This RPC is used to pass authorization data from the net client to the +net server. +

+ + + + + + + + + + + + + + + +
+ request: reply:
+ SANE_String resource SANE_Word dummy
+ SANE_String username
+ SANE_String password
+
+
+The resource argument specifies the name of the resource to be +authorized. This argument should be set to the string returned in the +resource argument of the RPC reply that required this +authorization call. The username and password are the +name of the user that is accessing the resource and the password for +the specified resource/user pair. + +

Since the password is not encrypted during network transmission, it is +recommended to use the following extension: + +

If the server adds the string `$MD5$' to the resource-name followed +by a random string not longer then 128 bytes, the client may answer with the +MD5 digest of the concatenation of the password and the random string. To +differentiate between the MD5 digest and a strange password the client prepends +the MD5 digest with the string `$MD5$'. + +

In the reply, dummy is completely unused. Note that there is +no direct failure indication. This is unnecessary since a net client +will retry the RPC that resulted in the authorization request until +that call succeeds (or until the request is cancelled). The RPC that resulted +in the authorization request continues after the reply from the client and may +fail with SANE_STATUS_ACCESS_DENIED. + +

5.2.11 SANE_NET_EXIT

+ +

This RPC is used to disconnect a net client from a net server. There +are no request or reply arguments in this call. As a result of this +call, the connection between the client and the server that was +established by the SANE_NET_INIT call will be closed. + +

+ +


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc018.html b/sane2/0.08/doc018.html new file mode 100644 index 00000000..c5bd917d --- /dev/null +++ b/sane2/0.08/doc018.html @@ -0,0 +1,43 @@ + +Next +Up +Previous +Contents +Index +
+ +Contact Information +

6 Contact Information

+ +

The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +

+
+sane-devel-request@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the +above address. + +

A complete list of commands supported can be obtained by sending a +mail with a subject of ``help'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +

+http://www.mostang.com/sane/ +
+ +

+ + + +

+


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/doc019.html b/sane2/0.08/doc019.html new file mode 100644 index 00000000..e904efe1 --- /dev/null +++ b/sane2/0.08/doc019.html @@ -0,0 +1,212 @@ + +Previous +Up +Previous +Contents +Index +
+

Index

+ + +

+

analog gamma option
+array
+ +

Batch Scan Options
+bit depth option
+br-x
+br-y
+ +

code flow
+ +

device-name
+domain
+ +

enumeration types
+ +

gamma table options
+ +

hightlight options
+ +

image data format
+ +

lamp-off option
+lamp-on option
+ +

mailing list
+mode options
+ +

network authorization
+NUL
+ +

option count
+Option_Descriptor_Array
+ +

password
+pointer
+preview mode
+ +

resolution option
+ +

SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_ALWAYS_SETTABLE
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_HIDDEN
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_INVALIDATE_PREVIEW
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+scanner button options
+shadow options
+source options
+structure
+ +

threshold option
+tl-x
+tl-y
+Type Strings
+ +

union
+username
+ +

Vendor Strings
+ +

well-known options
+


+Previous +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/footnotes.html b/sane2/0.08/footnotes.html new file mode 100644 index 00000000..6478c6a8 --- /dev/null +++ b/sane2/0.08/footnotes.html @@ -0,0 +1,7 @@ +Footnotes

Footnotes

+ +


1 This is different from ANSI C where + any non-zero integer value represents logical TRUE. +


2 The sane network + daemon should be careful not to leak information in the undefined + portion of the reply. diff --git a/sane2/0.08/img000.gif b/sane2/0.08/img000.gif new file mode 100644 index 0000000000000000000000000000000000000000..2fb575aa150e4e889bcf72598fd383d1cc01ad04 GIT binary patch literal 6930 zcmV+t8|~yrNk%w1VGIL+0igf@0002y=H~zZ{{R31A^8LW00062EC2ui01N|w0YC!& zRF0|3?GK}zwAzca-n{!C2;xYV=82~2%C;s5$MQ_q_Kj0U&iDQg3<^Q6qVb444wuZP z^Euo>r#=9}dH`UxTrC3|@Or~nYnQ7ykE!fi@(qs{+jPqKZU%3+S$#Nv)hC#sR%Zw! zb*Q+=*eE0i85!B6RtZvB=%~3_lgRlA8Y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m--VS`p1J~ci*9hAU&wm|6!|cX)wxNx1aC)1N Y@-_&zz(Fs3MFXJ+VHiUhuB!k5JG^_nT>t<8 literal 0 HcmV?d00001 diff --git a/sane2/0.08/img001.gif b/sane2/0.08/img001.gif new file mode 100644 index 0000000000000000000000000000000000000000..a94820977e0adb25772b8002cd0231935dbc66b8 GIT binary patch literal 1011 zcmV(0j83c9Z0Jwhj?3reFa37D>rM8(|L?~221r8GJ39kQdyAWEo6Fm~y6YP( zObI+}eEe68yv&^0{0x1k98F!lG;N)&t+?IoorL`@KJG?M3i#Y>2Z6f0W1h%uwa{*4?N6od$Jh(k00 z1&$17O~hrdb&HlY?`KaU5kADAie#-X#_b2S{pGg5iHXvdE7I@Er z2(F{xg10$nSA!7ZgI0wWUWj3a8gewkgq?Z#A&Aw9h!R7ukyv75xuFPBDlJIJ;xDT) z5o17n!C0de#YL2(R?89BqjGpXDBq4S;b@JKk0CkGk3piKT4-}9`6M^B%%qT$Remx` z2V0u6%LHG_1sV@hj;V`lFif&xn{K`dXPg$Pg(ihqo>(VPOy*gKmjCbx2$ebl+K`{O z>?xd~`ygtgqF6C{sH5~jx`v=z0u&i1cGDW{bbW}T?wEM%goGG^+Is(Xp~ zqO0A&8mp{Hvf8Sxv%1KbuAo?&j;~SxtCg@M5G&0KrFw>1VqeHsr7SVbLKy8e(;8bs zIH?voB(~1Hn3lJPg3GJ812rVsjOI$aZLLts32(ge&MPOK>yp{7WA_eo=5+fm`Y*r% z!&B|R$r#Ka!s-;PFjWnM`7p#0kHhf9ZB%S=r5S&N@x~;1JS)iCbSyG&CC77ek||e1 z^2*1#Oc=~D%ghI literal 0 HcmV?d00001 diff --git a/sane2/0.08/img002.gif b/sane2/0.08/img002.gif new file mode 100644 index 0000000000000000000000000000000000000000..f2b21a2b1339d6d4ff019c38d6dcbeff9c4f30d0 GIT binary patch literal 1864 zcmV-O2eO(0Du4h00030|NkNR1OWg50RSuj0001R0&f670{)DTsmtvT zqnxzbi?iOm`wxcVNS5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Y(|At0{K|K*ew-u4LqrT`>2_D_kyIICBeO(TJnQMhUPXVXR++$&ix4 z2~Y~Mskc_PS)WC4VW4#+Hr0B#(sBfwo{fTLvsg&Pl1#PiiRMtz1vi?x7S1J5yRb71S(FSEnSv>@`KpUuYOF-S~TDL(Dy=g_0)!i!;0029- CbD)3# literal 0 HcmV?d00001 diff --git a/sane2/0.08/img003.gif b/sane2/0.08/img003.gif new file mode 100644 index 0000000000000000000000000000000000000000..4d9e5454c3714566f961ec8c738f1afd1a80e12e GIT binary patch literal 9568 zcmV-mC7;?yNk%w1VKxH(0m1+P0002l+1cji=JWIO|Ns900000000000A^8LW000C4 zEC2ui05$^t0YC%(2(#S&Fv>}*y*TU5yZ>M)j%2w3M5?ZA>%MR-&vb3yt77ha@BhG{ za7ZjlP`IRW$!s=t#;9~kty-^G4bsW&dcQPimM0#F%j2|q&2BHY;JAFQM0)^ud?TMX z@ArKaI%f=ndS+*KZi|eKjv{b$l9QAvijSC?nwy*^k(HpKT$i1trl+WypQ5a-HKdP+ z5V94t7Pc6;4!VM{R)@H}yS^a8sZp!0%F8*9w1$3#3czS()4Okf)P>mA58lz-h_ZT# z;n_!o;DqPX(A?yKfPZiD^Y!ic&*=EaKgrAjwj$=QpuvL(M*tMauoA(9B=`U#H*T0Q zY1it-GsgZW(Kc~VBx1BCj~&F5M;fXeh_dBFXY^XiEVQyFsFyQy>fE_#q0OI8aAp7? zps3NKNRujE%CxD|r%(Ybex(yjZouiw9b0}CG9HSE~KVSMZ*Otm8)ri-ttWlXuU<;$2ezeUWMN!bgL zHH#iiy0q!jsM&U2jpOsJzyJcso=v;9?c2C>>)y?~x9{J;g9{%{ytwh>$dfCt4bU*_ zpRQ}cUM@TKZ0iB|(AIt(JN572!;2qJzP$O|VVys37+uix^YG)#pHIKO{qX76uWmmf z^!`@w_XQ~6b<_bko`L5fxSMwh4k%oH`f{RJnzhS7|%vS{$U2t~BW`m1-*L zsHA4fX{YSP30R}ZA&Og`AfoqShYIo;8=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oj9IwkCU3Wf3X~;}jZD%*L;9#xp7f3@ZRtoqI@24* zG^d3+=1+qcqN4t&I!J@+RI7T`tZucdUu|Vim->*iK3}Z?cxw~qntZzs#HeGeV=%e6 z*9Mv7sEOT@`yo3VYykGHon32af4a+wUN*ChZEYwtI@{W=Hn&eLZBd6?+}|#DUL EJKgG0Y5)KL literal 0 HcmV?d00001 diff --git a/sane2/0.08/index.html b/sane2/0.08/index.html new file mode 100644 index 00000000..4c024a9b --- /dev/null +++ b/sane2/0.08/index.html @@ -0,0 +1,63 @@ + +Next +Up +Previous +Contents +Index +


+./sane + + + + +

+ + + + + + + +

+ + + + + + + + + +

+ + + +

+ +

+ +

+ + + + +

+ +

SANE Standard Version 2.0 proposal 0.08 - rauch/beck

+
+
Dec 8, 2002
+ + +

+ + + + +

1 Preface

2 Introduction

3 The SANE Environment

4 The SANE Application Programmer Interface (API)

5 Network Protocol

6 Contact Information


+Next +Up +Previous +Contents +Index +
+ diff --git a/sane2/0.08/sane2-0.08.dvi b/sane2/0.08/sane2-0.08.dvi new file mode 100644 index 0000000000000000000000000000000000000000..51048f4877be447e35db4369a4d323a87ddd6289 GIT binary patch literal 231836 zcmeEv3w)eanRhyqwg|1J?Fg7{eJ%Hn|ATm`wl&!0{`>>=8!oZp)=;hQpx^Qa!%d+`E@n5bv1Phmenq- zU-CITF^!MC+5g_a|F-)sJ?QqK?XPv-dC_*?$4~k6(Dv6qp8C{KdirTU+PUwH`ip*6 zalm&jsMr%r&FD||#TO^k=YF!mEG+KX;5$vB zuB^YJV#&M=KWun-_=*XC5mq{G>=(WE$~Tt}?R@W(zqle-@$O%)bT;c;oP4k`7EOkt z$;9x;$)EfD(9q7q70{)i6$#xIb34^snlVq`2Fx5o>gUc?7 z9=ceu0~X6e$_X<8IVU_EiuZ-1u}G|EFkSJPl~Z`244EkO|NhSj{(;(?fc$zven)SJ z@{#H#(=4187Gj7}P=XXzfAaJtE-BPoxtdG{x_ZOW9=@B5Wda#lpfk|5am%k>3P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Dy`XJZOXBIID%zqObgf{vhl05SG{AYm`&WR)QI)$3bX5Rp>tbzF&YVB@@MX!3y2-`we+Xbyv5*Z$lM;;F=uY)a|^i69jt%xhR0SkIZ+haoO%j`aWToL3tCSNKO~o&_7$!drs;)~znK> z>l+pvx!|laeY5thT=}7&9)|%7q@C8Hv4QdN)#-h;Pd)$k?XJnzqJfcgx_;%p<%=4x zd1ApLH#R-Ou}kIG*A)GFn*4fL(XVei_ll=IH!quajiY(jzEgkr)W`CHO`xY2emzBg zJqm3#*y(E#JAL8TCGzXB4_sC7>&bEq+ZD_nWAVvLmf!4_!!c4jaEz0VxV8Ts!Cyxb z`1M4Y*PlUGJ3)Ru?iU*iRy+3H*Ian$0v?Y4Uo$W=zGmMsa$p~j3Y^!=ufg3CWJk-d v!L|77QRn{t@*Qqp3o$FUwcw>MOdKPN3lIiI;@j(2zPP}40 D E +%EndDVIPSBitmapFont +/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60 +60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60 +60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37 +99.6264 /Courier rf +%DVIPSBitmapFont: Fd cmtt10 10.95 13 +/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F +A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F +A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65 +D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800 +A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69 +D78 D<90390FF803C0D97FFF13E048B512C74814 +F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C +91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900 +3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F +E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380 +253A7BB830>83 D +87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813 +03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00 +3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7 +13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F +90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712 +7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13 +07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0 +252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0 +91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339 +7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0 +4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C +14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01 +FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111 +D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC +4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F +9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC +03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48 +15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A +5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A +485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E +%EndDVIPSBitmapFont +/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37 +1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25 +3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35 +74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1 +49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1 +66.4176 /Times-Roman rf +%DVIPSBitmapFont: Fh cmmi10 10.95 16 +/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA +1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0 +EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC +EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F +F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED +3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC +17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F +C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED +01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F +F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC +07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB +FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72 +7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F +E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE +4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D +90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9 +FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0 +1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01 +1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8 +A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A +D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0 +387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848 +14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13 +074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F +5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0 +EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000 +157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0 +38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F +FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807 +031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13 +1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2 +ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7 +2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F +001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B +137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E +13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00 +1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0 +C648C9FC2A3B7EA72D>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmr8 8 3 +/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23 +>49 DII E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fj cmr10 10.95 12 +/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201 +5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E +123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB +01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12 +007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6 +14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12 +1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9 +FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC +EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713 +800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015 +C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F +90C7FCEB07F8243F7CBC2D>53 DI< +1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814 +1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301 +5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16 +7BA147>61 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fk cmsy10 10.95 5 +/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4 +EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100 +DI E +%EndDVIPSBitmapFont +/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25 +25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24 +90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33 +39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66 +55 72 1[61 78 72 94 66 2[39 78 78 61 1[72 72 66 72 7[50 +50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}51 +99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53 +66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120 +86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86 +11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43 +119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76 +3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13 +172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55 +55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86 +90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45 +66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30 +40 45 40 45 40 30 5[56 66 66 86 66 66 56 51 61 1[51 66 +66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51 1[25 25 +45 45 45 45 45 45 45 45 45 45 25 23 30 23 2[30 30 30 +35[51 51 2[{TeXBase1Encoding ReEncodeFont}78 90.9091 +/Times-Roman rf /Fr 105[45 27[40 45 45 66 45 51 30 35 +40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 40 51 45 +9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61 66 66 61 +66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23 2[30 30 40[{ +TeXBase1Encoding ReEncodeFont}55 90.9091 /Times-Bold +rf /Fs 135[103 149 103 115 69 80 92 1[115 103 115 172 +57 115 1[57 115 103 69 92 115 92 115 103 12[138 115 2[126 +1[149 1[138 2[80 2[126 138 1[149 1[149 23[69 69 40[{ +TeXBase1Encoding ReEncodeFont}34 206.559 /Times-Bold +rf /Ft 154[44 1[44 30[72 11[50 5[50 1[50 3[25 44[{ +TeXBase1Encoding ReEncodeFont}7 99.6264 /Times-Roman +rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76 +86 76 86 76 10[124 2[96 4[124 8[105 3[124 8[86 5[86 1[86 +48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188 +/Times-Roman rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%PaperSize: A4 + +%%EndSetup +%%Page: 1 1 +1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44 +b(2.0)f(proposal)i(0.08)e(-)g(rauch/beck)1708 2698 y +Ft(Dec)25 b(8,)g(2002)p eop +%%Page: 1 2 +1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430 +b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26 +b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 +b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91 +b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647 +y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 +b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24 +b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25 +b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n +(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639 +b(13)136 3593 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3764 y(4.2)96 +b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(14)345 3935 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(14)345 4106 y(4.2.2)110 b(Boolean)25 +b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.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(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)345 5132 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7 +b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(17)1927 5381 y(1)p eop +%%Page: 2 3 +2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7 +b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(19)345 294 y(4.2.10)65 b(Internationalizatio)q(n)44 +b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(22)136 466 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)82 b(26)345 638 y(4.3.1)110 b Fp(sane)p 861 +638 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 809 +y(4.3.2)110 b Fp(sane)p 861 809 V 31 w(exit)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 981 y(4.3.3)110 b Fp(sane)p 861 981 +V 31 w(get)p 1057 981 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1153 +y(4.3.4)110 b Fp(sane)p 861 1153 V 31 w(open)75 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(27)345 1324 y(4.3.5)110 b Fp(sane)p 861 +1324 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1496 y(4.3.6)110 +b Fp(sane)p 861 1496 V 31 w(get)p 1057 1496 V 32 w(option)p +1419 1496 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(28)345 1667 y(4.3.7)110 b Fp(sane)p 861 1667 V 31 w(control)p +1277 1667 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(28)345 1839 y(4.3.8)110 b Fp(sane)p +861 1839 V 31 w(get)p 1057 1839 V 32 w(parameters)25 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(29)345 2011 y(4.3.9)110 b Fp(sane)p 861 2011 V 31 w(start)88 +b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(34)345 2182 y(4.3.10)65 b Fp(sane)p +861 2182 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(34)345 2354 +y(4.3.11)65 b Fp(sane)p 861 2354 V 31 w(cancel)33 b Fq(.)45 +b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(35)345 2526 y(4.3.12)65 b Fp(sane)p 861 2526 +V 31 w(set)p 1057 2526 V 32 w(io)p 1199 2526 V 31 w(mode)78 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2697 y(4.3.13)65 b Fp(sane)p 861 2697 V 31 w(get)p +1057 2697 V 32 w(select)p 1419 2697 V 30 w(fd)37 b Fq(.)45 +b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(36)345 2869 y(4.3.14)65 b Fp(sane)p 861 2869 V 31 w(strstatus)73 +b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(37)136 3040 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 3212 y(4.5)96 +b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(40)345 3384 y(4.5.1)110 b(Option)25 b(Number)e(Count)70 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3555 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3727 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85 +b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(41)345 3899 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(42)345 4070 y(4.5.5)110 b(Depth)24 b(Option)50 +b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)82 b(43)345 4242 y(4.5.6)110 b(Scan)24 +b(Mode)g(Options)29 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(43)345 4413 y(4.5.7)110 b(Scan)24 +b(Source)g(Options)58 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(43)345 4585 y(4.5.8)110 b(Threshold)26 +b(Option)39 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)82 b(43)345 4757 y(4.5.9)110 b(Gamma)23 +b(T)-7 b(able)23 b(Options)68 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(44)345 4928 y(4.5.10)65 +b(Analog)25 b(Gamma)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(44)345 5100 y(4.5.11)65 +b(Shado)n(w)24 b(Option)49 b(.)c(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)1927 5381 +y(2)p eop +%%Page: 3 4 +3 3 bop 345 123 a Fq(4.5.12)65 b(Highlight)26 b(Option)59 +b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)82 b(45)345 294 y(4.5.13)65 b(Lamp)23 b(Options)93 +b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)82 b(46)345 466 y(4.5.14)65 b(Scanner)25 b(Button)f(Options) +83 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(46)345 638 y(4.5.15)65 b(Batch)24 b(Scan)g(Options)29 +b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)82 b(47)0 900 y Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989 +b(48)136 1072 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)82 b(49)345 1243 y(5.1.1)110 b(Primiti)n(v)o(e)24 +b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 1415 y(5.1.2)110 b(T)-7 +b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 1587 y(5.2)96 +b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 1758 y(5.2.1)110 +b Fp(SANE)p 861 1758 28 4 v 31 w(NET)p 1057 1758 V 32 +w(INIT)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) +g(.)g(.)g(.)g(.)82 b(50)345 1930 y(5.2.2)110 b Fp(SANE)p +861 1930 V 31 w(NET)p 1057 1930 V 32 w(GET)p 1254 1930 +V 31 w(DEVICES)62 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(51)345 2102 y(5.2.3)110 b Fp(SANE)p 861 2102 +V 31 w(NET)p 1057 2102 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 +2273 y(5.2.4)110 b Fp(SANE)p 861 2273 V 31 w(NET)p 1057 +2273 V 32 w(CLOSE)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 2445 y(5.2.5)110 +b Fp(SANE)p 861 2445 V 31 w(NET)p 1057 2445 V 32 w(GET)p +1254 2445 V 31 w(OPTION)p 1615 2445 V 30 w(DESCRIPTORS)28 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 2616 y(5.2.6)110 b +Fp(SANE)p 861 2616 V 31 w(NET)p 1057 2616 V 32 w(CONTROL)p +1474 2616 V 29 w(OPTION)36 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +g(.)82 b(52)345 2788 y(5.2.7)110 b Fp(SANE)p 861 2788 +V 31 w(NET)p 1057 2788 V 32 w(GET)p 1254 2788 V 31 w(PARAMETERS)34 +b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 +2960 y(5.2.8)110 b Fp(SANE)p 861 2960 V 31 w(NET)p 1057 +2960 V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 3131 y(5.2.9)110 +b Fp(SANE)p 861 3131 V 31 w(NET)p 1057 3131 V 32 w(CANCEL)41 +b Fq(.)k(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(54)345 3303 y(5.2.10)65 b Fp(SANE)p 861 3303 V 31 w(NET)p +1057 3303 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)g(.)82 b(54)345 3475 y(5.2.11)65 b Fp(SANE)p +861 3475 V 31 w(NET)p 1057 3475 V 32 w(EXIT)82 b Fq(.)46 +b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(55)0 3737 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871 +b(56)1927 5381 y Fq(3)p eop +%%Page: 4 5 +4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349 +y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45 +b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data) +g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g +(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45 +b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2119 y(4.2)96 +b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(42)1927 5381 y(4)p eop +%%Page: 5 6 +5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349 +y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h +(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i +(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 +b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31 +w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g +(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) +g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p +Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.) +f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036 +y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) +g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 +b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 +b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p +Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) +82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f +(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f +(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722 +y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139 +2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g +(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) +h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop +%%Page: 6 7 +6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0 +1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g +(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38 +b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e +(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i +(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0 +2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g +(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d +(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c +(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f +(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22 +b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 +2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g +(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119 +b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d +(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f +(an)e(application)k(that)d(requires)h(access)g(to)0 3135 +y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j +(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5 +b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0 +3248 y(implementations)35 b(of)c(SANE)f(components.)55 +b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g +(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o +(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c +(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0 +3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as) +d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i +(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l +(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29 +b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26 +b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i +(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement) +i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o +(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h +(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o +(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7 +b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g +(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o +(e)d(this:)0 4658 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 4658 a 0 4658 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 4658 a 151 x +Fq(P)o(aragraphs)h(that)f(changed)i(since)f(the)e(last)h(re)n(vision)i +(of)d(the)h(documention)i(are)e(mark)o(ed)h(lik)o(e)f(this)g +(paragraph.)3600 4809 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 3600 4809 a 3600 4809 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 3600 +4809 a 3600 4809 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 3600 4809 a 1927 5381 a Fq(6)p eop +%%Page: 7 8 +7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0 +1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace) +h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g +(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22 +b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one) +g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0 +2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e +(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f +(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 +b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23 +b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f +(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21 +b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n +(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29 +b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g +(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i +(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the) +f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i +(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h +(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f +(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0 +2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e +(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5 +b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51 +b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g +(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 +b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h +(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0 +3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21 +b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g +(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g +(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f +(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k +Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 +3812 y(back)o(ends.)1927 5381 y(7)p eop +%%Page: 8 9 +8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51 +b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g +(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32 +b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0 +1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e +(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44 +b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g +(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f +(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30 +b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25 +b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f +(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d +(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 +b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h +(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p +Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n +(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j +(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an) +h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g +(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 +2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f +(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30 +b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f +(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h +(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g +(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22 +b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h +Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e +(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f +(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back) +o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e +(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h +(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o +(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31 +b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h +(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227 +4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h +(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n +(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g +(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o +(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227 +4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e +(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227 +4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k +(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d +(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n +(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f +(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29 +b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o +(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f +(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4 +v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro) +o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h +(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f +(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n +(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i +(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927 +5381 y(8)p eop +%%Page: 9 10 +9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227 +310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g +Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p +2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p +Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i +(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n +(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227 +536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time) +f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136 +724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27 +b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i +(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227 +837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41 +b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e +(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d +(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o +(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30 +b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g +Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f +(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha) +n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got) +e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227 +1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f +(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6 +b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i +(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e +(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p +Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e +(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227 +1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d +(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30 +b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g +(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to) +227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.) +43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f +(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g +(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g +(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h +(that)f(scanner)-5 b(.)0 2479 y + currentpoint currentpoint translate 0.64821 0.64821 scale neg exch +neg exch translate + 0 2479 a 0 2479 a + gsave currentpoint currentpoint translate 270 neg rotate neg exch +neg exch translate + 0 2479 +a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550 +@rwi @setspecial +%%BeginDocument: figs/hierarchy.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: hierarchy.fig +%%Creator: fig2dev Version 3.1 Patchlevel 2 +%%CreationDate: Thu Jan 30 22:02:12 1997 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%Magnification: 1.00 +%%Orientation: Landscape +%%BoundingBox: 0 0 355 722 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-17.0 -17.0 translate + 90 rotate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n 0 612 m 0 0 l 792 0 l 792 612 l cp clip + 0.06000 0.06000 sc +% Polyline +n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr +% Polyline +n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr +15.000 slw +% Polyline +n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +11399 5182 m +gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr +/Helvetica ff 270.00 scf sf +8099 5182 m +gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr +% Polyline +n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr +% Polyline +n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr +% Polyline +n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr +% Polyline +n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr +% Polyline +n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr +7.500 slw +% Polyline +n 2700 1800 m 1200 3000 l gs col-1 s gr +% Polyline +n 3000 1800 m 3000 3000 l gs col-1 s gr +% Polyline +n 3300 1800 m 4800 3000 l gs col-1 s gr +% Polyline +n 9600 1800 m 9600 2100 l gs col-1 s gr +% Polyline +n 9450 2700 m 8100 4800 l gs col-1 s gr +% Polyline +n 11400 4200 m 11400 4800 l gs col-1 s gr +% Polyline +n 1200 3600 m 1200 4200 l gs col-1 s gr +% Polyline +n 3000 3600 m 3000 4125 l gs col-1 s gr +% Polyline +n 7875 5400 m 7350 5850 l gs col-1 s gr +% Polyline +n 8250 5400 m 8775 5850 l gs col-1 s gr +% Polyline +n 11475 5400 m 11475 5850 l gs col-1 s gr +15.000 slw +% Polyline +n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr +% Polyline +n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr +7.500 slw +% Polyline +n 9750 2700 m 11400 3600 l gs col-1 s gr +% Interp Spline +gs n 4800 3600 m + 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto + 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto + 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto + 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto + 7224.0 624.7 8573.7 446.9 9450 900 curveto + 9524.5 938.5 9562.0 1013.5 9600 1200 curveto + gs col-1 s gr + gr + +/Helvetica ff 270.00 scf sf +1199 3382 m +gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 3382 m +gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +1200 4425 m +gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 4380 m +gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +7350 6165 m +gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +8925 6165 m +gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +11475 6135 m +gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +3000 600 m +gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +9600 630 m +gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica-Oblique ff 210.00 scf sf +4725 5850 m +gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +2999 1582 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +4799 3382 m +gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 1582 m +gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +9599 2482 m +gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 270.00 scf sf +11399 3982 m +gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr +$F2psEnd +rs + +%%EndDocument + @endspecial 2958 2479 a + currentpoint grestore moveto + 2958 2479 a 0 2479 a + currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale +neg exch neg exch translate + 0 2479 +a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0 +4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h +(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44 +b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g +(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f +(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0 +5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h +(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i +(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop +%%Page: 10 11 +10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e +Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36 +b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d +(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o +(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51 +b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h +(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e +(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d +Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e +Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f +(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22 +b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f +(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f +(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i +(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i +(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g +(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0 +972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h +(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g +(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back) +o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e +(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0 +1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0 +1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815 +y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h +(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f +(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39 +b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation) +j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0 +2041 y(applications)f(and)c(de)n(vices.)59 b(While)34 +b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has) +f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i +(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g +(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0 +2266 y(accommodate)26 b(future)e(applications)k(or)23 +b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g +(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is) +f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n +(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0 +2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g +(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21 +b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n +(alues.)30 b(Each)24 b(sample)g(v)n(alue)g(represents)j(one)d(channel)h +(\(e.g.,)e(the)h(red)g(channel\).)0 2836 y(The)i(SANE)f(API)g +(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39 +b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0 +2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f +(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67 +b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34 +b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f +(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0 +3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g +(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g +(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f +(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0 +3459 y(When)30 b(transmitting)i(an)e(image)g(frame)g(by)g(frame,)h(the) +f(frontend)i(needs)f(to)e(kno)n(w)h(what)g(part)g(of)g(the)g(image)g(a) +f(frame)0 3572 y(represents)e(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g +(should)i(e)o(xpect\).)31 b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d +(API)i(tags)i(e)n(v)o(ery)f(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f +(format)i(descriptor)-5 b(.)0 3704 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 3704 a 0 3704 +a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 3704 a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f +(of)e(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e +Fp(SANE)p 2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31 +w(RAW)e Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p +225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)j(These)i(types)i +(are)f(discussed)i(in)d(detail)h(in)g(the)f(follo)n(wing)i(sections.)45 +b(The)28 b(frame)h(types)g(used)0 4082 y(by)d(the)f(pre)n(vious)j(v)o +(ersion)f(1)e(of)h(this)g(standard)i(\()p Fp(SANE)p 1793 +4082 V 31 w(FRAME)p 2099 4082 V 30 w(GRAY)p Fq(,)23 b +Fp(SANE)p 2615 4082 V 31 w(FRAME)p 2921 4082 V 30 w(RGB)p +Fq(,)g Fp(SANE)p 3382 4082 V 31 w(FRAME)p 3688 4082 V +31 w(RED)p Fq(,)0 4195 y Fp(SANE)p 225 4195 V 31 w(FRAME)p +531 4195 V 30 w(GREEN)p Fq(,)e(and)j Fp(SANE)p 1254 4195 +V 30 w(FRAME)p 1559 4195 V 31 w(BLUE)p Fq(\))d(are)j(obsolete)i(and)e +(superseded)i(by)e Fp(SANE)p 3235 4195 V 31 w(FRAME)p +3541 4195 V 30 w(RAW)p Fq(.)0 4503 y Fm(3.2.1)99 b(Pixel)24 +b(oriented)i(frames)0 4736 y Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h +(frames)e(is)g Fp(SANE)p 1561 4736 V 31 w(FRAME)p 1867 +4736 V 30 w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g +(channels)i(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32 +b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f +(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0 +4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h +Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g +Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25 +b(type.)0 5075 y(See)e(section)i(4.3.8)f(on)f(page)i(29)e(for)h +(details)h(about)g(the)f(format)g(descriptions.)2563 +5075 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 2563 5075 a 2563 5075 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 2563 5075 a 2563 5075 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 2563 5075 a 1905 5381 a Fq(10)p eop +%%Page: 11 12 +11 11 bop 0 123 a Fq(Each)24 b(sample)h(v)n(alue)g(has)f(a)g(certain)h +(bit)g(depth.)31 b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g +(entire)i(image)e(and)h(can)f(be)g(as)g(small)g(as)0 +236 y(one)f(bit.)29 b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h +(or)g(16)g(bits)g(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5 +b(s)25 b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0 +349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n +(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f +(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d +(sample)h(v)n(alue)g(of)g(depth)g(8\).)0 481 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 481 +a 0 481 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 481 a 137 x Fq(The)f(complete)i(image)f(may)f(consist)i(of) +f(se)n(v)o(eral)g(dif)n(ferent)i(channels.)31 b(The)23 +b(number)h(of)g(channels)i(is)d(de\002ned)h(by)g(mem-)0 +731 y(ber)f Fp(channels)p 583 731 28 4 v 30 w(per)p 778 +731 V 31 w(image)d Fq(of)j Fp(SANE)p 1422 731 V 31 w(Parameters)p +Fq(.)g(The)g(image)h(may)f(be)g(transmitted)i(in)e(an)h(arbitrary)h +(num-)0 844 y(ber)i(of)f(frames)i(which)f(can)g(be)f(determined)j(by)e +(w)o(atching)h(the)f Fp(SANE)p 2300 844 V 31 w(PFLAG)p +2606 844 V 30 w(LAST)p 2856 844 V 31 w(FRAME)d Fq(\003ag)i(in)g(said)i +(type)f(\(or)0 957 y(by)c(counting)j(the)d(channels\).)31 +b(Note:)e(This)23 b(frame)g(type)h(replaces)h(all)e(frame)g(types)h(of) +f(the)h(SANE)c(standard)25 b(v)o(ersion)g(1.)3900 957 +y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 3900 957 a 3900 957 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 3900 957 a 3900 957 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 3900 957 +a 0 1113 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i +(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48 +b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 1226 +y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f +(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f +(8\),)h(or)f(a)g(partial)h(sam-)0 1339 y(ple)j(v)n(alue)g(\(for)f(an)h +(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31 +b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g +(are)0 1452 y(transmitted)26 b(in)d(the)h(machine')-5 +b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 1651 +y Fr(Back)o(end)22 b(Implementation)i(Note)227 1795 y +Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h +(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f +(adjusted)227 1908 y(appropriately)32 b(if)c(necessary)-6 +b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i +(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 2021 +y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o +(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f +(then)f(apply)i(the)227 2134 y(adjustment)d(if)d(necessary)-6 +b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er) +n(-mak)o(es-right)q(\224)29 b(approach.)975 3263 y @beginspecial +0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial +%%BeginDocument: figs/xfer.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: xfer.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:30 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 362 182 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-134.0 370.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +15.000 slw +% Polyline +n 2400 3300 m 8100 3300 l gs col-1 s gr +n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3375 m 2400 3675 l gs col-1 s gr +15.000 slw +n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 3750 m 8100 3750 l gs col-1 s gr +n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 3825 m 2400 4125 l gs col-1 s gr +15.000 slw +n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr +15.000 slw +% Polyline +n 2400 4200 m 8100 4200 l gs col-1 s gr +n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +7.500 slw +% Polyline +n 8100 4275 m 2400 4575 l gs col-1 s gr +15.000 slw +n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 2400 4650 m 8100 4650 l gs col-1 s gr +n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1111 3459 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24 +b(order)h(of)e(image)h(data)g(bytes)0 3759 y(The)f(order)i(in)f(which)g +(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e +(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0 +3872 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g +(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e +(right-most)i(column.)30 b(The)0 3985 y(left-to-right,)35 +b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h +(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4097 +y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g +(e)o(xample\).)0 4254 y(If)d(a)g(frame)h(contains)h(multiple)g +(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f +(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0 +4367 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h +(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f +(bit-depth)j(of)d(8.)0 4523 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g +(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g +Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h +(depth)h(1)0 4636 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g +(interlea)n(v)o(ed)j(f)o(ashion.)38 b(The)25 b(\002rst)h(sample)h(of)f +(each)g(byte)h(is)f(represented)j(by)d(the)g(most)0 4749 +y(signi\002cant)g(bit.)0 4769 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 4769 a 0 4769 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 4769 +a 137 x Fq(F)o(or)g(gray)h(channels)i(at)d(a)g(bit)h(depth)g(of)g(1)f +(only)h(tw)o(o)f(sample)h(v)n(alues)h(are)f(possible:)37 +b(1)26 b(represents)k(minimum)c(intensity)0 5019 y(\(black\))32 +b(and)f(0)f(represents)j(maximum)d(intensity)i(\(white\).)50 +b(F)o(or)29 b(all)i(other)g(channel)h(types)g(and)e(bit)h(depths)h(a)d +(sample)0 5132 y(v)n(alue)24 b(of)g(0)f(represents)j(minimum)e +(intensity)i(and)e(lar)n(ger)h(v)n(alues)f(represent)i(increasing)h +(intensity)-6 b(.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 0 5151 a +0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 0 5151 a 1905 5381 a Fq(11)p eop +%%Page: 12 13 +12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx +93 @ury 3744 @rwi @setspecial +%%BeginDocument: figs/image-data.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: image-data.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Fri Nov 22 08:53:36 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 521 93 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-88.0 120.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +1875 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3225 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +4575 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l + 5850 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +2475 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 600 m +gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +5925 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +7275 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +% Polyline +n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +8625 1125 m +gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr +15.000 slw +% Polyline +n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr +7.500 slw +% Polyline +n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l + 9900 900 l gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +6525 1575 m +gs 1 -1 sc (r) col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1575 m +gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1575 m +gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 600 m +gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +9225 1950 m +gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +7875 1950 m +gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +6525 1950 m +gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +5175 1950 m +gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +3825 1950 m +gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2475 1950 m +gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +10050 1275 m +gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1125 m +gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23 +b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 1070 +a 0 1070 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0 +1394 y Fq(It)31 b(also)g(is)g(possible)i(to)e(transmit)h(arbitrary)h +(\(not)f(necessaryly)i(pix)o(el)e(oriented\))h(data.)52 +b(This)30 b(allo)n(ws)i(transmission)h(of)0 1507 y(compressed)26 +b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 1679 +y(The)k(type)h(of)g(arbitrary)i(data)e(frames)g(is)f +Fp(SANE)p 1558 1679 28 4 v 31 w(FRAME)p 1864 1679 V 31 +w(MIME)p Fq(.)e(The)i(frame)g(contains)j(arbitrary)g(data)e(of)g(the)g +(MIME)0 1791 y(\(see)f(RFC)e(1521/1522\))30 b(type)e(that)f(is)f(gi)n +(v)o(en)i(in)e(the)h Fp(format)p 2039 1791 V 30 w(desc)d +Fq(member)j(of)g(the)g Fp(SANE)p 3096 1791 V 31 w(Parameters)21 +b Fq(struc-)0 1904 y(tured)30 b(type)h(\(see)f(section)h(4.3.8)e(on)h +(page)g(29\).)47 b(As)29 b(such,)i(it)e(is)h(assumed)g(to)g(be)f +(incomprehensible)34 b(to)c(the)f(frontend,)0 2017 y(e)o(xcept)f(for)e +(selected)j(types)e(the)g(frontend)h(is)f(speci\002cally)h(capable)g +(of)f(handling)i(internally)-6 b(.)40 b(The)26 b(frontend)i(is)e(free)h +(to)0 2130 y(ignore)32 b(those)g(frames,)g(or)f(emplo)o(y)h(an)o(y)e +(appropriate)k(means)d(to)g(otherwise)h(handle)g(this)f(data)h(\(lik)o +(e)f(sa)n(ving)i(them)d(to)0 2243 y(disk)24 b(or)g(spa)o(wning)h(an)e +(e)o(xternal)i(vie)n(wer\).)1392 2243 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 1392 2243 a 1392 +2243 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 1392 2243 a 1392 2243 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 1392 2243 a 1905 5381 +a Fq(12)p eop +%%Page: 13 14 +13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51 +b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512 +y(Interface)e(\(API\))0 1879 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 0 1879 a 0 1879 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 0 1879 +a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f +(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y) +h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i +(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o +(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0 +2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h +(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e +(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d +(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33 +b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0 +2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109 +2682 y Fp(#include)51 b()0 2748 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 0 2748 +a 0 2748 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 0 2748 a 0 2748 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 0 2748 a 333 x Fn(4.1)119 +b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard) +25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28 +b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e +(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d +(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e +(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51 +b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30 +b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g +(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g +(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h +(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g +(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o +(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g +(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o +(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o +(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i +(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o +(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129 +y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f +(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n +(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f +(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n +(vision.)48 b(While)30 b(control)h(of)e(these)0 4406 +y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o +(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28 +b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e +(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38 +b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n +(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o +(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o +(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4 +v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29 +b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d +(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905 +5381 y(13)p eop +%%Page: 14 15 +14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p +868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p +Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g +(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e +(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g +(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p +Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f +Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o +(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g +(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14 +b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d +(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704 +y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g +(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427 +817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e +(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the) +427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427 +1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f +(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427 +1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f +(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and) +427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227 +1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V +30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h +(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427 +1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p +868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 +b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of) +427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i +Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p +868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18 +b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d +(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j +Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0 +2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23 +b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f +(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o +(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59 +b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52 +b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31 +w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g +(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f +(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c +Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n +(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f +Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068 +y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g +Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15 +b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j +Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in) +e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j +Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d +Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24 +b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e +(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i +Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33 +b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i +(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25 +b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p +Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o +(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j +(mapping.)1905 5381 y(14)p eop +%%Page: 15 16 +15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0 +356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n +(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v) +n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j +Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g +(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097 +436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type) +h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 +b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377 +b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 +y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias) +g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e +(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 +b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 +b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g +Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 +1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0 +1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y +Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h +(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h +Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e +Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 +b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6 +b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0 +2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f +(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays) +f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672 +y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27 +b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f +Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0 +2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g +(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0 +3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326 +y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n +(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in) +f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p +Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e +Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27 +b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6 +b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103 +b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0 +4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p +940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22 +b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29 +b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f +(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p +Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26 +b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p +Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g +(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5 +b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24 +b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17 +b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f +(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28 +b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36 +b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros) +h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g +(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p +0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19 +b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g +(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905 +5381 y Fq(15)p eop +%%Page: 16 17 +16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p +Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c +(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f +(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking) +h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f +Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427 +349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p +Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine) +f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427 +608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j +Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o +(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g +Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227 +1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48 +b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48 +b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i +(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6 +b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0 +1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw) +o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0 +2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29 +b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o +(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g +(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d +Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48 +b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x) +o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27 +b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f +(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0 +2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50 +b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to) +f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o +(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227 +3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23 +b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695 +V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f +(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27 +b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f +Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52 +b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e +(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h +Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d +Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f +(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23 +b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773 +y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26 +b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i +(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905 +5381 y(16)p eop +%%Page: 17 18 +17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7 +b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i +(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560 +356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32 +b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6 +b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0 +961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n +(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e +(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p +Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f +(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n +(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0 +1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f +(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether) +f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57 +b(If)31 b(an)h(operation)j(completes)e(successfully)-6 +b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56 +b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f +(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30 +b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0 +1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23 +b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p +2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f +(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385 +2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p +1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p +3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113 +v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p +1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p +2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6 +b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660 +2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p +1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25 +b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435 +2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627 +V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083 +2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661 +V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31 +w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p +1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n +(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V +435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021 +2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083 +2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p +3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966 +28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000 +4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n +(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113 +V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p +1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p +2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514 +3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4 +v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31 +w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100 +w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226 +V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31 +w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p +1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er) +e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p +660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161 +3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083 +3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514 +3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4 +v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31 +w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100 +w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435 +3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643 +V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4 +113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f +(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519 +3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0 +4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7 +b(ype)0 4346 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 4346 a 0 4346 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 4346 a 151 x Fq(Each)27 +b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type) +g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26 +b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n +(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969 +y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + +0 5096 a 0 5096 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 5096 a 0 5096 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 5096 a 1905 5381 +a Fq(17)p eop +%%Page: 18 19 +18 18 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 0 32 a 445 123 a Fp(SANE_String_Cons)o +(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445 +349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g +(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g +(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o +(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913 +y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026 +y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139 +y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445 +1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478 +y(SANE_Device;)0 1533 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 0 1533 a 0 1533 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 0 1533 a 0 +1533 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f +(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p +Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0 +1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019 +1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h +(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39 +b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is) +h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o +(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o +(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique) +j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30 +b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k) +o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32 +b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0 +2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g +(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n +(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h +(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52 +b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f +Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e +(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h +(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n +(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0 +2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g +(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g +(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928 +a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965 +1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698 +b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588 +b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698 +b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643 +b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p +1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p +1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p +1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p +1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p +1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p +1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93 +b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753 +b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643 +b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p +1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115 +2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p +3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094 +4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094 +V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207 +V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320 +V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433 +V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p +3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p +3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p +3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p +3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p +3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24 +b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0 +5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26 +b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f +(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f +(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o +(endor)h(speci\002c)g(and)f(therefore)i(completely)1905 +5381 y(18)p eop +%%Page: 19 20 +19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i +(back)o(ends.)0 143 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 143 a 0 143 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 143 a 148 x Fq(The)i(back)o +(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p +1648 291 28 4 v 30 w(backend)p 2063 291 V 30 w(author)25 +b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0 +404 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f +(the)g(format:)0 641 y Fp(Firstname)50 b(Lastname)h()0 878 y Fq(The)32 b(string)i Fp(backend)p 802 878 +V 30 w(website)29 b Fq(should)34 b(be)f(set)g(up)g(by)g(the)g(back)o +(end)i(with)e(the)g(website)h(or)e(ftp)i(address)g(of)f(the)0 +991 y(back)o(end)26 b(in)d(the)h(format:)0 1228 y Fp(http://www.doma)o +(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0 +1464 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h +Fp(device)p 1572 1464 V 30 w(location)18 b Fq(with)23 +b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g +(this)0 1577 y(de)n(vice.)30 b(The)23 b(te)o(xt)h(should)h(be)e +(con\002gurable)k(by)c(the)h(administrator)-5 b(.)32 +b(This)23 b(could)i(e.g.)j(look)d(lik)o(e)f(this:)0 1814 +y Fp(building)51 b(93,)i(2nd)g(plane,)f(room)h(2124)0 +2051 y Fq(The)25 b(string)j Fp(comment)21 b Fq(can)27 +b(be)e(used)i(to)f(display)i(an)o(y)d(comment)i(about)g(the)f(de)n +(vice)h(to)f(the)g(user)-5 b(.)36 b(The)26 b(te)o(xt)g(should)h(be)0 +2164 y(con\002gurable)f(by)e(the)g(administrator)-5 b(.)0 +2332 y(The)23 b(string)i Fp(reserved)p 839 2332 V 29 +w(string)20 b Fq(is)j(unused)j(currently)g(b)n(ut)e(planned)h(for)f +(future)h(use.)0 2501 y(All)e(unused)i(strings)g(must)f(be)f(set)h(to)g +(\223\224)f(by)h(the)g(back)o(end.)0 2669 y(W)l(ith)i(member)f +Fp(backend)p 915 2669 V 30 w(version)p 1330 2669 V 29 +w(code)e Fq(a)i(frontend)j(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e +(a)g(back)o(end)j(it)d(is)g(connected)0 2782 y(to)e(via)h(one)g(or)g +(more)f(meta)h(back)o(ends.)0 2951 y(The)30 b(member)h +Fp(backend)p 889 2951 V 29 w(capability)p 1468 2951 V +29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g(planned)h(to)f +(gi)n(v)o(e)f(the)h(back)o(end)i(the)0 3064 y(chance)26 +b(to)f(inform)g(the)g(frontend)i(about)f(its)f(capabilities.)36 +b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f(de\002ned)i(when) +f(there)g(is)0 3177 y(the)f(need)g(for)g(it.)k(The)23 +b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g +(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3345 y(The)d(member)h +Fp(reserved)p 926 3345 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g +(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g +(inte)o(ger)h(to)e(0.)3900 3345 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 3900 3345 a 3900 3345 +a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 3900 3345 a 3900 3345 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 3900 3345 a 0 3649 a Fm(4.2.9)99 +b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3879 y Fq(Option)23 +b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h +(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30 +b(Options)0 3991 y(are)h(used)g(to)f(control)j(virtually)g(all)d +(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n +(wer)f(of)h(the)g(SANE)d(API)h(stems)0 4104 y(from)22 +b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f +(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g +(descriptor)-5 b(.)31 b(Thus,)0 4217 y(a)21 b(frontend)i(can)e(control) +i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n +(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 +4330 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 +b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i +(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4443 y(operates.)31 +b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p +1485 4443 28 4 v 31 w(Option)p 1846 4443 V 30 w(Descriptor)18 +b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 +4680 y Fp(typedef)52 b(struct)336 4793 y({)445 4906 y(SANE_String_Cons) +o(t)c(name;)445 5019 y(SANE_String_Cons)o(t)g(title;)445 +5132 y(SANE_String_Cons)o(t)g(desc;)1905 5381 y Fq(19)p +eop +%%Page: 20 21 +20 20 bop 445 123 a Fp(SANE_Value_Type)48 b(type;)445 +236 y(SANE_Unit)j(unit;)445 349 y(SANE_Int)g(size;)445 +462 y(SANE_Int)g(cap;)445 574 y(SANE_Constraint_)o(Ty)o(pe)d +(constraint_type)o(;)445 687 y(union)555 800 y({)664 +913 y(const)k(SANE_String_Con)o(st)c(*string_list;)664 +1026 y(const)k(SANE_Word)e(*word_list;)664 1139 y(const)i(SANE_Range)e +(*range;)555 1252 y(})445 1365 y(constraint;)336 1478 +y(})227 1591 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0 +1889 y Fr(Option)23 b(Name)0 2118 y Fq(Member)k Fp(name)e +Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40 +b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n +(vice)0 2231 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n +(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).) +55 b(The)31 b(option)i(name)f(must)0 2344 y(consist)e(of)d(lo)n(wer)n +(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p +Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i +(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43 +b(The)27 b(\002rst)h(character)0 2457 y(must)c(be)f(a)g(lo)n(wer)n +(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g +(dash\).)0 2756 y Fr(Option)g(T)n(itle)0 2984 y Fq(Member)e +Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h +(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21 +b(should)i(typically)0 3097 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o +(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i +(of)d(the)h(option.)0 3396 y Fr(Option)f(Description)0 +3625 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e +(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to) +g(describe)i(the)e(option.)35 b(It)24 b(is)0 3738 y(the)g +(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h +(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e +(this)0 3851 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i +(breaks.)0 4149 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0 +4378 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the) +g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h +Fp(SANE)p 3217 4378 28 4 v 31 w(Value)p 3523 4378 V 31 +w(Type)c Fq(are)0 4491 y(described)26 b(in)e(T)-7 b(able)23 +b(4.3.)0 4790 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 5019 +y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h +(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20 +b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765 +5019 V 31 w(U-)0 5132 y(nit)e Fq(are)j(described)i(in)d(T)-7 +b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g +(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21 +b(is)g(entirely)1905 5381 y(20)p eop +%%Page: 21 22 +21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p +1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p +3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v +165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247 +V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281 +V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p +Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360 +28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113 +v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g +Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p +390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042 +506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h +(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165 +585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V +31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V +256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p +Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p +390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042 +1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f +(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option) +1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n +(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k +(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j +(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g +(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24 +b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5 +b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p +390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042 +1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this) +h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e +(group)1395 1376 y(logically)35 b(related)e(options.)56 +b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395 +1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j +(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if) +e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395 +1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d +Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395 +1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865 +3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24 +b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354 +2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0 +2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f +(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h +(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37 +b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j +(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i +(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f +(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903 +4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856 +V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525 +w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876 +V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4 +v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113 +v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j +(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548 +3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068 +V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102 +V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p +3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181 +28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4 +113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24 +b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328 +V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024 +3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000 +3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p +3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407 +28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4 +113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24 +b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V +497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p +1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p +2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p +3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632 +28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698 +3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24 +b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666 +V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29 +b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4 +v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22 +b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g +(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26 +b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0 +4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v) +n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703 +4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g +(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e +(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i +Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g +(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i +Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e +(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop +%%Page: 22 23 +22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p +703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31 +w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31 +b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e +(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i +(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437 +y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289 +437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452 +653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23 +b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486 +653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798 +V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p +1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43 +b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y +Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d +Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31 +b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n +(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f +(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i +(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h +(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227 +1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V +30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p +Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553 +1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427 +1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i +(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p +813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p +Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p +2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427 +2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g +Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8 +b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f +(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37 +b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0 +2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n +(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921 +2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003 +y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30 +b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h +(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h +(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n +(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p +3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d +(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7 +b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0 +3598 y + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 3598 a 0 3598 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o +(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26 +b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g +(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27 +b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i +(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g +(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o +(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h +Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f +(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526 +V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0 +4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227 +5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227 +5132 y(#endif)0 5135 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 0 5135 a 0 5135 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 0 5135 a 0 5135 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 0 5135 a 1905 5381 a Fq(22)p eop +%%Page: 23 24 +23 23 bop 0 43 4046 4 v -2 156 4 113 v 525 122 a Fr(Symbol)p +1342 156 V 575 w(Code)p 1643 156 V 1025 w(Description)p +4044 156 V 0 159 4046 4 v 0 176 V -2 402 4 226 v 50 255 +a Fp(SANE)p 275 255 28 4 v 31 w(CAP)p 471 255 V 31 w(SOFT)p +722 255 V 31 w(SELECT)p 1342 402 4 226 v 472 w Fq(1)p +1643 402 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)g(set)h(by)f(a)g +(call)g(to)g Fp(sane)p 3337 255 28 4 v 31 w(control)p +3753 255 V 30 w(opt-)1695 368 y(ion\(\))p Fq(.)p 4044 +402 4 226 v -2 966 4 565 v 50 481 a Fp(SANE)p 275 481 +28 4 v 31 w(CAP)p 471 481 V 31 w(HARD)p 722 481 V 31 +w(SELECT)p 1342 966 4 565 v 472 w Fq(2)p 1643 966 V 100 +w(The)28 b(option)j(v)n(alue)f(can)f(be)g(set)h(by)f(user)n(-interv)o +(ention)34 b(\(e.g.,)c(by)f(\003ip-)1695 594 y(ping)35 +b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39 +b(should)d(prompt)g(the)f(user)g(to)1695 707 y(e)o(x)o(ecute)25 +b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)f(option.)33 +b(This)24 b(capa-)1695 820 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n +(v)o(e)g(with)e(SANE)p 3172 820 28 4 v 31 w(CAP)p 3381 +820 V 31 w(SOFT)p 3636 820 V 31 w(SELECT)1695 932 y(\(either)25 +b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g(both)g +(simultaneously\).)p 4044 966 4 565 v -2 1757 4 791 v +50 1045 a Fp(SANE)p 275 1045 28 4 v 31 w(CAP)p 471 1045 +V 31 w(SOFT)p 722 1045 V 31 w(DETECT)p 1342 1757 4 791 +v 472 w Fq(4)p 1643 1757 V 100 w(The)42 b(option)j(v)n(alue)f(can)g(be) +f(detected)i(by)e(softw)o(are.)89 b(If)43 b Fp(SANE)p +3915 1045 28 4 v 31 w(-)1695 1158 y(CAP)p 1865 1158 V +31 w(SOFT)p 2116 1158 V 31 w(SELECT)f Fq(is)j(set,)50 +b(this)c(capability)i Fl(must)e Fq(be)f(set.)94 b(If)1695 +1271 y Fp(SANE)p 1920 1271 V 31 w(CAP)p 2116 1271 V 31 +w(HARD)p 2367 1271 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability) +j(may)c(or)h(may)1695 1384 y(not)d(be)g(set.)42 b(If)28 +b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p +3610 1384 V 31 w(CAP)p 3806 1384 V 31 w(SO-)1695 1497 +y(FT)p 1810 1497 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p +2561 1497 V 31 w(CAP)p 2757 1497 V 31 w(HARD)p 3008 1497 +V 31 w(SELECT)22 b Fq(are,)27 b(then)g(there)g(is)1695 +1610 y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 +b(That)25 b(is,)g(the)g(option)h(pro)o(vides)h(read-)1695 +1723 y(out)d(of)f(the)h(current)h(v)n(alue)f(only)-6 +b(.)p 4044 1757 4 791 v -2 2208 4 452 v 50 1836 a Fp(SANE)p +275 1836 28 4 v 31 w(CAP)p 471 1836 V 31 w(EMULATED)p +1342 2208 4 452 v 613 w Fq(8)p 1643 2208 V 100 w(If)22 +b(set,)g(this)h(capability)j(indicates)e(that)f(an)g(option)h(is)e(not) +h(directly)h(sup-)1695 1949 y(ported)36 b(by)f(the)h(de)n(vice)g(and)f +(is)g(instead)i(emulated)g(in)e(the)g(back)o(end.)1695 +2062 y(A)26 b(sophisticated)31 b(frontend)e(may)e(elect)h(to)g(use)f +(its)h(o)n(wn)e(\(presumably)1695 2174 y(better\))f(emulation)g(in)f +(lieu)g(of)f(an)h(emulated)h(option.)p 4044 2208 V -2 +2773 4 565 v 50 2287 a Fp(SANE)p 275 2287 28 4 v 31 w(CAP)p +471 2287 V 31 w(AUTOMATIC)p 1342 2773 4 565 v 512 w Fq(16)p +1643 2773 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d +(the)g(back)o(end)i(\(or)e(the)g(de)n(vice\))1695 2400 +y(is)k(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f +(automatically)-6 b(.)1695 2513 y(F)o(or)24 b(such)h(options,)i(it)d +(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1695 +2626 y(calling)37 b Fp(sane)p 2202 2626 28 4 v 31 w(control)p +2618 2626 V 30 w(option\(\))32 b Fq(with)j(an)i(action)g(v)n(alue)g(of) +1695 2739 y Fp(SANE)p 1920 2739 V 31 w(ACTION)p 2281 +2739 V 30 w(SET)p 2476 2739 V 31 w(AUTO)p Fq(.)p 4044 +2773 4 565 v -2 3112 4 339 v 50 2852 a Fp(SANE)p 275 +2852 28 4 v 31 w(CAP)p 471 2852 V 31 w(INACTIVE)p 1342 +3112 4 339 v 567 w Fq(32)p 1643 3112 V 101 w(If)32 b(set,)j(this)e +(capability)i(indicates)g(that)e(the)f(option)i(is)f(not)g(currently) +1695 2965 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)i(it')-5 +b(s)22 b(meaningful)i(only)e(if)f(another)i(option)g(is)f(set)1695 +3078 y(to)h(some)h(other)g(v)n(alue\).)p 4044 3112 V +-2 4015 4 904 v 50 3191 a Fp(SANE)p 275 3191 28 4 v 31 +w(CAP)p 471 3191 V 31 w(ADVANCED)p 1342 4015 4 904 v +567 w Fq(64)p 1643 4015 V 101 w(If)33 b(set,)k(this)d(capability)j +(indicates)f(that)f(the)f(option)i(should)f(be)f(con-)1695 +3304 y(sidered)d(an)f(\223adv)n(anced)i(user)e(option\224.)3033 +3225 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 3033 3225 a 3033 3225 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 3033 3225 a 79 x Fq(If)g(this)g +(capability)i(is)e(set)g(for)1695 3417 y(an)21 b(option)h(of)f(type)g +Fp(SANE)p 2550 3417 28 4 v 31 w(TYPE)p 2801 3417 V 31 +w(GROUP)p Fq(,)d(all)j(options)h(belonging)i(to)1695 +3529 y(the)f(group)h(are)f(also)g(adv)n(anced,)i(e)n(v)o(en)e(if)g(the) +o(y)g(don')n(t)h(set)f(the)g(capabilty)1695 3642 y(themselv)o(es.)2147 +3642 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 2147 3642 a 2147 3642 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 2147 3642 a 2147 3642 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 2147 3642 a 27 w Fq(A)18 b(frontend)k(typically)g(displays)g(such)e +(options)i(in)d(a)g(less)1695 3755 y(conspicuous)26 b(w)o(ay)d(than)h +(re)o(gular)g(options)h(\(e.g.,)e(a)f(command)i(line)g(in-)1695 +3868 y(terf)o(ace)32 b(may)e(list)h(such)h(options)g(last)f(or)g(a)f +(graphical)j(interf)o(ace)g(may)1695 3981 y(mak)o(e)23 +b(them)h(a)n(v)n(ailable)i(in)d(a)g(seperate)j(\223adv)n(anced)g +(settings\224)g(dialog\).)p 4044 4015 4 904 v -2 4980 +4 966 v 50 4094 a Fp(SANE)p 275 4094 28 4 v 31 w(CAP)p +471 4094 V 31 w(HIDDEN)p 1342 4980 4 966 v 632 w Fq(128)p +1643 4980 V 1695 4094 a + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 1695 4094 a 1695 4094 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 1695 +4094 a 62 x Fq(If)g(set,)i(this)f(capability)i(indicates)g(that)f(the)f +(option)h(shouldn')n(t)i(be)c(dis-)1695 4269 y(played)f(to)f(and)g +(used)h(by)f(the)g(user)g(directly)-6 b(.)32 b(Instead)25 +b(a)f(hidden)h(option)1695 4382 y(is)k(supposed)i(to)e(be)g +(automatically)k(used)d(by)f(the)g(frontend,)k(lik)o(e)c(e.g.)1695 +4495 y(the)i(\223pre)n(vie)n(w\224)h(option.)53 b(If)31 +b(this)h(capability)i(is)d(set)g(for)g(an)g(option)i(of)1695 +4608 y(type)h Fp(SANE)p 2109 4608 28 4 v 31 w(TYPE)p +2360 4608 V 31 w(GROUP)p Fq(,)d(all)i(options)j(belonging)h(to)d(the)g +(group)1695 4721 y(are)24 b(also)h(hidden,)h(e)n(v)o(en)e(if)g(the)o(y) +g(don')n(t)i(set)e(the)h(capabilty)h(themselv)o(es.)1695 +4833 y(A)20 b(frontend)k(typically)h(doesn')n(t)f(display)f(such)g +(options)h(by)e(def)o(ault)h(b)n(ut)1695 4946 y(there)h(should)h(be)f +(a)f(w)o(ay)g(to)h(o)o(v)o(erride)h(this)f(def)o(ault)h(beha)n(viour)-5 +b(.)3762 4946 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 3762 4946 a 3762 4946 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 3762 4946 a 3762 +4946 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 3762 4946 a 4044 4980 4 966 v -2 5381 4 401 v +50 5059 a Fp(SANE)p 275 5059 28 4 v 31 w(CAP)p 471 5059 +V 31 w(ALWAYS)p 832 5059 V 30 w(SETTABLE)p 1342 5381 +4 401 v 162 w Fq(256)p 1643 5381 V 1695 5059 a + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 1695 5059 +a 1695 5059 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 1695 5059 a 62 x Fq(If)35 b(set,)k(this)d(capability)i +(indicates)g(that)e(the)g(option)h(may)f(be)f(at)h(an)o(y)1695 +5234 y(time)d(between)h Fp(sane)p 2449 5234 28 4 v 31 +w(open\(\))c Fq(and)j Fp(sane)p 3223 5234 V 31 w(close\(\))p +Fq(.)54 b(I.e.)k(it')-5 b(s)1695 5347 y(allo)n(wed)24 +b(to)f(set)h(it)f(e)n(v)o(en)h(while)g(an)f(image)h(is)g(acquired.)3510 +5347 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 3510 5347 a 3510 5347 a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 3510 5347 a 3510 5347 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 3510 5347 a 4044 5381 4 401 v 0 5384 4046 4 v 1400 +5538 a Fq(T)-7 b(able)24 b(4.5:)29 b(Option)24 b(Capabilities)1905 +5381 y(23)p eop +%%Page: 24 25 +24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p +1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215 +V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235 +V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31 +w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v +614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.) +49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427 +y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5 +b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a +Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V +28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094 +V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f +(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6 +b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879 +766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30 +b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o +(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h +Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25 +b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107 +1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518 +y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325 +1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879 +2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e +(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n +(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41 +b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e +Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g +(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6 +b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d +(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51 +b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h +Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g +Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879 +2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e +Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27 +b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n +(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d +Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71 +3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877 +3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224 +4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d +(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879 +3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28 +b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399 +y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35 +b(descriptor)h(member)1879 3512 y Fp(constraint.word)p +2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o +(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40 +b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33 +b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28 +b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g +(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879 +3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j +(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n +(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o +(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303 +a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303 +V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565 +v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e +(applicable)i(to)e(string-v)n(alued)k(options)1879 4415 +y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e +(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i +(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641 +28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e +Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the) +e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p +3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23 +b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905 +5381 y(24)p eop +%%Page: 25 26 +25 25 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 32 a 91 x Fq(Y)-10 b(ou)33 +b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e +Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f +(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g +(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p +Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23 +b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o +(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f +(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746 +y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g +(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f +(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i +Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the) +h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o +(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that) +g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g +(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46 +b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24 +b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p +883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377 +V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549 +y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d +Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or) +f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f +(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j +(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g +(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h +Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0 +3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g +(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e +(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p +Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i +Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22 +b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538 +y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22 +b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h +Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0 +3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d +Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0 +3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34 +b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g +(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0 +4049 y(should)h(use)f(the)g(function)i Fp(gettext)19 +b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24 +b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49 +b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0 +4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g +(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i +(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c +(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23 +b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g +(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0 +4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the) +g(gette)o(xt)h(tools.)2241 4843 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 2241 4843 a 2241 4843 +a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + 2241 4843 a 2241 4843 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 2241 4843 a 1905 5381 a Fq(25)p +eop +%%Page: 26 27 +26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 392 y Fm(4.3.1)99 +b Fc(sane)p 545 392 30 4 v 35 w(init)0 625 y Fq(This)35 +b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d +(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h +(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j(if)d(this)h(function)i +(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g(status)h(code)f +(returned)i(by)d Fp(sane)p 3561 738 28 4 v 31 w(init)e +Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p 767 851 +V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion)h(code)g +(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h(pointed) +h(to)0 964 y(by)24 b Fp(version)p 504 964 V 29 w(code)p +Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p Fq(,)e(no)j(v)o(ersion)i +(code)e(is)g(returned.)31 b(Ar)n(gument)25 b Fp(authorize)19 +b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a)g(function)i(that) +e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i(requires)g +(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0 +1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h +(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int) +h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o +(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28 +b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i +(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041 +y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967 +2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f +Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i +(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f +(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0 +2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h +(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d +(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37 +b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40 +b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64 +b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j +(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0 +2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g +(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911 +y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing) +h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o +(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN) +157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o +(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,) +500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE) +o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o +(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed) +h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26 +b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0 +4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35 +b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d +(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g +(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b +Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g +(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p +421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i +Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p +2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6 +b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f +(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38 +b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0 +4646 y(NUL)c(terminated.)1905 5381 y(26)p eop +%%Page: 27 28 +27 27 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p 545 123 30 +4 v 35 w(exit)0 352 y Fq(This)26 b(function)i(must)e(be)g(called)h(to)f +(terminate)h(use)f(of)g(a)g(back)o(end.)38 b(The)25 b(function)j(will)e +(\002rst)f(close)i(all)f(de)n(vice)h(handles)0 465 y(that)d(still)h +(might)f(be)f(open)i(\(it)f(is)f(recommended)j(to)e(close)h(de)n(vice)f +(handles)i(e)o(xplicitly)g(through)g(a)d(call)h(to)g +Fp(sane)p 3656 465 28 4 v 31 w(clo-)0 578 y(se\(\))p +Fq(,)k(b)n(ut)h(back)o(ends)j(are)d(required)i(to)e(release)i(all)e +(resources)j(upon)e(a)e(call)i(to)f(this)g(function\).)48 +b(After)29 b(this)h(function)0 691 y(returns,)36 b(no)c(function)i +(other)f(than)g Fp(sane)p 1396 691 V 31 w(init\(\))28 +b Fq(may)k(be)g(called)h(\(re)o(gardless)h(of)e(the)h(status)g(v)n +(alue)g(returned)h(by)0 804 y Fp(sane)p 225 804 V 31 +w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f(call)g(this)g(function)i +(may)d(result)i(in)e(some)h(resources)i(not)e(being)g(released)i +(properly)-6 b(.)227 1038 y Fp(void)53 b(sane_exit)d(\(void\);)0 +1341 y Fm(4.3.3)99 b Fc(sane)p 545 1341 30 4 v 35 w(get)p +760 1341 V 35 w(devices)0 1570 y Fq(This)21 b(function)i(can)e(be)g +(used)h(to)f(query)h(the)g(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v) +n(ailable.)30 b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully) +-6 b(,)0 1683 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h +Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f +Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p +3635 1683 28 4 v 29 w(list)p Fq(.)0 1796 y(The)27 b(returned)i(list)f +(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g +(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0 +1909 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p +1056 1909 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25 +b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0 +2022 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41 +b(If)27 b(ar)n(gument)h Fp(local)p 1899 2022 V 31 w(only)c +Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n +(vices)0 2135 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE) +d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n +(vice)g(list)g(includes)i(all)e(remote)0 2247 y(de)n(vices)e(that)f +(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227 +2482 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device) +d(***)54 b(device_list,)1864 2595 y(SANE_Bool)c(local_only\);)0 +2830 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g +Fp(SANE)p 1242 2830 V 31 w(STATUS)p 1603 2830 V 30 w(NO)p +1743 2830 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e +(memory)h(is)f(a)n(v)n(ailable.)1357 3087 y Fr(Back)o(end)f +(Implementation)i(Note)227 3236 y Fq(SANE)h(does)k(not)f(require)h +(that)f(this)h(function)g(is)f(called)h(before)g(a)e +Fp(sane)p 2646 3236 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227 +3349 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o +(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f +(unnecessary)j(and)227 3462 y(undesirable)31 b(to)c(call)h(this)g +(function)h(\002rst.)1619 3383 y + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 1619 3383 a 1619 3383 +a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + 1619 3383 a 79 x Fq(The)e(same)g(information)j(about)e(a)f(de)n(vice) +i(has)e(to)h(be)f(returned)227 3575 y(when)d Fp(sane)p +672 3575 28 4 v 31 w(open)d Fq(is)i(called.)1290 3575 +y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 1290 3575 a 1290 3575 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 1290 3575 a 1290 3575 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 1290 +3575 a 0 3877 a Fm(4.3.4)99 b Fc(sane)p 545 3877 30 4 +v 35 w(open)0 4107 y Fq(This)26 b(function)h(is)f(used)h(to)e +(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36 +b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0 +4219 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40 +b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33 +b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e +Fp(*h)p Fq(.)0 4253 y + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + 0 4253 a 0 4253 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 0 4253 a 79 x +Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e +Fp(**device)p 2040 4332 28 4 v 29 w(description)p Fq(.)i(This)e(is)f +(the)i(same)f(description)j(that)0 4445 y(is)h(returned)j(in)d(the)h +(list)g(by)f Fp(sane)p 1144 4445 V 31 w(get)p 1340 4445 +V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g +Fp(*h)c Fq(and)j Fp(*device)p 3186 4445 V 30 w(description)23 +b Fq(is)0 4558 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid) +i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4558 V 30 w(close\(\))c +Fq(is)j(performed.)3231 4558 y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + 3231 4558 a 3231 4558 +a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 3231 4558 a 3231 4558 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 3231 4558 a 28 w Fq(As)g(a)g(special)i(case,) +0 4671 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n +(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n +(vice)e(\(if)f(there)h(is)g(such)g(a)0 4784 y(de)n(vice\).)227 +5019 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k +(SANE_Handle)d(*)55 b(h,)227 5132 y(const)e(SANE_Device)c(**)54 +b(device_descrip)o(ti)o(on\))o(;)1905 5381 y Fq(27)p +eop +%%Page: 28 29 +28 28 bop 0 123 a Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g +(of)f(the)h(follo)n(wing)h(status)g(codes.)227 369 y +Fp(SANE)p 452 369 28 4 v 31 w(STATUS)p 813 369 V 30 w(DEVICE)p +1173 369 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e +(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i(else\).)227 +515 y Fp(SANE)p 452 515 V 31 w(STATUS)p 813 515 V 30 +w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f(not)h(v)n +(alid.)227 661 y Fp(SANE)p 452 661 V 31 w(STATUS)p 813 +661 V 30 w(IO)p 953 661 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +808 y Fp(SANE)p 452 808 V 31 w(STATUS)p 813 808 V 30 +w(NO)p 953 808 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 954 +y Fp(SANE)p 452 954 V 31 w(STATUS)p 813 954 V 30 w(ACCESS)p +1173 954 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice) +h(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 +1067 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1374 +y Fm(4.3.5)99 b Fc(sane)p 545 1374 30 4 v 35 w(close)0 +1607 y Fq(This)32 b(function)h(terminates)h(the)e(association)j +(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h +Fp(h)e Fq(and)h(the)g(de)n(vice)0 1720 y(it)h(represents.)59 +b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g +(to)g Fp(sane)p 2326 1720 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j +(\002rst.)57 b(After)33 b(this)0 1833 y(function)26 b(returns,)f +(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 +2105 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 +2412 y Fm(4.3.6)99 b Fc(sane)p 545 2412 30 4 v 35 w(get)p +760 2412 V 35 w(option)p 1155 2412 V 35 w(descriptor)0 +2645 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f +(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h +(descriptor)g(for)f(option)0 2758 y(number)i Fp(n)e Fq(of)h(the)h(de)n +(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36 +b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0 +2871 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g +(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de) +n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2984 y(includes)22 +b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i +(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p +Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 3097 +y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h +(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227 +3368 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48 +b(*)445 3481 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3789 y Fm(4.3.7)99 +b Fc(sane)p 545 3789 V 35 w(control)p 1000 3789 V 34 +w(option)0 4022 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g +(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e +Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 4135 +y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f +(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h +Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 4248 +y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6 +b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through) +g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 4361 y(is)21 b(a)f(pointer)j(to)e +(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29 +b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f +Fq(must)h(be)g(big)g(enough)0 4474 y(to)26 b(hold)g(the)g(entire)h +(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d +Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39 +b(The)0 4587 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h +(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e +(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4700 y Fp(v)33 +b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h +(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d +(\002rst)f Fp(NUL)0 4812 y Fq(terminator)c(in)e(the)g(string.)44 +b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p +Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o +(vide)i(details)g(on)e(ho)n(w)0 4925 y(well)23 b(the)h(request)h(has)f +(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d +(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)1905 +5381 y(28)p eop +%%Page: 29 30 +29 29 bop 227 123 a Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e +(\(SANE_Handle)h(h,)k(SANE_Int)e(n,)2027 236 y(SANE_Action)f(a,)j(void) +g(*v,)2027 349 y(SANE_Int)e(*)j(i\);)0 595 y Fq(The)21 +b(w)o(ay)h(the)f(option)j(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this) +g(function)i(is)d(controlled)k(by)c(parameter)j Fp(a)c +Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 708 y Fp(SANE)p +225 708 28 4 v 31 w(Action)p Fq(.)k(The)e(possible)j(v)n(alues)f(and)f +(their)g(meaning)h(is)e(described)j(in)e(T)-7 b(able)23 +b(4.7.)p 185 831 3531 4 v 183 943 4 113 v 628 910 a Fr(Symbol)p +1363 943 V 1363 943 V 493 w(Code)p 1664 943 V 1664 943 +V 850 w(Description)p 3714 943 V 185 947 3531 4 v 185 +963 V 183 1076 4 113 v 234 1042 a Fp(SANE)p 459 1042 +28 4 v 31 w(ACTION)p 820 1042 V 30 w(GET)p 1015 1042 +V 32 w(VALUE)p 1363 1076 4 113 v 254 w Fq(0)p 1664 1076 +V 100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 1076 +V 183 1415 4 339 v 234 1155 a Fp(SANE)p 459 1155 28 4 +v 31 w(ACTION)p 820 1155 V 30 w(SET)p 1015 1155 V 32 +w(VALUE)p 1363 1415 4 339 v 254 w Fq(1)p 1664 1415 V +100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g +(passed)h(through)g(ar)n(-)1716 1268 y(gument)21 b Fp(v)d +Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue) +1716 1381 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p +3714 1415 V 183 1980 4 565 v 234 1494 a Fp(SANE)p 459 +1494 28 4 v 31 w(ACTION)p 820 1494 V 30 w(SET)p 1015 +1494 V 32 w(AUTO)p 1363 1980 4 565 v 309 w Fq(2)p 1664 +1980 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28 +b(or)f(de)n(vice)g(will)g(au-)1716 1607 y(tomatically)39 +b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38 +b(mode)1716 1720 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o +(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1833 y(v)n(alue)22 +b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h +Fp(v)e Fq(is)h(completely)1716 1946 y(ignored)j(in)f(this)g(case)g(and) +g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1980 V 185 1983 3531 +4 v 1168 2136 a(T)-7 b(able)24 b(4.7:)29 b(Action)24 +b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 2136 28 4 v +31 w(Action)p Fq(\))0 2445 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an) +g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o +Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0 +2558 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e +Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h +(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0 +2671 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g +(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2842 y(This)g(function)j(may) +d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +3089 y Fp(SANE)p 452 3089 V 31 w(STATUS)p 813 3089 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h +(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427 +3202 y(option)e(number)-5 b(.)227 3348 y Fp(SANE)p 452 +3348 V 31 w(STATUS)p 813 3348 V 30 w(INVAL)p Fr(:)44 +b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227 +3494 y Fp(SANE)p 452 3494 V 31 w(STATUS)p 813 3494 V +30 w(IO)p 953 3494 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227 +3640 y Fp(SANE)p 452 3640 V 31 w(STATUS)p 813 3640 V +30 w(NO)p 953 3640 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i +(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3786 +y Fp(SANE)p 452 3786 V 31 w(STATUS)p 813 3786 V 30 w(ACCESS)p +1173 3786 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h +(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427 +3899 y(or)24 b(in)l(v)n(alid)h(authentication.)0 4207 +y Fm(4.3.8)99 b Fc(sane)p 545 4207 30 4 v 35 w(get)p +760 4207 V 35 w(parameters)0 4440 y Fq(This)28 b(function)i(is)e(used)h +(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44 +b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0 +4553 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h +(started)h(\()p Fp(sane)p 2070 4553 28 4 v 31 w(start\(\))19 +b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0 +4666 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6 +b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates) +e(of)g(what)f(the)g(parameters)0 4779 y(will)23 b(be)g(when)g +Fp(sane)p 716 4779 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32 +b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i +(started)g(allo)n(ws,)0 4891 y(for)c(e)o(xample,)h(to)e(get)h(an)g +(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27 +b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0 +5004 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f +(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer) +j Fp(p)c Fq(to)i(a)g(parameter)0 5117 y(structure.)k(The)23 +b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n +(w)-6 b(.)1905 5381 y(29)p eop +%%Page: 30 31 +30 30 bop 0 463 3913 4 v -2 576 4 113 v 634 543 a Fr(Symbol)p +1560 576 V 1560 576 V 684 w(Code)p 1861 576 V 1861 576 +V 850 w(Description)p 3911 576 V 0 580 3913 4 v 0 596 +V -2 1951 4 1355 v 50 675 a Fp(SANE)p 275 675 28 4 v +31 w(INFO)p 526 675 V 31 w(INEXACT)p 1560 1951 4 1355 +v 831 w Fq(1)p 1861 1951 V 100 w(This)20 b(v)n(alue)i(is)e(returned)i +(when)f(setting)h(an)f(option)h(v)n(alue)f(re-)1913 788 +y(sulted)30 b(in)f(a)f(v)n(alue)i(being)g(selected)h(that)e(does)h(not) +f(e)o(xactly)1913 901 y(match)e(the)h(requested)h(v)n(alue.)40 +b(F)o(or)26 b(e)o(xample,)j(if)e(a)f(scanner)1913 1014 +y(can)g(adjust)h(the)g(resolution)h(in)e(increments)i(of)e(30dpi)h +(only)-6 b(,)1913 1127 y(setting)34 b(the)e(resolution)k(to)c(307dpi)i +(may)e(result)h(in)g(an)f(ac-)1913 1240 y(tual)d(setting)i(of)e +(300dpi.)47 b(When)29 b(this)g(happens,)k(the)c(bitset)1913 +1353 y(returned)j(in)e Fp(*i)f Fq(has)i(this)f(member)h(set.)49 +b(In)30 b(addition,)k(the)1913 1466 y(option)22 b(v)n(alue)f(is)e +(modi\002ed)i(to)f(re\003ect)h(the)f(actual)h(\(rounded\))1913 +1579 y(v)n(alue)j(that)g(w)o(as)g(used)g(by)g(the)g(back)o(end.)31 +b(Note)24 b(that)g(ine)o(xact)1913 1692 y(v)n(alues)31 +b(are)f(admissible)h(for)f(strings)i(as)d(well.)47 b(A)29 +b(back)o(end)1913 1804 y(may)18 b(choose)j(to)e(\223round\224)i(a)d +(string)i(to)f(the)g(closest)i(matching)1913 1917 y(le)o(gal)j(string)g +(for)g(a)f(constrained)k(string)e(v)n(alue.)p 3911 1951 +V -2 2629 4 678 v 50 2030 a Fp(SANE)p 275 2030 28 4 v +31 w(INFO)p 526 2030 V 31 w(RELOAD)p 887 2030 V 30 w(OPTIONS)p +1560 2629 4 678 v 471 w Fq(2)p 1861 2629 V 100 w(The)41 +b(setting)i(of)f(an)f(option)j(may)d(af)n(fect)h(the)3489 +1951 y + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 3489 1951 a 3489 1951 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 3489 1951 a 79 x Fq(v)n(alue,)47 +b(the)1913 2143 y(a)n(v)n(ailability)-6 b(,)48 b(or)40 +b(the)h(constraint)i(of)d(one)h(or)g(more)f Fl(other)1913 +2256 y Fq(options.)2277 2256 y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 2277 2256 a 2277 2256 +a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 2277 2256 a 2277 2256 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 2277 2256 a 73 w Fq(When)f(this)h(happens,)k +(the)39 b(SANE)d(back)o(end)1913 2369 y(sets)f(this)h(member)e(in)h +Fp(*i)e Fq(to)i(indicate)i(that)e(the)g(applica-)1913 +2482 y(tion)c(should)h(reload)g(all)e(options.)51 b(This)30 +b(member)h(may)f(be)1913 2595 y(set)24 b(if)f(and)h(only)g(if)g(at)f +(least)h(one)g(option)h(changed.)p 3911 2629 4 678 v +-2 3419 4 791 v 50 2708 a Fp(SANE)p 275 2708 28 4 v 31 +w(INFO)p 526 2708 V 31 w(RELOAD)p 887 2708 V 30 w(PARAMS)p +1560 3419 4 791 v 526 w Fq(4)p 1861 3419 V 100 w(The)d(setting)j(of)d +(an)h(option)h(may)f(af)n(fect)g(the)g(parameter)i(v)n(al-)1913 +2821 y(ues)i(\(see)g Fp(sane)p 2457 2821 28 4 v 30 w(get)p +2652 2821 V 32 w(parameters\(\))p Fq(\).)k(If)26 b(setting)i(an)1913 +2934 y(option)g(af)n(fects)f(the)g(parameter)h(v)n(alues,)g(this)f +(member)f(will)1913 3046 y(be)21 b(set)g(in)h Fp(*i)p +Fq(.)k(Note)21 b(that)h(this)f(member)h(may)e(be)i(set)f(e)n(v)o(en)g +(if)1913 3159 y(the)i(parameters)i(did)e(not)g(actually)i(change.)30 +b(Ho)n(we)n(v)o(er)l(,)23 b(it)f(is)1913 3272 y(guaranteed)32 +b(that)e(the)g(parameters)h(ne)n(v)o(er)f(change)h(without)1913 +3385 y(this)24 b(member)g(being)g(set.)p 3911 3419 4 +791 v -2 4435 4 1017 v 50 3498 a Fp(SANE)p 275 3498 28 +4 v 31 w(INFO)p 526 3498 V 31 w(INVALIDATE)p 1107 3498 +V 28 w(PREVIEW)p 1560 4435 4 1017 v 253 w Fq(8)p 1861 +4435 V 100 w(The)39 b(setting)i(of)f(an)f(option)i(may)f(af)n(fect)g +(the)g(v)n(alidity)h(of)1913 3611 y(the)26 b(pre)n(vie)n(w)g(that)h(w)o +(as)f(acquired)i(by)e(the)g(frontend)i(earlier)-5 b(.)1913 +3724 y(When)31 b(the)f(pre)n(vie)n(w)h(image)g(w)o(ould)g(change)h +(signi\002cantly)1913 3837 y(if)f(it)f(w)o(as)h(scanned)i(again,)g(the) +e(SANE)e(back)o(end)k(sets)f(this)1913 3950 y(member)c(in)g +Fp(*i)f Fq(to)h(indicate)j(that)d(the)h(application)i(should)1913 +4063 y(inform)g(the)g(user)g(of)g(the)g(in)l(v)n(alidity)i(of)d(the)h +(pre)n(vie)n(w)-6 b(.)51 b(Ex-)1913 4176 y(amples)27 +b(for)f(such)h(option)h(settings)g(may)e(include)i(setting)g(a)1913 +4288 y(dif)n(ferent)d(scan)f(source)g(or)f(signi\002cantly)j(changing)g +(the)d(e)o(x-)1913 4401 y(posure.)p 3911 4435 V 0 4439 +3913 4 v 702 4592 a(T)-7 b(able)24 b(4.8:)29 b(Additional)c +(Information)h(Returned)f(When)f(Setting)h(an)e(Option)1905 +5381 y(30)p eop +%%Page: 31 32 +31 31 bop 227 123 a Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e +(\(SANE_Handle)h(h,)2027 236 y(SANE_Parameters)f(*)54 +b(p\);)0 507 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e(a) +f(structure)k(of)d(type)g Fp(SANE)p 2314 507 28 4 v 31 +w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0 +620 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910 +541 y + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 910 541 a 910 541 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 910 541 a 227 866 a Fp(typedef)52 +b(struct)336 979 y({)445 1092 y(SANE_Frame)e(format;)445 +1205 y(SANE_Int)h(flags;)445 1318 y(SANE_Int)g(lines;)445 +1431 y(SANE_Int)g(depth;)445 1544 y(SANE_Int)g(pixels_per_line;)445 +1657 y(SANE_Int)g(bytes_per_line;)445 1770 y(SANE_Int)g +(channels_per_ima)o(ge)o(;)445 1882 y(SANE_String)f(format_desc;)445 +1995 y(SANE_String)g(proposed_filena)o(me)o(;)445 2108 +y(SANE_String)g(proposed_commen)o(t;)445 2221 y(SANE_Int)h(dpi_x;)445 +2334 y(SANE_Int)g(dpi_y;)445 2447 y(char)i(reserved[32];)c(/*)k(32)h +(bytes)e(for)i(future)d(use)j(*/)336 2560 y(})227 2673 +y(SANE_Parameters)o(;)0 2759 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + 0 2759 a 0 2759 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 0 2759 +a 0 2759 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 0 2759 a 0 2759 a + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 0 2759 a 0 2759 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 0 2759 +a 160 x Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f +(the)g(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 +b(possible)i(v)n(alues)f(for)f(type)0 3032 y Fp(SANE)p +225 3032 28 4 v 31 w(Frame)25 b Fq(are)j(described)j(in)d(T)-7 +b(able)28 b(4.9.)42 b(The)27 b(meaning)j(of)e(these)h(v)n(alues)g(is)f +(described)i(in)e(more)g(detail)i(in)e(sec-)0 3145 y(tion)k(3.2.)53 +b(The)31 b(frame)h(types)h(used)f(by)g(v)o(ersion)h(1)e(of)h(this)g +(standard)i(\()p Fp(SANE)p 2554 3145 V 31 w(FRAME)p 2860 +3145 V 31 w(GRAY)p Fq(,)28 b Fp(SANE)p 3382 3145 V 31 +w(FRAME)p 3688 3145 V 31 w(RGB)p Fq(,)0 3258 y Fp(SANE)p +225 3258 V 31 w(FRAME)p 531 3258 V 30 w(RED)p Fq(,)23 +b Fp(SANE)p 992 3258 V 31 w(FRAME)p 1298 3258 V 30 w(GREEN)p +Fq(,)f(and)k Fp(SANE)p 2024 3258 V 30 w(FRAME)p 2329 +3258 V 31 w(BLUE)p Fq(\))d(are)i(obsolete)i(and)f(superseded)i(by)d +(the)0 3371 y(frame)f(type)g Fp(SANE)p 639 3371 V 31 +w(FRAME)p 945 3371 V 30 w(RAW)p Fq(.)0 3490 y + -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch +pop /CBarY65 exch def + 0 3490 +a 0 3490 a + 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint +exch pop /CBarY66 exch def + 0 3490 a 624 3493 2653 4 v 622 3606 4 113 +v 914 3572 a Fr(Symbol)p 1496 3606 V 1496 3606 V 341 +w(Code)p 1798 3606 V 1798 3606 V 563 w(Description)p +3275 3606 V 624 3610 2653 4 v 624 3626 V 622 3739 4 113 +v 673 3705 a Fp(SANE)p 898 3705 28 4 v 31 w(FRAME)p 1204 +3705 V 31 w(RAW)p 1496 3739 4 113 v 309 w Fq(5)p 1798 +3739 V 100 w(Arbitrary)h(pix)o(el)f(property)i(transmission.)p +3275 3739 V 622 3852 V 673 3818 a Fp(SANE)p 898 3818 +28 4 v 31 w(FRAME)p 1204 3818 V 31 w(MIME)p 1496 3852 +4 113 v 254 w Fq(6)p 1798 3852 V 100 w(Data)e(described)i(by)d(a)g +(mime)g(descriptor)-5 b(.)p 3275 3852 V 624 3855 2653 +4 v 1194 4009 a(T)e(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p +Fp(SANE)p 2377 4009 28 4 v 31 w(Frame)p Fq(\))0 4124 +y + -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch +pop /CBarY67 exch def + 0 4124 a 0 4124 a + 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint +exch pop /CBarY68 exch def + 0 4124 a 0 4124 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore + 0 4124 a 193 x +Fq(The)e Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h +(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g +(de\002ned,)h(all)f(unused)i(bits)0 4430 y(ha)n(v)o(e)g(to)g(be)f(set)h +(to)f(0:)136 4702 y Fk(\017)46 b Fp(SANE)p 452 4702 28 +4 v 31 w(PFLAG)p 758 4702 V 31 w(LAST)p 1009 4702 V 31 +w(FRAME)27 b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g +(if)g(and)h(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227 +4814 y(being)d(acquired)g(\(or)e(the)h(frame)f(that)h(will)f(be)g +(acquired)i(ne)o(xt)f(if)f(there)h(is)f(no)g(current)i(frame\))f(is)f +(the)g(only)h(frame)227 4927 y(or)c(the)h(last)g(frame)f(of)g(a)g +(multi)g(frame)h(image)f(\(e.g.,)g(the)h(current)h(frame)e(is)g(the)h +(blue)g(component)h(of)e(a)g(red,)g(green,)227 5040 y(blue)j(image\).)0 +5060 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 0 5060 a 0 5060 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 0 5060 a 0 5060 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 0 5060 a 1905 +5381 a Fq(31)p eop +%%Page: 32 33 +32 32 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fp(SANE)p 452 123 28 4 v 31 w(PFLAG)p 758 123 V 31 +w(MORE)p 1009 123 V 31 w(IMAGES)23 b Fq(\(bit)k(1,)h(bitv)n(alue)g(2\)) +f(is)g(set)g(to)g(1)g(to)f(indicate)j(further)g(pending)g(images.)40 +b(The)227 236 y(frontend)27 b(is)d(e)o(xpected)i(to)e(call)g +Fp(sane)p 1461 236 V 31 w(start)d Fq(again)k(after)g(the)f(end)h(of)f +(the)g(current)i(scan)f(to)f(get)h(more)f(images,)227 +349 y(e.g.)38 b(from)27 b(an)f(automatic)j(document)f(feeder)-5 +b(.)39 b(It)27 b(is)f(permissible)j(to)e(set)f(that)i(v)n(alue)f(to)g +(1)f(\223in)h(good)g(f)o(aith\224,)i(as)d(it)227 462 +y(has)f(to)g(be)f(determined)j(at)e(a)f(v)o(ery)h(early)g(time,)g +(where)g(it)f(might)h(not)g(be)g(detectable,)i(if)d(there)i(actually)g +(are)f(more)227 574 y(images)d(to)f(transfer)-5 b(.)30 +b(E.g.)d(you)22 b(will)e(usually)j(not)f(kno)n(w)f(if)g(the)g(document) +i(feeder)g(contains)g(further)g(pages)f(when)227 687 +y(starting)j(to)f(scan)g(the)f(current)i(one.)k(Thus)23 +b(you)h(are)f(allo)n(wed)h(to)f(set)h(that)g(bit)f(b)n(ut)h(later)g(f)o +(ail)f(at)h Fp(sane)p 3470 687 V 30 w(start\(\))p Fq(.)136 +866 y Fk(\017)46 b Fp(SANE)p 452 866 V 31 w(PFLAG)p 758 +866 V 31 w(NEW)p 954 866 V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h +(4\))f(is)f(set)h(to)g(1)f(to)h(indicate)i(that)e(the)g(current)h +(frame)f(comes)g(from)g(a)227 979 y(ne)n(w)i(physical)i(page.)30 +b(This)23 b(bit)h(is)f(of)g(informational)k(character)f(only)e(to)f +(help)h(frontends)i(to)e(group)h(multi-image)227 1091 +y(scans.)136 1270 y Fk(\017)46 b Fp(SANE)p 452 1270 V +31 w(PFLAG)p 758 1270 V 31 w(BACKSIDE)16 b Fq(\(bit)21 +b(3,)f(bitv)n(alue)j(8\))d(tells)i(if)e(the)h(current)h(image)f(w)o(as) +f(acquired)j(from)e(the)f(front)i(\(0\))227 1383 y(or)27 +b(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g(sheet.)38 +b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n(ws)g(to)f +(group)227 1496 y(and)e(order)h(multi-image)g(transfers)h(re)o +(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h +(\002rst/back)g(\002rst\).)0 1727 y(Note,)e(that)i Fp(flags)20 +b Fq(is)k(compatible)i(to)e(member)f Fp(last)p 1827 1727 +V 31 w(frame)e Fq(of)j Fp(SANE)p 2473 1727 V 31 w(Parameters)18 +b Fq(of)24 b(SANE)d(standard)26 b(v)o(er)n(-)0 1840 y(sion)e(1)f +(\(same)h(size)g(and)g(only)h(bit)e(0)h(\(bitv)n(alue)h(1\))f(w)o(as)f +(used)h(with)g(same)f(function\).)2744 1840 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 2744 1840 +a 2744 1840 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 2744 1840 a 2744 1840 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 2744 1840 a 0 2001 +a Fq(Member)33 b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h +(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)57 +b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 2114 +y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)h +(frontend)h(should)g(call)f Fp(sane)p 2572 2114 28 4 +v 31 w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0 +2227 y Fp(SANE)p 225 2227 V 31 w(STATUS)p 586 2227 V +30 w(EOF)p Fq(.)820 2148 y + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 820 2148 a 820 2148 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 820 +2148 a 79 x Fq(Note,)22 b(that)i(e)n(v)o(en)f(when)g(transferring)k +(formats)d(that)g(ha)n(v)o(e)f(this)h(information)h(inband,)g(it)e(is)g +(rec-)0 2340 y(ommended)28 b(to)f(set)g(that)h(member)l(,)g(if)f(a)n(v) +n(ailable.)42 b(If)26 b(una)n(v)n(ailable)31 b(or)c(not)g(applicable,)k +(set)c(to)g(-1)g(as)g(mentioned)i(abo)o(v)o(e.)0 2453 +y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 2453 a 0 2453 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 2453 a 0 2453 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 2453 a 160 x +Fq(Member)d Fp(bytes)p 613 2613 28 4 v 31 w(per)p 809 +2613 V 31 w(line)e Fq(speci\002es)j(the)g(number)g(of)f(bytes)h(that)g +(comprise)h(one)f(scan)g(line.)3235 2534 y + -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch +pop /CBarY73 exch def + 3235 2534 +a 3235 2534 a + 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint +exch pop /CBarY74 exch def + 3235 2534 a 79 x Fq(If)f(this)h(v)n(alue)g(is)f(not)0 +2726 y(applicable)g(for)d(image)h(data)g(of)f(type)h +Fp(SANE)p 1445 2726 28 4 v 31 w(FRAME)p 1751 2726 V 30 +w(MIME)p Fq(,)d(it)h(must)i(be)f(set)g(to)g(-1.)29 b(In)23 +b(this)h(case)g(the)f(frontend)j(should)0 2839 y(just)e(call)g +Fp(sane)p 533 2839 V 31 w(read)d Fq(until)j Fp(SANE)p +1214 2839 V 31 w(STATUS)p 1575 2839 V 30 w(EOF)e Fq(is)h(returned.)2224 +2839 y + -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch +pop /CBarY75 exch def + 2224 2839 a 2224 2839 a + 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint +exch pop /CBarY76 exch def + 2224 2839 a 2224 2839 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore + 2224 2839 a 0 3000 a Fq(Member)32 b Fp(depth)d Fq(speci\002es)34 +b(the)e(number)h(of)f(bits)h(per)g(sample.)2191 2920 +y + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 2191 2920 a 2191 2920 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 2191 2920 a 80 x Fq(Note,)h(that)f(only)g(-1) +f(\(for)g(not)h(applicable\),)k(1,)d(and)0 3112 y(multiples)28 +b(of)e(8)g(are)g(allo)n(wed)h(v)n(alues.)37 b(Data)26 +b(with)g(other)h(depths)h(has)e(to)g(be)h(scaled)g(up)f(accordingly)-6 +b(.)40 b(Depth)27 b(1)e(is)h(only)0 3225 y(allo)n(wed)e(if)g(the)f +(image)h(consists)i(of)d(a)g(single)i(channel)h(\(lineart)f(or)f +(halftone)h(modes\).)2806 3225 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 2806 3225 a 2806 3225 +a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 2806 3225 a 2806 3225 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 2806 3225 a 0 3386 a Fq(Member)g +Fp(pixels)p 667 3386 28 4 v 30 w(per)p 862 3386 V 32 +w(line)d Fq(speci\002es)27 b(the)f(number)g(of)f(pix)o(els)h(that)g +(comprise)h(one)e(scan)h(line.)3300 3307 y + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 3300 3307 +a 3300 3307 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 3300 3307 a 79 x Fq(If)f(una)n(v)n(ailable)j(or)0 +3499 y(not)c(applicable,)i(set)e(to)f(-1.)902 3499 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + +902 3499 a 902 3499 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 902 3499 a 902 3499 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 902 3499 +a 0 3659 a Fq(Assume)28 b Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j +(in)d(the)h(frame,)g(then)h(the)e(bit)h(depth)h Fh(d)d +Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f Fp(depth)p Fq(\))e(and)0 +3772 y(the)e(number)i(of)e(pix)o(els)h(per)f(line)h Fh(n)e +Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h Fp(pixels)p +2416 3772 28 4 v 30 w(per)p 2611 3772 V 31 w(line)p Fq(\))d(are)i +(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 3885 y(of)g(bytes)i(per)f +(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h Fp(bytes)p +1675 3885 V 31 w(per)p 1871 3885 V 31 w(line)p Fq(\))d(as)j(follo)n +(ws:)2590 3806 y + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 2590 3806 a 2590 3806 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 2590 3806 a +1368 4124 a Fh(c)i(>)p Fj(=)1599 3980 y Fb(\()1708 4067 +y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p Fj(8)p Fk(e)116 +b Fq(if)24 b Fh(d)h Fj(=)g(1)1708 4180 y Fh(B)f Fk(\001)d +Fh(n)f Fk(\001)g Fh(d=)p Fj(8)84 b Fq(if)24 b Fh(d)h(>)g +Fj(1)0 4359 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 4359 a 0 4359 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 4359 a 0 4359 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 4359 +a 26 w Fq(Note)h(that)h(the)f(number)h(of)g(bytes)g(per)g(line)g(can)f +(be)h(lar)n(ger)g(than)h(the)e(minimum)g(v)n(alue)h(imposed)h(by)e(the) +h(right)g(side)g(of)0 4472 y(this)d(equation.)31 b(A)22 +b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f(such)i +(\223padded\224)h(image)e(formats.)0 4491 y + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 4491 a +0 4491 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 4491 a 141 x Fq(Member)f Fp(channels)p 775 +4632 28 4 v 29 w(per)p 969 4632 V 31 w(image)d Fq(speci\002es)j(the)g +(number)h(of)e(channels)j(the)e(image)f(consists)j(of.)j(When)23 +b(the)g(image)0 4745 y(is)29 b(transmitted)i(in)e(more)g(than)g(one)h +(frame)f Fp(channels)p 1869 4745 V 29 w(per)p 2063 4745 +V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g(frames)h +(for)f(this)0 4858 y(image.)0 5019 y(Member)f Fp(format)p +670 5019 V 30 w(desc)e Fq(is)i(used)g(to)g(describe)j(the)d(details)i +(of)e(the)g(frame)g(formats.)43 b(Its)29 b(meaning)g(dif)n(fers)g +(between)0 5132 y(the)24 b(tw)o(o)f(formats:)0 5133 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + +0 5133 a 0 5133 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 5133 a 0 5133 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 5133 a 1905 5381 +a Fq(32)p eop +%%Page: 33 34 +33 33 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 32 a 136 123 a Fk(\017)46 +b Fp(SANE)p 452 123 28 4 v 31 w(FRAME)p 758 123 V 31 +w(RAW)p Fq(:)26 b(The)h Fp(format)p 1503 123 V 30 w(desc)e +Fq(contains)30 b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f +(an)g(optional)227 236 y(depth)d(information)h(separated)g(by)e(a)f +(colon\(:\).)227 386 y(A)g(plane)h(is)g(descibed)h(by)f(one)g(channel,) +h(e.g.)k(\223)p Fp(gray)p Fq(\224)21 b(or)j(\223)p Fp(gray:12)p +Fq(\224.)227 536 y(Channel)h(interlea)n(v)o(ed)i(data)d(is)g(described) +i(by)e(a)g(comma)f(separated)k(list)d(of)f(channel)j(descriptions,)h +(for)d(e)o(xample)227 649 y(\223)p Fp(red,green,blue)p +Fq(\224)14 b(or)21 b(\223)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p +Fq(\224,)14 b(the)21 b(channel)h(data)f(is)f(sent)h(in)g(the)f(gi)n(v)o +(en)h(order)-5 b(.)227 799 y(The)24 b(depth)i(information)h(does)e +Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f +(data,)g(it)e(is)g(only)h(an)g(informa-)227 912 y(tion)f(for)g(the)g +(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f +(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227 +1063 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p +Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p +Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel) +227 1176 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared) +j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24 +b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1288 y(description)e(lik)o(e)e +Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g +(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h +(with)227 1401 y(useful)f(colors.)227 1552 y(Note)30 +b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d +(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227 +1665 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f +(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27 +b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1777 y(is)e(prefered)i(to)e +(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d +(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227 +1890 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d +(de\002ned)i(in)e(member)h Fp(channels)p 2756 1890 V +29 w(per)p 2950 1890 V 31 w(image)p Fq(.)136 2078 y Fk(\017)46 +b Fp(SANE)p 452 2078 V 31 w(FRAME)p 758 2078 V 31 w(MIME)p +Fq(:)227 2228 y Fp(format)p 562 2228 V 30 w(desc)28 b +Fq(contains)33 b(the)e(MIME)e(Content-T)-7 b(ype:)45 +b(header)32 b(\002eld)f(as)f(described)j(in)e(RFC)e(1521)i(\(section) +227 2341 y(4\))e(without)g(the)g(pre\002xing)h(\224Content-T)-7 +b(ype:\224.)47 b(MIME)28 b(T)-7 b(ypes)28 b(and)h(subtypes)i(should)g +(be)d(either)i(chosen)g(from)227 2454 y(the)35 b(RFC)d(or)i(from)h(the) +f(list)h(of)f(IAN)m(A-appro)o(v)o(ed)h(v)n(alues.)62 +b(The)34 b(data)h(stream)g(must)f(be)h(compliant)h(with)e(the)227 +2567 y(corresponding)28 b(speci\002cation.)227 2717 y(When)36 +b(data)h(is)e(transmitted)j(with)e(the)g(frame)g(type)h +Fp(SANE)p 2212 2717 V 30 w(FRAME)p 2517 2717 V 31 w(MIME)c +Fq(all)j(data)g(has)g(to)g(be)g(transmitted)227 2830 +y(within)23 b(one)f(frame,)g(multiple)h(frames)f(are)g(not)g(allo)n +(wed)h(\(so)f(the)g(\003ag)f Fp(last)p 2703 2830 V 31 +w(frame)e Fq(has)j(to)f(be)h(set)g(when)g(using)227 2943 +y(this)i(frame)g(type\).)227 3093 y(A)h(SANE)f(back)o(end)29 +b(must)d(be)h(able)g(to)f(at)g(least)h(optionally)j(transmit)d +Fp(SANE)p 2722 3093 V 31 w(FRAME)p 3028 3093 V 31 w(RAW)d +Fq(\(possibly)29 b(with)d(the)227 3206 y(help)i(of)f(a)g(meta)g(back)o +(end\),)j(if)d(the)g(hardw)o(are)h(supports)i(deli)n(v)o(ering)f(image) +f(data)f(at)g(all.)40 b(F)o(or)26 b(data)h(that)h(doesn')n(t)227 +3319 y(comprise)j(images,)h(it')-5 b(s)29 b(admisable)j(to)d(only)h +(pro)o(vide)h(MIME)d(frames.)48 b(As)28 b(a)h(general)i(principle,)i +(if)d(there)g(are)227 3432 y(se)n(v)o(eral)25 b(choices)g(in)f(MIME)e +(types,)i(the)g(format)g(that)g(is)g(most)f(widely)h(implemented)i +(should)f(be)e(used.)0 3703 y(The)g(member)g Fp(proposed)p +929 3703 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e(suggest)i(a)e +(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o(xtension)j(in)0 +3816 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g(such)h(a)e +(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g(database.)30 +b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0 3929 +y(set)k(the)g(\002eld)f(to)g(\223\224.)0 4101 y(In)e(the)h(case)g(of)g +(ra)o(w)e(frames,)i Fp(proposed)p 1393 4101 V 29 w(filename)17 +b Fq(is)22 b(e)o(xpected)h(to)e(hold)i(the)e(basename)i(for)f(the)g +(image,)g(with)f(the)0 4214 y(e)o(xtension)k(determined)g(by)f(the)f +(sa)n(v)o(e)g(function)j(of)d(the)g(frontend,)i(as)e(the)g(frontend)i +(can)f(fully)g(understand)i(the)d(data)h(and)0 4327 y(is)f(thus)i(able) +f(to)f(encode)i(it)f(in)f(an)o(y)h(format)g(it)f(wishes.)0 +4498 y(F)o(or)g(MIME)f(frames)i Fp(proposed)p 1133 4498 +V 29 w(filename)19 b Fq(can)24 b(contain)h(either:)136 +4769 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which) +g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o +(xtension.)32 b(This)24 b(could)i(also)227 4882 y(be)e(gotten)h(from)e +(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e +(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)136 5070 +y Fk(\017)46 b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o +(xtension.)0 5090 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 0 5090 a 0 5090 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 0 5090 a 0 5090 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 0 5090 a 1905 5381 a Fq(33)p eop +%%Page: 34 35 +34 34 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 32 a 91 x Fq(Note,)31 +b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g(parse)g(a)f(gi)n(v) +o(en)i(MIME)d(type)i(internally)-6 b(,)34 b(it)29 b(is)g(perfectly)j +(permissible)g(to)0 236 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g +(the)g(proposed)i(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h +(basename,)h(when)f(using)g(internal)0 349 y(sa)n(v)o(e)g(algorithms)i +(for)d(dif)n(ferent)j(formats.)0 514 y(The)f(string)i +Fp(proposed)p 843 514 28 4 v 29 w(comment)21 b Fq(can)26 +b(be)f(used)i(to)e(transmit)i(additional)h(image)e(information,)i(that) +e(can)f(be)h(stored)0 626 y(in)c(the)g(comment)h(areas)g(se)n(v)o(eral) +g(\002le)e(formats)i(of)n(fer)-5 b(.)29 b(It)22 b(can)g(contain)i(an)o +(y)e(te)o(xtual)i(information)g(the)e(back)o(end)j(wishes)d(to)0 +739 y(con)l(v)o(e)o(y)j(to)e(the)h(user)l(,)g(lik)o(e)h(date/time)g(of) +e(e)o(xposure,)i(enganged)h(\002lters,)e(etc.)29 b(Set)22 +b(to)i(\223\224)f(if)h(unused.)0 904 y(The)k(members)h +Fp(dpi)p 700 904 V 31 w(x)e Fq(and)i Fp(dpi)p 1137 904 +V 31 w(y)f Fq(encode)i(the)e(horizontal)k(and)c(v)o(ertical)i +(resolution.)46 b(Note,)30 b(that)e(multiple-image)0 +1017 y(scans)36 b(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c +(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j +(resolution)g(between)0 1130 y(frames)24 b(of)g(the)f(same)h(image.)29 +b(If)23 b(not)h(applicable,)i(set)e(to)f(-1.)0 1295 y(The)g(member)g +Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g(bytes)i(\(char\))f(to)f(k) +o(eep)h(the)g(size)g(of)f(the)g(struct)h(unchanged)j(when)c(future)0 +1408 y(e)o(xtensions)j(are)e(done.)30 b(The)23 b(back)o(end)i(has)f(to) +g(set)f(the)h(reserv)o(ed)i(bytes)e(to)g(0.)2484 1408 +y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 2484 1408 a 2484 1408 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 2484 1408 a 2484 1408 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 2484 +1408 a 0 1706 a Fm(4.3.9)99 b Fc(sane)p 545 1706 30 4 +v 35 w(start)0 1932 y Fq(This)23 b(function)j(initiates)g(aquisition)g +(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i(by)c(handle)i +Fp(h)p Fq(.)227 2158 y Fp(SANE_Status)50 b(sane_start)g(\(SANE_Handle)f +(h\);)0 2383 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of) +f(the)h(follo)n(wing)h(status)g(codes.)227 2608 y Fp(SANE)p +452 2608 28 4 v 31 w(STATUS)p 813 2608 V 30 w(CANCELLED)p +Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e +(call)h(to)g Fp(sane)p 3297 2608 V 31 w(cancel)p Fq(.)227 +2749 y Fp(SANE)p 452 2749 V 31 w(STATUS)p 813 2749 V +30 w(DEVICE)p 1173 2749 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 +b(de)n(vice)i(is)e(b)n(usy)-6 b(.)30 b(The)23 b(operation)j(should)g +(be)d(retried)i(later)-5 b(.)227 2889 y Fp(SANE)p 452 +2889 V 31 w(STATUS)p 813 2889 V 30 w(JAMMED)p Fr(:)43 +b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 3030 +y Fp(SANE)p 452 3030 V 31 w(STATUS)p 813 3030 V 30 w(NO)p +953 3030 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e +(out)h(of)g(documents.)227 3170 y Fp(SANE)p 452 3170 +V 31 w(STATUS)p 813 3170 V 30 w(COVER)p 1118 3170 V 31 +w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227 +3310 y Fp(SANE)p 452 3310 V 31 w(STATUS)p 813 3310 V +30 w(IO)p 953 3310 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.) +227 3451 y Fp(SANE)p 452 3451 V 31 w(STATUS)p 813 3451 +V 30 w(NO)p 953 3451 V 32 w(MEM)p Fr(:)44 b Fq(An)23 +b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 +3591 y Fp(SANE)p 452 3591 V 31 w(STATUS)p 813 3591 V +30 w(INVAL)p Fr(:)44 b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with) +e(the)h(current)h(set)f(of)f(options.)34 b(The)24 b(fron-)427 +3704 y(tend)19 b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c +(if)g Fp(SANE)p 2316 3704 V 31 w(INFO)p 2567 3704 V 31 +w(RELOAD)p 2928 3704 V 30 w(OPTIONS)c Fq(had)19 b(been)427 +3817 y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p +1492 3817 V 30 w(control)p 1907 3817 V 30 w(option\(\))p +Fq(,)20 b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may) +427 3930 y(ha)n(v)o(e)d(changed.)0 4228 y Fm(4.3.10)99 +b Fc(sane)p 595 4228 30 4 v 35 w(read)0 4455 y Fq(This)19 +b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n +(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20 +b Fp(buf)e Fq(is)h(a)g(pointer)0 4567 y(to)27 b(a)g(memory)g(area)h +(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41 +b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f +Fp(*len)p Fq(.)37 b(A)0 4680 y(back)o(end)31 b(must)e(set)h(this)f(to)g +(zero)h(when)f(a)g(status)h(other)g(than)g Fp(SANE)p +2262 4680 28 4 v 31 w(STATUS)p 2623 4680 V 30 w(GOOD)c +Fq(is)j(returned\).)48 b(When)29 b(the)h(call)0 4793 +y(succeeds,)c(the)d(number)i(of)e(bytes)i(returned)h(can)d(be)h(an)o +(ywhere)h(in)e(the)h(range)h(from)e(0)g(to)h Fp(maxlen)c +Fq(bytes.)227 5019 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f +(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482 5132 y(SANE_Int)c(maxlen,)g +(SANE_Int)g(*)j(len\);)1905 5381 y Fq(34)p eop +%%Page: 35 36 +35 35 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch +pop /CBarY13 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint +exch pop /CBarY14 exch def + 0 32 a 91 x Fq(F)o(or)28 +b(ef)n(\002cienc)o(y)i(reasons,)h(medium)e(to)g(lar)n(ge)h(block)g +(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f(kilobytes\))j(should)g +(be)d(used.)46 b(Re-)0 236 y(turning)28 b(short)f(reads)g(is)f(allo)n +(wed)g(to)g(allo)n(w)g(for)g(small)g(b)n(uf)n(fers)i(in)e(the)g(back)o +(end.)2653 236 y + -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch +pop /CBarY15 exch def + 2653 236 a 2653 236 a + 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint +exch pop /CBarY16 exch def + 2653 236 a 2653 +236 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore + 2653 236 a 36 w Fq(If)f(this)i(function)h(is)e(called)h(when)f +(no)0 349 y(data)e(is)g(a)n(v)n(ailable,)h(one)f(of)g(tw)o(o)f(things)i +(may)e(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h(that)g(is)f(in)g +(ef)n(fect)i(for)f(handle)h Fp(h)p Fq(.)114 595 y(1.)45 +b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e(mode)g(\(the)h +(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f(at)f(least)h(one) +g(data)f(byte)h(is)227 708 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g +(error)g(occurs\).)114 896 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in) +h(non-blocking)j(I/O)c(mode,)k(the)d(call)g(returns)h(immediately)g +(with)e(status)i Fp(SANE)p 3656 896 28 4 v 31 w(STA-)227 +1008 y(TUS)p 397 1008 V 32 w(GOOD)21 b Fq(and)j(with)f +Fp(*len)e Fq(set)j(to)f(zero.)0 1255 y(The)g(I/O)g(mode)h(of)f(handle)i +Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f(call)h(to)f Fp(sane)p +2024 1255 V 31 w(set)p 2220 1255 V 31 w(io)p 2361 1255 +V 32 w(mode\(\))p Fq(.)0 1426 y(This)g(function)j(may)d(f)o(ail)h(with) +g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227 +1673 y Fp(SANE)p 452 1673 V 31 w(STATUS)p 813 1673 V +30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j +(through)f(a)e(call)h(to)g Fp(sane)p 3297 1673 V 31 w(cancel)p +Fq(.)227 1819 y Fp(SANE)p 452 1819 V 31 w(STATUS)p 813 +1819 V 30 w(EOF)p Fr(:)45 b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n +(ailable)j(for)e(the)g(current)h(frame.)2886 1740 y + -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch +pop /CBarY17 exch def + 2886 +1740 a 2886 1740 a + 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint +exch pop /CBarY18 exch def + 2886 1740 a 79 x Fq(If)e Fp(sane)p +3199 1819 28 4 v 31 w(read)e Fq(sends)427 1932 y(back)f(an)o(y)e(image) +h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g(return)g(with)g +Fp(SANE)p 2540 1932 V 31 w(STATUS)p 2901 1932 V 30 w(EOF)p +Fq(.)3135 1932 y + -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch +pop /CBarY19 exch def + 3135 1932 a 3135 1932 a + 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint +exch pop /CBarY20 exch def + 3135 1932 a +3135 1932 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore + 3135 1932 a 227 2078 a Fp(SANE)p 452 2078 +28 4 v 31 w(STATUS)p 813 2078 V 30 w(JAMMED)p Fr(:)43 +b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 2224 +y Fp(SANE)p 452 2224 V 31 w(STATUS)p 813 2224 V 30 w(NO)p +953 2224 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e +(out)h(of)g(documents.)227 2370 y Fp(SANE)p 452 2370 +V 31 w(STATUS)p 813 2370 V 30 w(COVER)p 1118 2370 V 31 +w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227 +2516 y Fp(SANE)p 452 2516 V 31 w(STATUS)p 813 2516 V +30 w(IO)p 953 2516 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 +b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.) +227 2662 y Fp(SANE)p 452 2662 V 31 w(STATUS)p 813 2662 +V 30 w(NO)p 953 2662 V 32 w(MEM)p Fr(:)44 b Fq(An)23 +b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 +2809 y Fp(SANE)p 452 2809 V 31 w(STATUS)p 813 2809 V +30 w(ACCESS)p 1173 2809 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 +b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n +(\002cient)427 2921 y(or)24 b(in)l(v)n(alid)h(authentication.)0 +3229 y Fm(4.3.11)99 b Fc(sane)p 595 3229 30 4 v 35 w(cancel)0 +3462 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f +(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g +(operation)g(of)e(the)0 3575 y(de)n(vice)h(represented)h(by)e(handle)h +Fp(h)p Fq(.)227 3822 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);) +0 4068 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h +(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i +(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 4181 +y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f +(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j +(asynchronously)i(\(e.g.,)0 4294 y(from)37 b(within)g(a)f(signal)j +(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f +(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h +Fq(imply)0 4407 y(that)g(the)f(currently)i(pending)g(operation)h(has)d +(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e +(cancellation)i(has)d(been)0 4520 y Fl(initiated)p Fq(.)68 +b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d +(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0 +4632 y Fp(SANE)p 225 4632 28 4 v 31 w(STATUS)p 586 4632 +V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j +(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0 +4745 y(this)i(implies)h(that)f(a)f(frontend)i(must)f +Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g +(cancelled)i(operation)g(has)e(returned.)1905 5381 y(35)p +eop +%%Page: 36 37 +36 36 bop 0 123 a Fm(4.3.12)99 b Fc(sane)p 595 123 30 +4 v 35 w(set)p 810 123 V 35 w(io)p 965 123 V 35 w(mode)0 +346 y Fq(This)21 b(function)j(is)e(used)g(to)f(set)h(the)g(I/O)f(mode)h +(of)f(handle)i Fp(h)p Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i +(blocking)h(or)d(non-blocking.)0 459 y(If)27 b(ar)n(gument)j +Fp(m)c Fq(is)i Fp(SANE)p 850 459 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g +(is)f(set)h(to)g(non-blocking)j(mode,)e(otherwise)g(it')-5 +b(s)28 b(set)g(to)f(blocking)j(mode.)0 572 y(This)23 +b(function)j(can)e(be)g(called)g(only)h(after)f(a)f(call)h(to)g +Fp(sane)p 1917 572 V 30 w(start\(\))c Fq(has)k(been)g(performed.)227 +787 y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 +b(SANE_Bool)c(m\);)0 1003 y Fq(By)33 b(def)o(ault,)38 +b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60 +b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0 +1116 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f +(status)i(v)n(alue)f Fp(SANE)p 2107 1116 V 31 w(STATUS)p +2468 1116 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39 +b(Blocking)0 1229 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o +(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i +Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 1229 V 31 w(FALSE)d +Fq(is)0 1342 y(guaranteed)e(to)c(complete)i(successfully)-6 +b(.)0 1504 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f +(the)h(follo)n(wing)h(status)g(codes:)227 1719 y Fp(SANE)p +452 1719 V 31 w(STATUS)p 813 1719 V 30 w(INVAL)p Fr(:)44 +b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227 +1857 y Fp(SANE)p 452 1857 V 31 w(STATUS)p 813 1857 V +30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(the)f(requested)i(I/O)d(mode.)0 2151 y Fm(4.3.13)99 +b Fc(sane)p 595 2151 30 4 v 35 w(get)p 810 2151 V 35 +w(select)p 1205 2151 V 34 w(fd)0 2374 y Fq(This)25 b(function)j(is)e +(used)g(to)g(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g +(for)d(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 +2487 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h +(a)f(call)h(to)f Fp(sane)p 1850 2487 28 4 v 31 w(read\(\))d +Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29 +b(If)21 b(the)h(call)0 2600 y(completes)j(successfully)-6 +b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d +Fp(*fd)p Fq(.)227 2815 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e +(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 3031 y Fq(This)37 +b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g +Fp(sane)p 2056 3031 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed) +h(and)f(the)g(returned)0 3144 y(\002le-descriptor)j(is)c(guaranteed)k +(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h +(image)f(acquisition)j(\(i.e.,)g(un-)0 3257 y(til)e Fp(sane)p +339 3257 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 3257 +V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h +Fp(sane)p 2810 3257 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0 +3370 y Fp(SANE)p 225 3370 V 31 w(STATUS)p 586 3370 V +30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i +(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the) +0 3483 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p +962 3483 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h +Fp(SANE)p 2202 3483 V 31 w(STATUS)p 2563 3483 V 30 w(EOF)p +Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 3596 +y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f +(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p +3167 3596 V 31 w(read\(\))p Fq(.)0 3757 y(A)30 b(back)o(end)k(may)e +(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31 +b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0 +3870 y Fp(SANE)p 225 3870 V 31 w(STATUS)p 586 3870 V +30 w(UNSUPPORTED)p Fq(.)0 4032 y(Note)25 b(that)h(the)g(only)g +(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c +(a)g(host)i(operating-system)i(dependent)0 4145 y(test)23 +b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h +(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18 +b Fq(or)23 b Fp(poll\(\))0 4258 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f +(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l +(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0 +4371 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals) +f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g +(until)g(a)f(call)g(to)0 4484 y Fp(sane)p 225 4484 V +31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i +(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this) +g(operation)i(is)d(strongly)0 4597 y(encouraged)27 b(as)c(it)g(permits) +i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g +(acquisition)j(is)c(in)h(progress.)0 4758 y(This)f(function)j(may)d(f)o +(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227 +4974 y Fp(SANE)p 452 4974 V 31 w(STATUS)p 813 4974 V +30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.) +227 5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112 +V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g +(support)h(this)g(operation.)1905 5381 y(36)p eop +%%Page: 37 38 +37 37 bop 0 123 a Fm(4.3.14)99 b Fc(sane)p 595 123 30 +4 v 35 w(strstatus)0 356 y Fq(This)28 b(function)i(can)f(be)f(used)h +(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i +(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 469 +y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h +(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f +(\(full-stop\).)32 b(The)22 b(function)j(is)0 582 y(guaranteed)k(to)c +(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g +(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this) +g(function)h(is)0 695 y(performed.)227 941 y Fp(SANE_String_Con)o(st)48 +b(sane_strstatus)g(\(SANE_Status)h(status\);)0 1292 y +Fn(4.4)119 b(Code)31 b(Flo)o(w)0 1558 y Fq(The)21 b(code)h(\003o)n(w)d +(for)j(the)f(SANE)e(API)g(is)i(illustrated)j(in)d(Figure)h(4.1.)28 +b(Functions)23 b Fp(sane)p 2797 1558 28 4 v 31 w(init\(\))17 +b Fq(and)22 b Fp(sane)p 3547 1558 V 31 w(exit\(\))0 1671 +y Fq(initialize)j(and)d(e)o(xit)g(the)h(back)o(end,)h(respecti)n(v)o +(ely)-6 b(.)31 b(All)22 b(other)h(calls)g(must)f(be)g(performed)i +(after)f(initialization)j(and)d(before)0 1784 y(e)o(xiting)i(the)f +(back)o(end.)536 4453 y @beginspecial 0 @llx 0 @lly 601 +@urx 542 @ury 3060 @rhi @setspecial +%%BeginDocument: figs/flow.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: flow.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Tue Dec 3 22:09:10 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 601 542 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-161.0 577.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +7.500 slw +% Polyline +n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr +% Polyline +n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr +% Polyline +n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr +% Polyline +n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr +% Polyline +n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 6600 m +gs 1 -1 sc (image acquisition) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +10575 3825 m +gs 1 -1 sc (device setup) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 7515 m +gs 1 -1 sc (- go back to) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5775 7515 m +gs 1 -1 sc (sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +7275 7515 m +gs 1 -1 sc (if more frames desired) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 3300 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 5100 m +gs 1 -1 sc (- sane_start\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 4500 m +gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 4080 m +gs 1 -1 sc (sane_control_option\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 3600 m +gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4200 5700 m +gs 1 -1 sc (- use:) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +4500 6900 m +gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6000 m +gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +5400 6450 m +gs 1 -1 sc (sane_read\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4200 8100 m +gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 1200 m +gs 1 -1 sc (- sane_init\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3000 9300 m +gs 1 -1 sc (- sane_exit\(\)) col-1 show gr +/Helvetica-Oblique findfont 270.00 scalefont setfont +3600 1800 m +gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 2700 m +gs 1 -1 sc (- sane_open\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +3600 8700 m +gs 1 -1 sc (- sane_close\(\)) col-1 show gr +/Helvetica findfont 270.00 scalefont setfont +4800 2175 m +gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1549 4649 a(Figure)h(4.1:)k(Code)23 b(\003o)n(w)0 +4961 y(Function)k Fp(sane)p 573 4961 V 31 w(get)p 769 +4961 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h +(after)g Fp(sane)p 2572 4961 V 31 w(init\(\))c Fq(has)k(been)h(called.) +36 b(It)26 b(returns)0 5074 y(the)32 b(list)f(of)h(the)f(de)n(vices)i +(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 +b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)1905 +5381 y(37)p eop +%%Page: 38 39 +38 38 bop 0 123 a Fq(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n +(f)h(or)f(a)f(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g +(dif)n(ferent)h(calls.)30 b(It)21 b(should)j(be)0 236 +y(noted)i(that)f(this)g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n +(w)d(since)h(it)g(requires)h(contacting)h(all)e(con\002gured)h(de)n +(vices)g(\(some)f(of)0 349 y(which)h(may)f(be)h(on)g(remote)g(hosts\).) +36 b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i +(the)f(ability)h(for)f(a)f(user)i(to)e(directly)0 462 +y(select)g(a)e(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h +(to)g(this)g(function.)0 633 y(Once)e(a)g(de)n(vice)h(has)g(been)g +(chosen,)h(it)e(is)g(opened)i(using)f(a)f(call)g(to)h +Fp(sane)p 2352 633 28 4 v 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices) +f(can)g(be)f(open)h(at)0 746 y(an)o(y)i(gi)n(v)o(en)h(time.)34 +b(A)24 b(SANE)f(back)o(end)k(must)f(not)f(impose)h(arti\002cial)h +(constraints)h(on)e(ho)n(w)e(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 +859 y(at)e(an)o(y)h(gi)n(v)o(en)g(time.)0 1031 y(An)f(opened)i(de)n +(vice)g(can)f(be)f(setup)i(through)g(the)f(corresponding)k(de)n(vice)d +(handle)g(using)f(functions)j Fp(sane)p 3460 1031 V 30 +w(get)p 3655 1031 V 32 w(opt-)0 1144 y(ion)p 170 1144 +V 31 w(descriptor\(\))k Fq(and)38 b Fp(sane)p 1280 1144 +V 31 w(control)p 1696 1144 V 29 w(option\(\))p Fq(.)66 +b(While)37 b(setting)i(up)e(a)g(de)n(vice,)42 b(obtaining)e(option)0 +1256 y(descriptors)d(and)e(setting)h(and)f(reading)h(of)e(option)i(v)n +(alues)g(can)e(be)h(mix)o(ed)f(freely)-6 b(.)62 b(It)34 +b(is)g(typical)i(for)f(a)f(frontend)i(to)0 1369 y(read)28 +b(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o(ginning)h +(and)f(then)g(b)n(uild)g(a)f(dialog)i(\(either)f(graphical)i(or)d(a)g +(command-line)0 1482 y(oriented)22 b(option)f(list\))f(that)h(allo)n +(ws)f(to)f(control)j(the)e(a)n(v)n(ailable)i(options.)29 +b(It)20 b(should)h(be)f(noted)h(that)f(the)g(number)h(of)e(options)0 +1595 y(is)j(\002x)o(ed)g(for)h(a)e(gi)n(v)o(en)i(handle.)986 +1516 y + -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch +pop /CBarY21 exch def + 986 1516 a 986 1516 a + 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint +exch pop /CBarY22 exch def + 986 1516 a 79 x Fq(Ho)n(we)n(v)o(er)l(,)f +(as)g(options)j(are)d(set,)h(other)g(options)h(may)e(become)h(acti)n(v) +o(e)g(or)f(inacti)n(v)o(e)i(or)e(their)0 1708 y(constraint)27 +b(may)d(change.)33 b(Thus,)24 b(after)h(setting)h(an)e(option,)i(it)e +(may)g(be)h(necessary)h(to)f(re-read)h(the)e(descriptors.)3647 +1708 y + -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch +pop /CBarY23 exch def + 3647 1708 a 3647 1708 a + 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint +exch pop /CBarY24 exch def + 3647 1708 a 3647 1708 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore + 3647 1708 a 31 w Fq(While)0 1821 y(setting)29 b(up)e(the)h(de)n +(vice,)h(it)e(is)g(also)h(admissible)h(to)f(call)f Fp(sane)p +2041 1821 28 4 v 31 w(get)p 2237 1821 V 32 w(parameters\(\))21 +b Fq(to)27 b(get)g(an)h(estimate)g(of)f(what)0 1934 y(the)d(image)g +(parameters)h(will)e(look)i(lik)o(e)f(once)g(image)g(acquisition)j(be)o +(gins.)0 2106 y(The)36 b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f +(blocking)i(or)e(non-blocking)k(mode)c(by)h(a)e(call)i(to)f +Fp(sane)p 3186 2106 V 31 w(set)p 3382 2106 V 31 w(io)p +3523 2106 V 32 w(mode\(\))p Fq(.)0 2218 y(De)n(vices)30 +b(are)f(required)i(to)e(support)i(blocking)g(mode)e(\(which)h(is)e(the) +i(def)o(ault)g(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0 +2331 y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems) +d(such)h(as)e(UNIX.)0 2503 y(After)g(the)g(de)n(vice)g(is)g(setup)h +(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f +(a)f(call)h(to)g Fp(sane)p 3077 2503 V 30 w(start\(\))p +Fq(.)i(The)d(back-)0 2616 y(end)33 b(calculates)h(the)f(e)o(xact)f +(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g +(to)f Fp(sane)p 3023 2616 V 31 w(get)p 3219 2616 V 31 +w(parameters\(\))0 2729 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n +(alues,)k(rather)c(than)h(estimates.)60 b(Whether)35 +b(the)f(physical)i(image)e(acquisition)i(starts)f(at)f(this)0 +2842 y(point)41 b(or)e(during)i(the)e(\002rst)h(call)f(to)h +Fp(sane)p 1450 2842 V 31 w(read\(\))35 b Fq(is)40 b(unspeci\002ed)h(by) +f(the)g(SANE)c(API.)i(If)h(non-blocking)44 b(I/O)0 2955 +y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e(desired,)j(the) +d(frontend)i(may)e(attempt)h(to)f(call)h Fp(sane)p 2949 +2955 V 31 w(set)p 3145 2955 V 31 w(io)p 3286 2955 V 32 +w(mode\(\))c Fq(and/or)0 3068 y Fp(sane)p 225 3068 V +31 w(get)p 421 3068 V 31 w(select)p 782 3068 V 30 w(fd\(\))c +Fq(at)i(this)h(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d +(f)o(ail)h(if)f(the)h(back)o(end)h(does)g(not)e(support)0 +3180 y(the)h(requested)i(operation.)0 3200 y + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 3200 a +0 3200 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 3200 a 152 x Fq(Image)k(data)h(is)f(collected)i(by)e +(repeatedly)j(calling)f Fp(sane)p 1914 3352 28 4 v 30 +w(read\(\))27 b Fq(until)k(this)f(function)i(will)e(return)h(an)f +(end-of-\002le)0 3465 y(status)40 b(\()p Fp(SANE)p 500 +3465 V 31 w(STATUS)p 861 3465 V 30 w(EOF)p Fq(\).)c(This)i(indicates)j +(the)e(end)g(of)f(the)h(current)h(frame.)74 b(If)38 b(the)g(frontend)j +(e)o(xpects)f(ad-)0 3578 y(ditional)e(frames)f(\(e.g.,)h(the)e(indi)n +(vidual)j(channels)f(of)e(a)g(red/green/blue)k(image)d(or)e(multiple)j +(images\),)i(it)35 b(can)i(call)0 3691 y Fp(sane)p 225 +3691 V 31 w(start\(\))20 b Fq(again.)31 b(If)24 b(the)h +Fp(SANE)p 1349 3691 V 31 w(PFLAG)p 1655 3691 V 30 w(LAST)p +1905 3691 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g Fp(flags)p +Fq(,)d(the)k(current)h(image)e(is)g(com-)0 3804 y(plete.)60 +b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38 +b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 3804 +V 31 w(PFLAG)p 2715 3804 V 31 w(MORE)p 2966 3804 V 31 +w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 3917 y(further)e(calls)e +(to)g Fp(sane)p 794 3917 V 31 w(start\(\))c Fq(can)30 +b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30 +b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 4030 y(be)f(set)g(at)f +(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g +(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d +(no)0 4142 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.) +34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set) +f(this)h(bit,)g(and)g(then)g(later)0 4255 y(at)33 b(the)g(actual)h +(call)f(to)f Fp(sane)p 980 4255 V 31 w(start\(\))d Fq(return)34 +b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 4255 V 31 w(STATUS)p +2749 4255 V 30 w(NO)p 2889 4255 V 31 w(DOCS)p Fq(.)c(Such)j(a)f +(sequence)j(is)0 4368 y(permitted)27 b(to)f(transmit)h(multiple)g +(images)g(from)e(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j +(pages.)36 b(This)26 b(beha)n(viour)j(should)0 4481 y(be)21 +b(controlled)i(by)e(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n +(w)h(single-page)i(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 +4594 y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g +(all)d(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p +2933 4594 V 31 w(PFLAG)p 3239 4594 V 31 w(LAST)p 3490 +4594 V 30 w(FRAME)e Fq(on)0 4707 y(and)29 b Fp(SANE)p +384 4707 V 31 w(PFLAG)p 690 4707 V 31 w(MORE)p 941 4707 +V 31 w(IMAGES)c Fq(of)n(f)k(is)f(encountered,)34 b(or)28 +b(an)h(error)h(other)g(than)f Fp(SANE)p 3085 4707 V 31 +w(STATUS)p 3446 4707 V 30 w(EOF)e Fq(occurs)0 4820 y(in)21 +b(a)g(SANE)e(function.)30 b(Note)21 b(that)h Fp(SANE)p +1342 4820 V 31 w(STATUS)p 1703 4820 V 30 w(NO)p 1843 +4820 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)o(ay)f(for)h(the) +f(back)o(end)j(to)d(indicate)0 4933 y(the)j(end)g(of)f(a)g(multiple)i +(image)f(scan.)0 5104 y(A)c(frontend)k(may)d(choose)i(to)e(skip)i +(frames)f(\(e.g.)28 b(because)23 b(it)e(cannot)i(parse)g(them\),)e +(which)h(is)f(accomplished)k(by)c(simply)0 5124 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 0 5124 +a 0 5124 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 0 5124 a 0 5124 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 0 5124 a 1905 5381 a Fq(38)p +eop +%%Page: 39 40 +39 39 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch +pop /CBarY25 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint +exch pop /CBarY26 exch def + 0 32 a 91 x Fq(calling)30 +b Fp(sane)p 500 123 28 4 v 31 w(start)25 b Fq(again,)30 +b(which)f(will)f(get)h(you)g(to)f(the)h(ne)o(xt)f(frame,)i(without)f +(ha)n(ving)i(to)d(read)h(and)g(discard)h(the)0 236 y(current)25 +b(one.)0 407 y(In)d(order)h(to)f(prematurely)i(stop)f(scanning)h(and)f +(to)e(reset)i(the)f(back)o(end)j(state,)d Fp(sane)p 2707 +407 V 31 w(cancel\(\))c Fq(can)k(be)g(called)h(at)f(an)o(y)0 +520 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d(well)h(after)g +(normal)g(termination)i(of)e(a)f(multiple)h(image)g(scan)h(as)e +(described)j(abo)o(v)o(e.)3800 520 y + -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch +pop /CBarY27 exch def + 3800 520 a 3800 +520 a + 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint +exch pop /CBarY28 exch def + 3800 520 a 3800 520 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore + 3800 520 a 0 692 a Fq(When)33 +b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e +(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 692 28 +4 v 31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0 +805 y(e)o(xiting)e(the)f(application,)37 b(function)d +Fp(sane)p 1443 805 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55 +b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0 +918 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d +(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0 +937 y + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 937 a 0 937 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 937 a 152 x Fq(The)e(follo)n(wing)i(C)d(sample) +j(code)f(implements)h(a)e(reference)j(loop)e(for)g(acquiring)i +(multiple)f(images:)0 1361 y Fp(SANE_Parameters)48 b(parms;)0 +1474 y(SANE_Status)268 b(status;)0 1699 y(do)109 1812 +y({)218 1925 y(do)327 2038 y({)436 2151 y(/*)54 b(Now)f(start)f +(acquiring)f(the)i(next)g(frame.)f(*/)436 2264 y(status)g(=)i +(sane_start)c(\(handle\);)436 2490 y(/*)k(if)g(that)e(failed,)g(we)h +(have)g(a)h(problem,)d(and)i(no)h(more)f(frames)e(can)j(be)491 +2603 y(*)g(read)f(at)g(this)g(time.)f(Due)i(to)f(SANE_PFLAG_MORE)o(_I)o +(MAG)o(ES)48 b(still)491 2716 y(*)54 b(being)e(clear,)g(this)h(will)g +(break)f(out)h(of)h(_BOTH_)d(loops.)491 2828 y(*/)436 +2941 y(if)j(\(status)d(!=)j(SANE_STATUS_GOO)o(D\))545 +3054 y(break;)436 3280 y(/*)g(Now)f(let)g(us)h(see)f(what)g(the)g(next) +g(frame)f(brings.)f(*/)436 3393 y(status)h(=)i(sane_get_parame)o(ter)o +(s)48 b(\(handle,)j(&parms\);)436 3619 y(/*)j(This)f(actually)e(should) +g(not)j(fail,)e(but)h(maybe)f(the)i(doc)f(feeder)491 +3732 y(*)h(jammed)e(or)h(something,)d(so)k(we)g(break)e(as)i(well,)e +(if)i(something)491 3845 y(*)g(is)g(wrong.)491 3958 y(*/)436 +4070 y(if)g(\(status)d(!=)j(SANE_STATUS_GOO)o(D\))545 +4183 y(break;)436 4409 y(/*)g(Now)f(we)h(check)e(the)h(announced)e +(parameters,)e(if)54 b(we)g(can)f(make)f(use)491 4522 +y(*)i(of)g(the)f(frame)f(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g +(the)h(next)e(frame.)491 4635 y(*/)436 4748 y(if)i(\(do_i_like_that)48 +b(\(&parms\))j(==)i(NO\))545 4861 y(continue;)436 5087 +y(/*)h(Set)f(up)h(for)f(reading)e(the)j(data)e(here.)h(Mangle)e +(filenames,)0 5101 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 0 5101 a 0 5101 a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 0 5101 a 0 5101 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 0 5101 a 1905 5381 a Fq(39)p eop +%%Page: 40 41 +40 40 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch +pop /CBarY29 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint +exch pop /CBarY30 exch def + 0 32 a 491 123 a Fp(*)54 +b(allocate)d(memory,)g(rewind)h(multiframe)e(files,)i(ask)h(user)491 +236 y(*)h(for)f(confirmation,)c(...)491 349 y(*/)436 +462 y(setup_for_transf)o(er)f(\(...\);)436 687 y(/*)54 +b(Now)f(we)h(read)f(in)g(the)g(frame)g(data)f(and)i(process)d(it.)i +(This)g(should)491 800 y(*)h(return)e(SANE_STATUS_GO)o(OD,)c(until)k +(the)h(frame)f(is)i(complete,)491 913 y(*)g(what)f(causes)f +(SANE_STATUS_EO)o(F)c(to)54 b(be)g(returned.)491 1026 +y(*/)436 1139 y(while)f(\(SANE_STATUS_G)o(OO)o(D)48 b(==)54 +b(\(status)d(=)k(sane_read)50 b(\(...\)\)\))545 1252 +y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)e +(\(\);)436 1478 y(/*)54 b(If)g(transfer)d(was)i(broken)f(due)h(to)g +(anything)e(but)i(EOF,)g(break)f(out.)h(*/)436 1591 y(if)h(\(status)d +(!=)j(SANE_STATUS_EOF)o(\))545 1704 y(break;)436 1929 +y(/*)g(Now)f(loop)g(until)f(we)i(have)f(all)g(frames)f(of)h(an)h +(image.)e(*/)327 2042 y(})218 2155 y(while)g(\(!\(parms.flag)d(&)54 +b(SANE_PFLAG_LAST)o(_F)o(RAM)o(E\))o(\);)218 2381 y(/*)g(O.K.)f(-)h(we) +f(now)g(have)g(a)h(complete)d(image.)h(Fit)h(it)h(together,)c(save)j +(it,)273 2494 y(*)h(flush)e(buffers,)f(transmit)g(it,)i(increment)e +(filenames,)f(etc.)273 2607 y(*/)218 2833 y(/*)k(Now)f(check)f(for)h +(more)g(pending)f(images.)f(If)j(we)f(have)g(more,)f(redo)h(from)g +(start.)273 2946 y(*)h(Some)f(backends)d(might)j(cheat)f(here)h(and)g +(send)g(us)g(for)g(an)h(extra)e(round)h(which)273 3059 +y(*)h(will)f(fail)f(at)i(sane_start,)49 b(as)54 b(they)f(were)g(not)g +(able)f(to)i(determine)d(if)i(they)273 3171 y(*)h(would)e(have)h(more)g +(data)f(at)i(the)f(start)f(of)i(the)f(last)g(frame)f(we)i(read.)273 +3284 y(*/)109 3397 y(})0 3510 y(while)e(\(parms.flags)d(&)54 +b(SANE_PFLAG_MORE_)o(IM)o(AG)o(ES)o(\);)0 3736 y(/*)g(No)f(more)g +(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j(go)f(back)g(to)h +(option-control)55 3849 y(*)g(loop.)55 3962 y(*/)0 4188 +y(sane_cancel)c(\(handle\);)0 4299 y + -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch +pop /CBarY31 exch def + 0 4299 a 0 4299 +a + 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint +exch pop /CBarY32 exch def + 0 4299 a 0 4299 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore + 0 4299 a 340 x Fn(4.5)119 b(W)-8 +b(ell-Kno)o(wn)31 b(Options)0 4904 y Fq(While)g(most)h(back)o(end)h +(options)g(are)e(completely)i(self-describing,)k(there)32 +b(are)g(cases)g(where)f(a)g(user)g(interf)o(ace)j(might)0 +5017 y(w)o(ant)24 b(to)g(special-case)k(the)c(handling)j(of)d(certain)i +(options.)32 b(F)o(or)24 b(e)o(xample,)h(the)f(scan)h(area)g(is)f +(typically)i(de\002ned)f(by)g(four)0 5130 y(options)35 +b(that)e(specify)h(the)f(top-left)i(and)e(bottom-right)j(corners)e(of)f +(the)g(area.)57 b(W)l(ith)33 b(a)f(graphical)j(user)e(interf)o(ace,)k +(it)1905 5381 y(40)p eop +%%Page: 41 42 +41 41 bop 0 123 a Fq(w)o(ould)25 b(be)g(tedious)i(to)d(force)i(the)f +(user)h(to)e(type)i(in)f(these)g(four)h(numbers.)34 b(Instead,)26 +b(most)f(such)h(interf)o(aces)h(will)d(w)o(ant)h(to)0 +236 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g(\(lo)n +(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h(or)d(a) +h(high\(er\))h(resolution)i(scan)d(of)0 349 y(a)h(subpart)i(of)e(the)g +(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f(scan)h +(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0 +462 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g +(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n +(v)o(e)h(well-de\002ned)0 574 y(meanings.)0 882 y Fm(4.5.1)99 +b(Option)25 b(Number)h(Count)0 1115 y Fq(Option)e(number)h(0)e(has)h +(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g +(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 1115 +28 4 v 30 w(TYPE)p 3556 1115 V 31 w(INT)d Fq(and)0 1228 +y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n +(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g +(includes)i(option)e(number)h(0\).)0 1341 y(This)23 b(means)h(that)f +(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f +(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o +(ycle)0 1454 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h +(until)h Fp(sane)p 1963 1454 V 31 w(get)p 2159 1454 V +31 w(option)p 2520 1454 V 30 w(descriptor\(\))17 b Fq(returns)25 +b Fp(NULL)p Fq(,)c(or)j(a)0 1567 y(frontend)i(can)e(directly)h(read)f +(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 1875 +y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 2108 +y Fq(Option)33 b Fp(resolution)28 b Fq(is)k(used)i(to)f(select)g(the)g +(resolution)j(at)c(which)i(an)e(image)h(should)i(be)d(acquired.)3540 +2029 y + -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch +pop /CBarY33 exch def + 3540 2029 a 3540 2029 a + 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint +exch pop /CBarY34 exch def + 3540 2029 a 79 x Fq(When)h(the)0 +2221 y(back)o(end)23 b(w)o(ants)f(to)f(allo)n(w)g(dif)n(ferent)i(v)n +(alues)f(for)g(x-)f(and)g(y-resolution)k(it)c(has)g(to)g(de\002ne)h +(the)f(options)i Fp(x-resolution)0 2334 y Fq(and)37 b +Fp(y-resolution)p Fq(.)62 b(Note)37 b(that)g(only)g(the)g(option)i +Fp(resolution)31 b Fr(or)37 b Fq(the)f(options)j Fp(x-resolution)30 +b Fr(and)0 2447 y Fp(y-resolution)17 b Fq(may)24 b(be)f(acti)n(v)o(e)h +(at)g(the)f(same)h(time.)1846 2447 y + -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch +pop /CBarY35 exch def + 1846 2447 a 1846 +2447 a + 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint +exch pop /CBarY36 exch def + 1846 2447 a 1846 2447 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore + 1846 2447 a 0 2618 a Fq(The)j(type)h(of) +g(this)g(option)h(is)e(either)i Fp(SANE)p 1417 2618 28 +4 v 31 w(TYPE)p 1668 2618 V 31 w(INT)c Fq(or)j Fp(SANE)p +2212 2618 V 31 w(TYPE)p 2463 2618 V 31 w(FIXED)p Fq(.)c(The)j(unit)h +(is)g Fp(SANE)p 3460 2618 V 30 w(UNIT)p 3710 2618 V 31 +w(DPI)0 2731 y Fq(\(dots/inch\).)0 2903 y(These)e(options)h(are)f(not)g +(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i +(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0 +3016 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0 +3324 y Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0 +3557 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f +(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g +(acquisition)j(should)0 3669 y(be)e(optimized)i(for)e(speed,)i(rather)g +(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41 +b(When)27 b(set)g(to)g Fp(SANE)p 3003 3669 V 31 w(TRUE)p +Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 3782 y(in)e(ef)n(fect,)g(when)g(set) +g(to)g Fp(SANE)p 1012 3782 V 31 w(FALSE)d Fq(image)j(acquisition)j +(should)f(proceed)f(in)f(normal)h(quality)g(mode.)33 +b(The)25 b(setting)0 3895 y(of)c(this)h(option)h Fl(must)f(not)h +Fq(af)n(fect)g(an)o(y)e(other)i(option.)29 b(That)22 +b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f(concerned,)i +(the)e(pre)n(vie)n(w)0 4008 y(mode)i(is)g(completely)i(side)e(ef)n +(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g +(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0 +4121 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f +(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e +(free)h(to)f(o)o(v)o(erride)0 4234 y(the)j Fp(resolution)21 +b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h +(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice) +g(to)f(the)0 4347 y(frontend)35 b(where)n(v)o(er)e(possible.)1081 +4268 y + -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch +pop /CBarY37 exch def + 1081 4268 a 1081 4268 a + 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint +exch pop /CBarY38 exch def + 1081 4268 a 79 x Fq(When)f(the)h +Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f +(transfer)g(the)f(image)f(in)0 4460 y(frame)24 b(type)g +Fp(SANE)p 639 4460 28 4 v 31 w(FRAME)p 945 4460 V 30 +w(RAW)e Fq(if)h(possible.)1584 4460 y + -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch +pop /CBarY39 exch def + 1584 4460 a 1584 +4460 a + 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint +exch pop /CBarY40 exch def + 1584 4460 a 1584 4460 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore + 1584 4460 a 0 4631 a Fq(This)j(option)i +(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f +(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i +(consistent)0 4744 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)1905 +5381 y(41)p eop +%%Page: 42 43 +42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221 +@urx 205 @ury 1836 @rhi @setspecial +%%BeginDocument: figs/area.eps +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: area.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Wed Dec 4 19:19:37 1996 +%%For: davidm@panda.mosberger (David Mosberger-Tang) +%%Orientation: Portrait +%%BoundingBox: 0 0 221 205 +%%Pages: 0 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-59.0 231.0 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% Polyline +n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr +/Helvetica findfont 180.00 scalefont setfont +2550 2302 m +gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +7.500 slw +% Polyline +n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr +n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +% Polyline +n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr +n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr +/Helvetica findfont 180.00 scalefont setfont +3375 3150 m +gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1725 1500 m +gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +2700 1050 m +gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1050 3600 m +gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +4425 525 m +gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +/Helvetica findfont 180.00 scalefont setfont +1080 585 m +gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr +% Polyline +n 1725 1650 m 1725 1800 l gs col-1 s gr +% Polyline +n 1650 1725 m 1800 1725 l gs col-1 s gr +% Polyline +n 3375 2700 m 3375 2850 l gs col-1 s gr +% Polyline +n 3300 2775 m 3450 2775 l gs col-1 s gr +15.000 slw +% Polyline +n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr +$F2psEnd +restore + +%%EndDocument + @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23 +b(area)h(options)0 2124 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 +2351 y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g +(are)f(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29 +b(The)22 b(scan)i(area)f(is)f(de\002ned)0 2464 y(by)h(tw)o(o)f(points)j +(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e +(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0 +2577 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e +(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e +(the)h(scan)g(surf)o(ace)h(as)0 2690 y(seen)25 b(by)g(the)g(sensor)h +(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i +(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 +b(this)h(reason,)0 2803 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i +(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f +(simultaneously)k(the)c Fl(smallest)0 2916 y Fq(and)f(the)f +(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h +(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0 +3029 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f +(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g +(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0 +3141 y(necessary)i(con)l(v)o(ersions.)0 3307 y(The)d(names)h(of)g(the)f +(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o +(en)g(in)f(the)h(table)h(belo)n(w:)1200 3529 y Fr(Name)100 +b(Description)1200 3642 y Fp(tl-x)107 b Fq(T)-7 b(op-left)24 +b Fh(x)f Fq(coordinate)j(v)n(alue)1200 3755 y Fp(tl-y)107 +b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n(alue)1200 +3868 y Fp(br-x)107 b Fq(Bottom-right)25 b Fh(x)e Fq(coordinate)j(v)n +(alue)1200 3981 y Fp(br-y)107 b Fq(Bottom-right)25 b +Fh(y)h Fq(coordinate)g(v)n(alue)0 4200 y(There)e(are)f(se)n(v)o(eral)i +(rules)f(that)h(should)g(be)e(follo)n(wed)i(by)f(front)g(and)g(back)o +(ends)i(re)o(garding)f(these)g(options:)136 4428 y Fk(\017)46 +b Fq(Back)o(ends)25 b(must)f(attach)h(a)e(unit)h(of)f(either)i(pix)o +(els)g(\()p Fp(SANE)p 2091 4428 28 4 v 31 w(UNIT)p 2342 +4428 V 31 w(PIXEL)p Fq(\))20 b(or)k(millimeters)h(\()p +Fp(SANE)p 3484 4428 V 31 w(UNIT)p 3735 4428 V 31 w(MM)p +Fq(\))227 4541 y(to)f(these)g(options.)31 b(The)23 b(unit)h(of)g(all)f +(four)h(options)i(must)d(be)h(identical.)136 4723 y Fk(\017)46 +b Fq(Whene)n(v)o(er)25 b(meaningful,)g(a)f(back)o(end)h(should)g +(attach)g(a)e(range)i(or)e(a)h(w)o(ord-list)h(constraint)h(to)d(these)i +(options.)136 4906 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine) +i(the)f(size)g(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j +(that)d(the)h(options)h(ha)n(v)o(e)f(range)227 5019 y(constraints)i +(associated.)51 b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i +(e)o(xist,)f(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 +5132 y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g +(y)f(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h +(surf)o(ace)g(size.)1905 5381 y(42)p eop +%%Page: 43 44 +43 43 bop 136 123 a Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o(ork)g +(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i(missing.) +0 143 y + -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch +pop /CBarY41 exch def + 0 143 a 0 143 a + 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint +exch pop /CBarY42 exch def + 0 143 a 136 309 a Fk(\017)46 +b Fq(A)21 b(frontend)i(may)f(temporarily)i(set)d(the)h(v)n(alues)h(in)e +(a)g(w)o(ay)h(that)g Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f +Fp(br-x)d Fq(and)j Fp(tl-y)d Fq(is)j(lar)n(ger)227 422 +y(than)j Fp(br-y)p Fq(.)676 422 y + -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch +pop /CBarY43 exch def + 676 422 a 676 422 a + 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint +exch pop /CBarY44 exch def + +676 422 a 676 422 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore + 676 422 a 0 508 a + -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch +pop /CBarY45 exch def + 0 508 a 0 508 a + 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint +exch pop /CBarY46 exch def + +0 508 a 156 x Fq(These)h(options)h(are)f(not)g(mandatory)-6 +b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i(them,)d(it)h +(must)f(implement)i(them)e(in)g(a)g(manner)0 777 y(consistent)h(with)e +(the)g(abo)o(v)o(e)g(de\002nition.)1341 777 y + -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch +pop /CBarY47 exch def + 1341 777 +a 1341 777 a + 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint +exch pop /CBarY48 exch def + 1341 777 a 1341 777 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore + 1341 777 a 0 778 a + -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch +pop /CBarY49 exch def + +0 778 a 0 778 a + 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint +exch pop /CBarY50 exch def + 0 778 a 305 x Fm(4.5.5)99 b(Depth)26 +b(Option)0 1315 y Fq(Option)e Fp(depth)19 b Fq(is)k(used)g(to)g(select) +h(the)f(image)g(depth)h(in)f(bits/sample)i(in)e(multi)g(bit)g(mode)g +(\(e.g.)28 b(for)23 b(24)g(bit)g(RGB)e(mode)0 1428 y(this)k(v)n(alue)g +(must)f(be)g(8\).)31 b(The)24 b(type)h(of)f(this)h(option)h(is)e +Fp(SANE)p 1975 1428 28 4 v 31 w(TYPE)p 2226 1428 V 31 +w(INT)p Fq(.)d(The)j(unit)h(is)f Fp(SANE)p 3100 1428 +V 31 w(UNIT)p 3351 1428 V 31 w(BIT)p Fq(.)e(F)o(or)h(1)h(bit)0 +1540 y(modes)e(\(Lineart)g(or)g(Halftone\))h(this)f(option)h(has)e(to)h +(be)f(inacti)n(v)o(e.)30 b(F)o(or)20 b(selection)k(of)d(1)g(bit)h +(modes)g(\(Lineart)g(or)g(Halftone\))0 1653 y(the)i(back)o(end)i +(should)f(use)f(the)f(well-kno)n(wn)i(option)g Fp(mode)p +Fq(.)0 1824 y(This)h(option)i(is)e(not)h(mandatory)-6 +b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f +(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +1937 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 1937 +y + -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch +pop /CBarY51 exch def + 955 1937 a 955 1937 a + 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint +exch pop /CBarY52 exch def + 955 1937 a 955 1937 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore + 955 1937 +a 0 1938 a + -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch +pop /CBarY53 exch def + 0 1938 a 0 1938 a + 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint +exch pop /CBarY54 exch def + 0 1938 a 304 x Fm(4.5.6)99 +b(Scan)26 b(Mode)f(Options)0 2474 y Fq(The)d(option)i +Fp(mode)19 b Fq(de\002nes)k(a)f Fp(SANE)p 1222 2474 28 +4 v 31 w(CONSTRAINT)p 1803 2474 V 28 w(STRING)p 2161 +2474 V 30 w(LIST)e Fq(of)i(type)h Fp(SANE)p 2926 2474 +V 31 w(TYPE)p 3177 2474 V 31 w(STRING)p Fq(.)18 b(It)k(is)g(used)0 +2587 y(to)34 b(select)i(the)e(scanmode)i(\(e.g.)61 b(Color)34 +b(or)g(Gray\).)61 b(W)-7 b(ell)34 b(kno)n(wn)h(modes)g(are:)50 +b Fp(Color)p Fq(,)34 b Fp(Gray)p Fq(,)g Fp(Halftone)c +Fq(and)0 2700 y Fp(Lineart)p Fq(.)46 b Fp(Color)27 b +Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g(or)f(16)h +(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 b Fp(Lineart)c +Fq(are)0 2813 y(single)f(bit)f(modes.)33 b(When)26 b(well-kno)n(wn)g +(scan)f(modes)h(are)f(used,)g(a)g(frontend)i(is)d(able)i(to)f +(automatically)j(decide)e(which)0 2926 y(mode)e(is)f(appropriate)k(for) +d(a)f(speci\002c)h(task,)g(e.g)f(the)h(mode)g Fp(Gray)d +Fq(for)i(scanning)j(a)d(f)o(ax.)0 3096 y(This)j(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3209 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3209 +y + -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch +pop /CBarY55 exch def + 955 3209 a 955 3209 a + 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint +exch pop /CBarY56 exch def + 955 3209 a 955 3209 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore + 955 3209 +a 0 3210 a + -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch +pop /CBarY57 exch def + 0 3210 a 0 3210 a + 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint +exch pop /CBarY58 exch def + 0 3210 a 305 x Fm(4.5.7)99 +b(Scan)26 b(Sour)n(ce)g(Options)0 3746 y Fq(The)35 b(option)h +Fp(source)c Fq(is)j(used)h(to)f(select)h(the)g(scan)f(source)i(\(e.g.) +63 b(Automatic)37 b(Document)f(Feeder\).)64 b(It)35 b(de\002nes)h(a)0 +3859 y Fp(SANE)p 225 3859 28 4 v 31 w(CONSTRAINT)p 806 +3859 V 28 w(STRING)p 1164 3859 V 30 w(LIST)20 b Fq(of)j(type)g +Fp(SANE)p 1930 3859 V 31 w(TYPE)p 2181 3859 V 31 w(STRING)p +Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b +Fp(Flatbed)p Fq(,)0 3972 y Fp(Transparancy)49 b(Adapter)20 +b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0 +4142 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 4255 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 4255 y + -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch +pop /CBarY59 exch def + +955 4255 a 955 4255 a + 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint +exch pop /CBarY60 exch def + 955 4255 a 955 4255 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore + 955 4255 +a 0 4256 a + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 0 4256 a 0 4256 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 0 4256 a 305 x Fm(4.5.8)99 +b(Thr)n(eshold)26 b(Option)0 4793 y Fq(The)31 b(option)i +Fp(threshold)27 b Fq(is)k(used)i(to)e(de\002ne)h(the)g(threshold)i(for) +d(Lineart)i(and)f(maybe)g(Halftone)h(mode.)53 b(In)31 +b(multi)0 4906 y(bit)36 b(modes)g(this)g(option)i(should)f(be)f(set)g +(inacti)n(v)o(e.)67 b(The)35 b(type)h(of)g(this)g(option)i(is)d +Fp(SANE)p 2975 4906 28 4 v 31 w(TYPE)p 3226 4906 V 31 +w(FIXED)p Fq(.)d(The)k(unit)0 5019 y(is)g Fp(SANE)p 321 +5019 V 31 w(UNIT)p 572 5019 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i +(range)g(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68 +b(It)36 b(de\002nes)g(the)g(minimum)0 5132 y(intensity)26 +b(to)d(get)h(a)f(white)h(point)h(/)e(full)h(intensity)-6 +b(.)0 5151 y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 0 5151 +a 1905 5381 a Fq(43)p eop +%%Page: 44 45 +44 44 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch +pop /CBarY61 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint +exch pop /CBarY62 exch def + 0 32 a 91 x Fq(The)28 +b(back)o(end)i(has)e(to)g(scale)h(the)f(v)n(alues)h(in)f(the)g(follo)n +(wing)i(w)o(ay:)37 b(A)27 b(v)n(alue)i(of)f(0.0)g(means)g(all)g(pix)o +(els)h(get)f(white)g(/)g(full)0 236 y(intensity)-6 b(.)34 +b(A)23 b(v)n(alue)i(of)g(50.0)f(means)h(intensities)j(brighter)e(than)f +(medium)g(gray)g(get)g(white)f(/)g(full)h(intensity)-6 +b(.)34 b(A)23 b(v)n(alue)i(of)0 349 y(100.0)h(means)f(all)g(pix)o(els)h +(get)f(black.)33 b(If)25 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o +(v)o(er)i(the)f(full)g(range)h(the)f(back)o(end)i(has)e(to)g(de\002ne)0 +462 y(a)e(reduced)j(v)n(alue)e(range)h(\(e.g.)j(30.)14 +b(.)g(.)g(70)23 b(percent\).)0 633 y(This)j(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +746 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 746 +y + -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch +pop /CBarY63 exch def + 955 746 a 955 746 a + 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint +exch pop /CBarY64 exch def + 955 746 a 955 746 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore + 955 746 a 0 +747 a + -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch +pop /CBarY65 exch def + 0 747 a 0 747 a + 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint +exch pop /CBarY66 exch def + 0 747 a 307 x Fm(4.5.9)99 b(Gamma)24 +b(T)-9 b(able)25 b(Options)0 1287 y Fq(The)30 b Fp(gamma-table)24 +b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 1287 +28 4 v 31 w(CONSTRAINT)p 2225 1287 V 29 w(RANGE)d Fq(of)j(the)h(type)g +Fp(SANE)p 3208 1287 V 31 w(TYPE)p 3459 1287 V 31 w(INT)d +Fq(which)0 1400 y(represents)22 b(the)d(gamma)g(correction)j(table)e +(for)g(gray)-6 b(.)28 b(In)19 b(color)h(mode)g(the)f +Fp(gamma-table)14 b Fq(may)19 b(be)g(used)h(to)f(set)g(a)g(com-)0 +1513 y(mon)f(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28 +b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12 +b Fp(green-gamma-tab)o(le)0 1626 y Fq(and)32 b Fp(blue-gamma-table)24 +b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g +(correction)k(for)d(each)h(color)g(separately)-6 b(.)0 +1739 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h +(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f +Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 1852 y Fp(blue-gamma-tabl)o(e)19 +b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options) +h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0 +1964 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f +(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h +(reduce)g(\(if)0 2077 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g +(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45 +b(This)29 b(should)h(e.g.)44 b(look)0 2190 y(lik)o(e)24 +b(this:)0 2437 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o +(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 2550 y(green_value)c(=)k +(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\)) +o(\))0 2662 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o +(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 2909 y Fq(The)24 +b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e +(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h +(shado)n(w)-6 b(,)0 3022 y(contrast,)24 b(brightness,)i(threshold,)f +(analog)p 1379 3022 V 35 w(gamma.)j(These)22 b(functions)j(are)e +(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0 +3135 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0 +3306 y(It)j(is)f(also)i(discouraged)i(to)d(emulate)h(gamma)e(tables)i +(in)f(the)g(back)o(end.)38 b(The)25 b(back)o(end)j(should)g(disable)f +(\(or)f(not)h(de\002ne\))0 3419 y(this)d(option)h(when)f(the)g(scanner) +h(does)f(not)g(support)i(gamma)d(tables)h(in)g(hardw)o(are.)0 +3591 y(This)i(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3704 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3704 y + -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch +pop /CBarY67 exch def + +955 3704 a 955 3704 a + 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint +exch pop /CBarY68 exch def + 955 3704 a 955 3704 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore + 955 3704 +a 0 3705 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 3705 a 0 3705 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 3705 a 307 x Fm(4.5.10)99 +b(Analog)24 b(Gamma)0 4245 y Fq(The)37 b(option)i Fp(analog-gamma)31 +b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h +(analog)h(gamma)e(function)i(of)f(the)0 4357 y(scanner)33 +b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g +(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31 +b(type)h(of)f(this)h(option)g(is)0 4470 y Fp(SANE)p 225 +4470 28 4 v 31 w(TYPE)p 476 4470 V 31 w(FIXED)p Fq(.)27 +b(The)k(unit)g(is)g Fp(SANE)p 1486 4470 V 30 w(UNIT)p +1736 4470 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g +(de\002ned)g(by)g(the)g(back)o(end)i(as)0 4583 y(supported.)38 +b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37 +b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f +(correction)k(has)d(no)0 4696 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n +(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29 +b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0 +4809 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g +Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n +(wed)g(to)g(em-)0 4922 y(ulate)29 b(an)e(analog)i(gamma)e(function)j +(by)e(a)f(digital)i(gamma)e(table.)42 b(The)27 b(back)o(end)j(has)e(to) +f(disable)j(\(or)d(not)h(de\002ne\))h(this)0 5035 y(option)c(when)f +(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h +(gamma)d(function.)0 5055 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + 0 5055 a 0 5055 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 0 5055 +a 0 5055 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 0 5055 a 1905 5381 a Fq(44)p eop +%%Page: 45 46 +45 45 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch +pop /CBarY69 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint +exch pop /CBarY70 exch def + 0 32 a 91 x Fq(When)37 +b(analog)i(gamma,)h(highlight)f(and)f(shado)n(w)f(functions)j(are)d(a)n +(v)n(ailable)j(at)d(the)g(same)g(time)g(then)h(the)f(back)o(end)0 +236 y(author)32 b(has)g(to)e(care)i(about)g(the)f(order)h(in)e(which)i +(the)f(functions)i(are)e(implemented)i(in)e(the)g(scanner)i(hardw)o +(are.)52 b(The)0 349 y(SANE)26 b(standard)31 b(e)o(xpects)f(that)f +(changing)i(the)e(analog)h(gamma)e(v)n(alue)i(has)f(no)f(ef)n(fect)i +(on)e(the)h(shado)n(w)h(and)f(highlight)0 462 y(function.)59 +b(When)33 b(the)g(analog)i(gamma)d(function)j(is)e(e)o(x)o(ecuted)i(in) +d(the)i(scanner)g(hardw)o(are)h(before)f(the)f(shado)n(w)h(and)0 +574 y(highlight)d(functions)g(then)e(the)g(back)o(end)i(should)f(do)e +(a)g(compensation.)47 b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g +(highlight)i(v)n(alues)0 687 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g +(corrected)j(with)d(the)h(rele)n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 +855 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28 +b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g +(implement)h(it)f(in)h(a)e(manner)i(consistent)0 968 +y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 968 y + -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch +pop /CBarY71 exch def + +955 968 a 955 968 a + 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint +exch pop /CBarY72 exch def + 955 968 a 955 968 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore + 955 968 a 0 969 +a + -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch +pop /CBarY73 exch def + 0 969 a 0 969 a + 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint +exch pop /CBarY74 exch def + 0 969 a 302 x Fm(4.5.11)99 b(Shado)o(w)25 +b(Option)0 1500 y Fq(The)36 b(option)j Fp(shadow)33 b +Fq(is)k(used)g(to)g(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f +(black)i(point)g(le)n(v)o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h +(is)0 1613 y Fp(SANE)p 225 1613 28 4 v 31 w(TYPE)p 476 +1613 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p +1461 1613 V 31 w(UNIT)p 1712 1613 V 31 w(PERCENT)p Fq(.)d(The)j(v)n +(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 +b(if)h(possi-)0 1725 y(ble.)k(It)23 b(is)h(used)g(to)f(de\002ne)h(the)g +(maximum)g(intensity)i(le)n(v)o(el)d(that)h(creates)i(an)d(image)h +(data)g(v)n(alue)h(of)e(0)g(\(black\).)0 1893 y(The)h(back)o(end)i(has) +e(to)g(scale)h(the)f(v)n(alues)h(in)f(the)h(follo)n(wing)g(w)o(ay:)30 +b(A)23 b(v)n(alue)i(of)e(0.0)h(means)h(that)f(the)h(sensiti)n(vity)h +(range)f(is)0 2006 y(not)f(reduced,)i(only)f(the)f(minimum)g(intensity) +i(produces)g(an)e(image)h(data)f(v)n(alue)h(of)f(0)g(\(black\).)31 +b(A)23 b(v)n(alue)i(of)f(50.0)g(means)0 2119 y(that)d(that)h(a)e +(medium)h(intensity)i(and)e(e)n(v)o(erything)j(that)d(is)g(dark)o(er)h +(produces)h(an)e(image)g(data)g(v)n(alue)h(of)f(0)f(\(black\).)30 +b(A)19 b(v)n(alue)0 2232 y(of)j(100.0)h(means)g(the)g(sensiti)n(vity)i +(range)e(is)f(reduced)j(to)d(0,)g(all)g(image)h(data)g(v)n(alues)g(are) +g(0)f(\(black\).)30 b(If)22 b(the)h(scanner)h(is)e(not)0 +2345 y(able)j(to)e(co)o(v)o(er)i(the)f(full)g(range)h(the)g(back)o(end) +h(has)e(to)g(de\002ne)g(a)g(reduced)i(v)n(alue)e(range)h(\(e.g.)30 +b(30.)14 b(.)g(.)g(70)23 b(percent\).)32 b(In)24 b(color)0 +2458 y(mode)d(there)h(can)f(be)g(options)i Fp(shadow-red)p +Fq(,)16 b Fp(shadow-green)f Fq(and)21 b Fp(shadow-blue)p +Fq(,)16 b(in)k(this)i(case)f(the)h Fp(shadow)0 2571 y +Fq(function)29 b(has)f(to)f(be)g(disabled.)42 b(It)27 +b(is)g(not)h(allo)n(wed)f(to)h(emulate)g(a)f(shado)n(w)g(function)j(by) +d(a)g(digital)h(gamma)f(table.)41 b(The)0 2684 y(back)o(end)29 +b(has)e(to)g(disable)i(\(or)e(not)g(de\002ne\))h(this)f(option)h(when)f +(the)g(scanner)i(does)f(not)f(support)i(an)e(analog)h(\(hardw)o(are\))0 +2797 y(shado)n(w)c(function.)0 2964 y(This)i(option)i(is)e(not)h +(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h +(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0 +3077 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3077 +y + -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch +pop /CBarY75 exch def + 955 3077 a 955 3077 a + 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint +exch pop /CBarY76 exch def + 955 3077 a 955 3077 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore + 955 3077 +a 0 3078 a + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 3078 a 0 3078 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 3078 a 302 x Fm(4.5.12)99 +b(Highlight)24 b(Option)0 3609 y Fq(The)i(option)i Fp(highlight)21 +b Fq(is)26 b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f +(white)g(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g +(is)0 3722 y Fp(SANE)p 225 3722 28 4 v 31 w(TYPE)p 476 +3722 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p +1461 3722 V 31 w(UNIT)p 1712 3722 V 31 w(PERCENT)p Fq(.)d(The)j(v)n +(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 +b(if)h(possi-)0 3835 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h +(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e +(maximum)h(possible)h(image)f(data)g(v)n(alue)0 3948 +y(\(white/full)c(intensity\).)0 4115 y(The)32 b(back)o(end)i(has)e(to)g +(scale)h(the)f(v)n(alues)h(in)f(the)g(follo)n(wing)i(w)o(ay:)46 +b(A)30 b(v)n(alue)j(of)f(0.0)g(means)g(the)h(sensiti)n(vity)h(range)f +(is)0 4228 y(reduced)h(to)e(0,)i(all)f(image)f(data)h(ha)n(v)o(e)g +(maximum)f(v)n(alue)h(\(white)g(/)f(full)h(intensity\).)57 +b(A)31 b(v)n(alue)i(of)g(50.0)f(means)h(that)g(a)0 4341 +y(medium)25 b(intensity)i(and)e(e)n(v)o(erything)h(that)g(is)e +(brighter)i(produces)h(the)e(maximum)g(possible)h(image)f(data)g(v)n +(alue)h(\(white)f(/)0 4454 y(full)e(intensity\).)31 b(A)21 +b(v)n(alue)i(of)f(100.0)h(means)g(that)g(the)f(sensiti)n(vity)j(range)f +(is)e(not)h(reduced,)h(only)f(the)g(maximum)f(intensity)0 +4567 y(produces)35 b(an)d(image)h(data)g(with)g(maximum)f(possible)j(v) +n(alue)e(\(white)g(/)f(full)h(intensity\).)58 b(If)32 +b(the)h(scanner)h(is)f(not)g(able)0 4680 y(to)f(co)o(v)o(er)g(the)g +(full)h(range)g(the)f(back)o(end)i(has)e(to)g(de\002ne)g(a)f(reduced)j +(v)n(alue)f(range)g(\(e.g.)54 b(30.)14 b(.)g(.)g(70)31 +b(percent\).)55 b(In)32 b(color)0 4793 y(mode)37 b(there)h(can)f(be)g +(options)i Fp(highlight-red)p Fq(,)33 b Fp(highlight-gree)o(n)d +Fq(and)37 b Fp(highlight-blue)p Fq(,)c(in)k(this)0 4906 +y(case)27 b Fp(highlight)21 b Fq(has)27 b(to)f(be)h(disabled.)39 +b(It)26 b(is)g(not)h(allo)n(wed)g(to)f(emulate)h(a)f(highlight)j +(function)g(by)d(a)g(digital)i(gamma)0 5019 y(table.)42 +b(The)28 b(back)o(end)i(has)e(to)g(disable)h(\(or)f(not)g(de\002ne\))h +(this)f(option)i(when)e(the)g(scanner)h(does)g(not)f(support)i(an)e +(analog)0 5132 y(\(hardw)o(are\))e(highlight)g(function.)0 +5151 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 0 5151 a 0 5151 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 0 5151 a 0 5151 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 0 5151 a 1905 +5381 a Fq(45)p eop +%%Page: 46 47 +46 46 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch +pop /CBarY77 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint +exch pop /CBarY78 exch def + 0 32 a 91 x Fq(This)26 +b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o +(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e +(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.) +955 236 y + -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch +pop /CBarY79 exch def + 955 236 a 955 236 a + 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint +exch pop /CBarY80 exch def + 955 236 a 955 236 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore + 955 +236 a 0 237 a + -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch +pop /CBarY1 exch def + 0 237 a 0 237 a + 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch +pop /CBarY2 exch def + 0 237 a 307 x Fm(4.5.13)99 +b(Lamp)25 b(Options)0 777 y Fq(The)k(options)i Fp(lamp-on)25 +b Fq(and)30 b Fp(lamp-off)25 b Fq(are)30 b(b)n(utton)h(options)g(\()p +Fp(SANE)p 2451 777 28 4 v 31 w(TYPE)p 2702 777 V 31 w(BUTTON)p +Fq(\))26 b(and)k(don')n(t)h(ha)n(v)o(e)f(a)f(unit)0 890 +y(\()p Fp(SANE)p 255 890 V 31 w(UNIT)p 506 890 V 31 w(NONE)p +Fq(\).)0 1061 y(Option)24 b Fp(lamp-on)c Fq(is)j(used)i(to)e(turn)h(on) +g(the)g(lamp)f(of)h(the)f(scanner)j(while)e Fp(lamp-off)19 +b Fq(turns)24 b(it)f(of)n(f.)0 1233 y(These)j(options)h(are)f(not)g +(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i +(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0 +1346 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)1341 +1346 y + -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch +pop /CBarY3 exch def + 1341 1346 a 1341 1346 a + 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch +pop /CBarY4 exch def + 1341 1346 a 1341 1346 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore + 1341 1346 a 0 1347 a + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 1347 a 0 1347 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 1347 a 307 +x Fm(4.5.14)99 b(Scanner)26 b(Button)h(Options)0 1887 +y Fq(Some)k(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)e(state)h(can)f +(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5 b(.)54 +b(It)31 b(is)h(necessary)i(to)e(implement)0 2000 y(a)f(locking)i +(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g(possible)i +(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to)d(the)g +(same)0 2112 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f(time.)50 +b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h(w)o(ould)f +(be)g(implemented:)0 2225 y(Fi)n(v)o(e)25 b(people)i(ha)n(v)o(e)f +(started)h(a)e(scanning)j(application)g(which)e(is)g(connected)i(via)e +(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o(ant)f(to)0 +2338 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i(put)e(a)f +(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n(utton)j(on)d +(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0 2451 y(does)30 +b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g(ask)o(ed)g +(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n(utton\).) +47 b(F)o(or)0 2564 y(three)24 b(people)i(the)d(image)h(is)g(sa)n(v)o +(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g(that)g +(your)g(frontend)i(did)e(scan)g(the)g(image.)0 2736 y(A)e(back)o(end)k +(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e(scanner)n(-b)n(uttons) +29 b(has)24 b(to)f(implement)i(the)e(follo)n(wing)i(options:)0 +2849 y Fp(scanner-buttons)o(-l)o(oc)o(k)17 b Fq(is)23 +b(of)g(type)i Fp(SANE)p 1700 2849 28 4 v 31 w(TYPE)p +1951 2849 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25 b(=)e +Fp(SANE)p 2813 2849 V 31 w(FALSE)0 2961 y(scanner-buttons)o(-s)o(ta)o +(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809 2961 +V 31 w(TYPE)p 2060 2961 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0 +3074 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17 +b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 3074 V 31 w(TYPE)p +2442 3074 V 30 w(BUTTON)0 3187 y Fq(When)18 b(setting)i(these)f +(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p +2091 3187 V 31 w(INFO)p 2342 3187 V 31 w(RELOAD)p 2703 +3187 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 3187 V 31 +w(INFO)p 3696 3187 V 31 w(RELOAD)p 4057 3187 V 30 w(PARAMS)0 +3300 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 3472 +y(A)34 b(frontend)k(has)e(to)f(disable)j(the)d(usage)i(of)e(the)h +(scanner)n(-b)n(uttons)41 b(by)36 b(def)o(ault.)66 b(This)35 +b(is)h(important)h(because)g(other)0 3585 y(frontends)26 +b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g +(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25 +b(important)g(thing)0 3698 y(is)f(that)h(some)f(scanners)i(do)f(not)f +(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g +(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0 +3811 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g +(scanner\).)136 4082 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o +(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f +(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31 +b(this)h(it)227 4195 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o +(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 4195 V 31 w(TRUE)p +Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227 +4308 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b +Fp(SANE)p 1667 4308 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h +(if)e(a)g(lock\002le)h(\(e.g.)41 b(\223back)o(end\224-)227 +4421 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28 +b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e) +n(v)o(ery)g(user)g(has)g(read)h(and)227 4533 y(write)24 +b(access)h(to.)336 4746 y Fr(\226)46 b Fq(If)20 b(the)h(lock\002le)g +(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j(creates)f(the)e +(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d(\(PID\))427 +4859 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27 +b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f +(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 4972 y +Fq(is)k(set)f(to)h Fp(SANE)p 953 4972 V 31 w(TRUE)0 4974 +y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 4974 a 0 4974 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 4974 a 0 4974 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 4974 a 1905 5381 +a Fq(46)p eop +%%Page: 47 48 +47 47 bop 0 32 a + -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch +pop /CBarY5 exch def + 0 32 a 0 32 a + 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch +pop /CBarY6 exch def + 0 32 a 336 123 a Fr(\226)46 +b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h(the)f(back)o(end)h +(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g(back)o(end)i(has)e +(to)g(check)g(if)427 236 y(the)f(process)i(with)d(the)h(PID)f(stored)i +(in)e(the)h(lock\002le)h(still)f(is)g(running.)46 b(If)28 +b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427 349 +y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j +Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g +Fp(SANE)p 3340 349 28 4 v 31 w(FALSE)p Fq(.)c(If)k(not)427 +462 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of)h +(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g +(access)427 574 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e +(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23 +b(set)h(to)g Fp(SANE)p 3194 574 V 30 w(TRUE)136 787 y +Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e +(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37 +b(If)28 b(it)g(is)h Fp(SANE)p 3472 787 V 31 w(TRUE)c +Fq(then)227 900 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h +(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 900 +V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136 +1088 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n +(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f +(once)g(per)g(second)g(\(while)g(not)227 1200 y(scanning\):)336 +1388 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h +Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o +Fq(.)35 b(The)27 b(back)o(end)j(checks)427 1501 y(if)37 +b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i +(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427 +1614 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h +(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option) +427 1727 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20 +b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f +(means)g(the)h(b)n(utton)h(is)427 1840 y(not)23 b(pressed,)h(a)d(v)n +(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30 +b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427 +1953 y(must)k(not)g(w)o(ait,)f(it)h(has)g(to)f(return)i(immediately)g +(and)g(the)e(b)n(utton)j(state)e(k)o(eeps)h(unchanged.)38 +b(The)25 b(back)o(end)427 2066 y(has)e(to)f(implement)h(a)f(timeout)h +(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h +(within)f(a)e(prede\002ned)j(time)427 2178 y(\(e.g.)50 +b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50 +b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427 +2291 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b +Fp(SANE)p 1862 2291 V 31 w(FALSE)d Fq(and)j(does)h(set)f +Fp(SANE)p 2881 2291 V 31 w(INFO)p 3132 2291 V 31 w(RELOAD)p +3493 2291 V 30 w(OPTIONS)427 2404 y Fq(to)20 b(inform)g(the)g(frontend) +i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n +(-b)n(utton)k(functions.)30 b(If)20 b(access)427 2517 +y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o +(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 2663 y Fr(\226)46 +b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i +Fp(scanner-buttons-)o(st)o(at)o(us)136 2851 y Fk(\017)46 +b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g +(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g +Fp(scanner-buttons-)o(lo)o(ck)227 2964 y Fq(to)34 b Fp(SANE)p +556 2964 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g +(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f +(same.)227 3077 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es) +g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g +Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 3190 y Fp(SANE)p +452 3190 V 31 w(FALSE)p Fq(.)227 3340 y Fp(sane)p 452 +3340 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g +(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11 +b Fq(to)18 b Fp(SANE)p 3601 3340 V 31 w(FALSE)p Fq(.)0 +3459 y + -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch +pop /CBarY7 exch def + 0 3459 a 0 3459 a + 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch +pop /CBarY8 exch def + 0 3459 a 0 3459 a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore + 0 3459 a 0 +3459 a + -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch +pop /CBarY9 exch def + 0 3459 a 0 3459 a + 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint +exch pop /CBarY10 exch def + 0 3459 a 288 x Fm(4.5.15)99 +b(Batch)26 b(Scan)f(Options)0 3980 y Fq(The)i(batch)h(scan)h(options)g +(can)f(be)f(used)h(by)g(a)f(frontend)i(to)f(indicate)h(that)f(more)g +(than)g(one)g(image)f(will)g(be)h(scanned)h(in)0 4093 +y(a)g(batch.)47 b(The)29 b(back)o(end)j(can)e(optimize)g(for)g(such)g +(scans)h(by)e(e.g.)46 b(a)n(v)n(oiding)32 b(calibration)h(and)d(not)f +(mo)o(ving)h(home)g(the)0 4206 y(sensor)d(array)g(in)e(this)i(case.)35 +b(The)26 b(back)o(end)i(pro)o(vides)f(the)f(options)i +Fp(batch-scan)p Fq(,)20 b Fp(batch-scan-next-)o(tl)o(-x)o +Fq(,)0 4319 y Fp(batch-scan-next)o(-t)o(l-)o(y)p Fq(,)k +Fp(batch-scan-next)o(-b)o(r-)o(x)p Fq(,)g(and)30 b Fp(batch-scan-next)o +(-br)o(-y)o Fq(.)41 b(The)29 b(op-)0 4432 y(tion)d Fp(batch-scan)20 +b Fq(pro)o(vides)27 b(a)e(string)h(list)g(with)f(the)h(v)n(alues)g(of)f +Fp(No)f Fq(if)h(batch)h(scanning)i(isn')n(t)e(used,)g +Fp(Start)c Fq(for)k(the)0 4545 y(\002rst,)21 b Fp(End)f +Fq(for)i(the)f(last)i(and)f Fp(Loop)d Fq(for)i(an)o(y)h(other)h +(\(intermediate\))h(image.)29 b(The)21 b(batch-scan-ne)o(xt)26 +b(options)e(specify)f(the)0 4658 y(coordinates)k(of)c(the)h(ne)o(xt)g +(scan)g(and)g(follo)n(w)g(the)g(same)f(rules)i(as)e(the)h(scan)g(area)h +(options)g(\(see)f(section)h(4.5.4\).)0 4830 y(These)h(options)h(are)f +(not)g(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e +(support)i(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0 +4942 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)30 +b(In)24 b(this)g(case,)g(all)f(options)j(must)d(be)h(implemented.)3033 +4942 y + -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch +pop /CBarY11 exch def + 3033 4942 a 3033 4942 a + 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint +exch pop /CBarY12 exch def + 3033 4942 a 3033 4942 +a + gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth +CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore + 3033 4942 a 1905 5381 a Fq(47)p eop +%%Page: 48 49 +48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51 +b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g +(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h +(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895 +y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e +(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f +(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h +(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e +(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h +(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367 +y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e +(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5 +b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480 +y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g +(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i +(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h +(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g +(access)g(to)g(the)g(system.)227 2743 y(Controlling)34 +b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e) +n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227 +2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges) +i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i +(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36 +b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d +(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47 +b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n +(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227 +3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i +(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g +(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that) +g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f +(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g +(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i +(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24 +b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n +(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22 +b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l +(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f +(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834 +y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h +(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h +(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19 +b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e +(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws) +227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices) +h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44 +b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24 +b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g +(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i +(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g +(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740 +y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i +(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114 +4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client) +h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o +(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p +eop +%%Page: 49 50 +49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f +(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e +(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i +(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45 +b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h +(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227 +536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k +(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o +(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0 +896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h +(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h +(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0 +1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0 +1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7 +b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g +(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0 +2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44 +b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28 +b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h +(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n +(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44 +b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30 +b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c +(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).) +0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29 +b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10 +b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227 +2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g +(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h +(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43 +b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g +Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37 +b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227 +3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e +Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6 +b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43 +b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40 +b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f +(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g +(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d +(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227 +3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o +(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues) +g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f +(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g +(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47 +b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0 +4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378 +y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C) +e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e +(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737 +y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w) +o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g +(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28 +b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g +(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f +(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h +(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop +%%Page: 50 51 +50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded) +j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g +(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227 +236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29 +b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f +(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0 +525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by) +e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g +(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j +(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b +Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e +(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i +(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30 +b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j +(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g +(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25 +b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e +(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f +(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g +(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of) +d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518 +y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h +(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h +(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h +(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g +(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\)) +f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h +(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back) +o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0 +2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p +545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838 +y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e +(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20 +b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0 +2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g +(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g +(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744 +3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p +1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52 +b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p +1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52 +b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32 +b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35 +b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36 +b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687 +y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39 +b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i +(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v) +o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h +(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0 +3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f +(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e +(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o +(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g +(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31 +w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h +(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59 +b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26 +b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e +Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h +(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n +(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o +(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5 +b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o +(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0 +4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g +(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748 +y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28 +b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw) +o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g +(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n +(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p +0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19 +b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak) +g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5 +b(.)1905 5381 y Fq(50)p eop +%%Page: 51 52 +51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0 +356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f +(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055 +596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196 +b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822 +y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822 +V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h +(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6 +b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344 +V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has) +g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p +2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0 +1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f +Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765 +y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p +760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open) +i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760 +2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p +985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V +30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071 +2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577 +y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y +Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k +(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0 +2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b +Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35 +b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099 +V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has) +e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d +Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23 +b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31 +b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j +(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p +Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g +(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0 +3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g +(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0 +3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p +760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077 +4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p +1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252 +4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d +Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h +(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905 +5381 y(51)p eop +%%Page: 52 53 +52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30 +4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p +1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h +(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706 +705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97 +b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28 +w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h +(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29 +b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h +(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50 +b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n +(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A) +o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445 +1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 +1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 +4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V +34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i +(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i +(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694 +y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p +1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187 +2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040 +2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31 +w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294 +b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033 +V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p +1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 +b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 +3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 +b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371 +V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e +Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f +(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23 +b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the) +g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34 +b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40 +b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75 +b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c +Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945 +y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080 +3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p +1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h +Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p +Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V +31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058 +V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28 +b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g +(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f +(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n +(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c +Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31 +b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h +Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32 +b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v) +o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37 +b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g +(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f +(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o +(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622 +y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24 +b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g +(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call) +0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p +Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned) +h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f +(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26 +b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36 +b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f +Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p +Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h +(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p +eop +%%Page: 53 54 +53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on) +d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i +(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0 +236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f +(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946 +236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V +31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h +(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28 +b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462 +y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply) +i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i +(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28 +b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that) +f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0 +687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545 +995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V +35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i +(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886 +1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p +1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061 +1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061 +1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b +Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e +(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0 +2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40 +b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66 +b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f +Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330 +V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g +(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j +Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g +(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750 +30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).) +940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y +Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p +2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p +2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116 +3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891 +3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913 +y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g +(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h +(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23 +b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19 +b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e +(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33 +b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g +(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section) +g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d +(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31 +b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0 +4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073 +4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28 +b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n +(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27 +b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data) +g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0 +4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g +(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5 +b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g +(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50 +b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.) +0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence) +j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted) +j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j +(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f +(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905 +5381 y(53)p eop +%%Page: 54 55 +54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25 +b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g +(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31 +w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j +(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f +(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0 +349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g +(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i +(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18 +b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g +(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35 +b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36 +b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33 +b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742 +y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g +(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j +(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i +(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o +(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0 +968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31 +b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6 +b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v) +o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i +(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0 +1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j +(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i +(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h +(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609 +30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23 +b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f +(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635 +b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30 +w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53 +b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 +b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f +(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f +Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27 +b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e +(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g +(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0 +2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p +810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e +(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h +(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854 +b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31 +w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53 +b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967 +3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006 +y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g +(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31 +b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string) +h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24 +b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j +(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17 +b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j +(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0 +4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512 +y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o +(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n +(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g +(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo) +n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0 +4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g +(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i +(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22 +b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e +(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0 +5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905 +5381 y(54)p eop +%%Page: 55 56 +55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b +Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20 +b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30 +b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f +(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j +(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0 +349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26 +b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f +(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f +(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31 +w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p +Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v +35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g +(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5 +b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i +(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h +(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o +(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y +Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e +Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop +%%Page: 56 57 +56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51 +b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28 +b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.) +35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0 +1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g +(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h +(address.)227 2141 y Fp(sane-devel-requ)o(est)o(@m)o(os)o(ta)o(ng)o +(.co)o(m)0 2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with) +g(the)h(body)h(\223)p Fp(subscribe)51 b(sane-devel)p +Fq(\224)18 b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 +y(A)e(complete)j(list)e(of)g(commands)i(supported)h(can)d(be)h +(obtained)h(by)e(sending)j(a)c(mail)i(with)f(a)f(subject)j(of)e(\223)p +Fp(help)p Fq(\224)f(to)h(the)0 2672 y(abo)o(v)o(e)g(address.)31 +b(The)23 b(mailing)h(list)g(is)g(archi)n(v)o(ed)h(and)f(a)n(v)n +(ailable)h(through)h(the)e(SANE)d(home)j(page)g(at)f(URL:)227 +2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o(an)o(e/)1905 +5381 y Fq(56)p eop +%%Page: 57 58 +57 57 bop 0 586 a Fs(Index)0 1012 y Fq(analog)25 b(gamma)e(option,)i +(42)0 1125 y(array)-6 b(,)24 b(48)0 1321 y(Batch)g(Scan)f(Options,)i +(45)0 1434 y(bit)f(depth)g(option,)h(41)0 1547 y(br)n(-x,)f(40)0 +1659 y(br)n(-y)-6 b(,)24 b(40)0 1855 y(code)g(\003o)n(w)-6 +b(,)22 b(35)0 2051 y(de)n(vice-name,)k(16)0 2164 y(domain,)e(24)0 +2360 y(enumeration)i(types,)f(47)0 2556 y(gamma)e(table)h(options,)i +(42)0 2752 y(hightlight)g(options,)g(43)0 2948 y(image)e(data)g +(format,)g(8)0 3144 y(lamp-of)n(f)h(option,)f(44)0 3257 +y(lamp-on)h(option,)g(44)0 3453 y(mailing)g(list,)e(54)0 +3566 y(mode)h(options,)h(41)0 3762 y(netw)o(ork)g(authorization,)i(52)0 +3874 y(NUL,)21 b(14)0 4070 y(option)k(count,)g(39)0 4183 +y(Option)p 256 4183 28 4 v 34 w(Descriptor)p 671 4183 +V 36 w(Array)-6 b(,)23 b(50)0 4379 y(passw)o(ord,)i(24)0 +4492 y(pointer)l(,)g(47)0 4605 y(pre)n(vie)n(w)f(mode,)f(39)0 +4801 y(resolution)j(option,)f(39)0 4997 y(SANE)p 244 +4997 V 31 w(Action,)f(27)0 5110 y(SANE)p 244 5110 V 31 +w(A)l(CTION)p 616 5110 V 32 w(GET)p 826 5110 V 31 w(V)-12 +b(ALUE,)20 b(27)2095 1012 y(SANE)p 2339 1012 V 31 w(A)l(CTION)p +2711 1012 V 32 w(SET)p 2906 1012 V 31 w(A)-5 b(UT)n(O,)21 +b(27)2095 1125 y(SANE)p 2339 1125 V 31 w(A)l(CTION)p +2711 1125 V 32 w(SET)p 2906 1125 V 31 w(V)-12 b(ALUE,)20 +b(27)2095 1238 y(SANE)p 2339 1238 V 31 w(Authorization)p +2871 1238 V 37 w(Callback,)25 b(24)2095 1351 y(SANE)p +2339 1351 V 31 w(Bool,)f(13)2095 1463 y(SANE)p 2339 1463 +V 31 w(Byte,)g(12,)f(47)2095 1576 y(sane)p 2260 1576 +V 35 w(cancel,)h(33)2095 1689 y(SANE)p 2339 1689 V 31 +w(CAP)p 2548 1689 V 32 w(AD)l(V)-12 b(ANCED,)19 b(21)2095 +1802 y(SANE)p 2339 1802 V 31 w(CAP)p 2548 1802 V 32 w(AL)-7 +b(W)c(A)h(YS)p 2943 1802 V 31 w(SETT)i(ABLE,)19 b(21)2095 +1915 y(SANE)p 2339 1915 V 31 w(CAP)p 2548 1915 V 32 w(A)-5 +b(UT)n(OMA)-10 b(TIC,)20 b(21)2095 2028 y(SANE)p 2339 +2028 V 31 w(CAP)p 2548 2028 V 32 w(EMULA)-10 b(TED,)19 +b(21)2095 2141 y(SANE)p 2339 2141 V 31 w(CAP)p 2548 2141 +V 32 w(HARD)p 2839 2141 V 31 w(SELECT)-7 b(,)20 b(21)2095 +2254 y(SANE)p 2339 2254 V 31 w(CAP)p 2548 2254 V 32 w(HIDDEN,)h(21)2095 +2367 y(SANE)p 2339 2367 V 31 w(CAP)p 2548 2367 V 32 w(IN)m(A)l(CTIVE,)g +(21)2095 2480 y(SANE)p 2339 2480 V 31 w(CAP)p 2548 2480 +V 32 w(SOFT)p 2804 2480 V 31 w(DETECT)-7 b(,)20 b(21)2095 +2593 y(SANE)p 2339 2593 V 31 w(CAP)p 2548 2593 V 32 w(SOFT)p +2804 2593 V 31 w(SELECT)-7 b(,)20 b(21)2095 2705 y(SANE)p +2339 2705 V 31 w(Char)l(,)k(14,)f(47)2095 2818 y(sane)p +2260 2818 V 35 w(close,)h(26)2095 2931 y(SANE)p 2339 +2931 V 31 w(CONSTRAINT)p 2949 2931 V 30 w(NONE,)d(22)2095 +3044 y(SANE)p 2339 3044 V 31 w(CONSTRAINT)p 2949 3044 +V 30 w(RANGE,)f(22)2095 3157 y(SANE)p 2339 3157 V 31 +w(CONSTRAINT)p 2949 3157 V 30 w(STRING)p 3309 3157 V +31 w(LIST)-7 b(,)21 b(22)2095 3270 y(SANE)p 2339 3270 +V 31 w(Constraint)p 2746 3270 V 36 w(T)-7 b(ype,)23 b(20)2095 +3383 y(SANE)p 2339 3383 V 31 w(CONSTRAINT)p 2949 3383 +V 30 w(W)o(ORD)p 3257 3383 V 31 w(LIST)-7 b(,)22 b(22)2095 +3496 y(sane)p 2260 3496 V 35 w(control)p 2550 3496 V +35 w(option,)j(27)2095 3609 y(SANE)p 2339 3609 V 31 w(CURRENT)p +2797 3609 V 30 w(MAJOR,)d(11)2095 3722 y(SANE)p 2339 +3722 V 31 w(De)n(vice,)i(15)2095 3835 y(sane)p 2260 3835 +V 35 w(e)o(xit,)f(25)2095 3948 y(SANE)p 2339 3948 V 31 +w(F)-7 b(ALSE,)21 b(13)2095 4060 y(SANE)p 2339 4060 V +31 w(FIX,)h(14)2095 4173 y(SANE)p 2339 4173 V 31 w(Fix)o(ed,)i(13)2095 +4286 y(SANE)p 2339 4286 V 31 w(FIXED)p 2639 4286 V 32 +w(SCALE)p 2961 4286 V 30 w(SHIFT)-7 b(,)22 b(13)2095 +4399 y(SANE)p 2339 4399 V 31 w(Frame,)h(29)2095 4512 +y(SANE)p 2339 4512 V 31 w(FRAME)p 2685 4512 V 31 w(BLUE,)e(8,)i(29)2095 +4625 y(SANE)p 2339 4625 V 31 w(FRAME)p 2685 4625 V 31 +w(GRA)-10 b(Y)e(,)22 b(8,)h(29)2095 4738 y(SANE)p 2339 +4738 V 31 w(FRAME)p 2685 4738 V 31 w(GREEN,)e(8,)i(29)2095 +4851 y(SANE)p 2339 4851 V 31 w(FRAME)p 2685 4851 V 31 +w(MIME,)f(8,)h(10,)g(29)2095 4964 y(SANE)p 2339 4964 +V 31 w(FRAME)p 2685 4964 V 31 w(RA)-8 b(W)g(,)21 b(8,)i(29)2095 +5077 y(SANE)p 2339 5077 V 31 w(FRAME)p 2685 5077 V 31 +w(RED,)f(8,)g(29)1905 5381 y(57)p eop +%%Page: 58 59 +58 58 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(FRAME)p +590 123 V 31 w(RGB,)21 b(8,)i(29)0 236 y(sane)p 165 236 +V 34 w(get)p 309 236 V 34 w(de)n(vices,)i(25)0 349 y(sane)p +165 349 V 34 w(get)p 309 349 V 34 w(option)p 573 349 +V 35 w(descriptor)l(,)i(26)0 462 y(sane)p 165 462 V 34 +w(get)p 309 462 V 34 w(parameters,)e(29)0 574 y(sane)p +165 574 V 34 w(get)p 309 574 V 34 w(select)p 548 574 +V 35 w(fd,)e(34)0 687 y(SANE)p 244 687 V 31 w(Handle,)h(15,)f(47)0 +800 y(SANE)p 244 800 V 31 w(INFO)p 488 800 V 32 w(INEXA)l(CT)-7 +b(,)21 b(28)0 913 y(SANE)p 244 913 V 31 w(INFO)p 488 +913 V 32 w(INV)-12 b(ALID)l(A)i(TE)p 1052 913 V 30 w(PREVIEW)i(,)20 +b(28)0 1026 y(SANE)p 244 1026 V 31 w(INFO)p 488 1026 +V 32 w(RELO)m(AD)p 888 1026 V 30 w(OPTIONS,)g(28,)k(32)0 +1139 y(SANE)p 244 1139 V 31 w(INFO)p 488 1139 V 32 w(RELO)m(AD)p +888 1139 V 30 w(P)-8 b(ARAMS,)20 b(28)0 1252 y(sane)p +165 1252 V 34 w(init,)k(24)0 1365 y(SANE)p 244 1365 V +31 w(Int,)g(13)0 1478 y(SANE)p 244 1478 V 31 w(NET)p +453 1478 V 32 w(A)-5 b(UTHORIZE,)19 b(52)0 1591 y(SANE)p +244 1591 V 31 w(NET)p 453 1591 V 32 w(CANCEL,)h(52)0 +1704 y(SANE)p 244 1704 V 31 w(NET)p 453 1704 V 32 w(CLOSE,)g(49)0 +1817 y(SANE)p 244 1817 V 31 w(NET)p 453 1817 V 32 w(CONTR)l(OL)p +913 1817 V 30 w(OPTION,)h(50)0 1929 y(SANE)p 244 1929 +V 31 w(NET)p 453 1929 V 32 w(EXIT)-7 b(,)21 b(53)0 2042 +y(SANE)p 244 2042 V 31 w(NET)p 453 2042 V 32 w(GET)p +663 2042 V 31 w(DEVICES,)f(49)0 2155 y(SANE)p 244 2155 +V 31 w(NET)p 453 2155 V 32 w(GET)p 663 2155 V 31 w(OPTION)p +1029 2155 V 31 w(DESCRIPT)n(ORS,)f(50)0 2268 y(SANE)p +244 2268 V 31 w(NET)p 453 2268 V 32 w(GET)p 663 2268 +V 31 w(P)-8 b(ARAMETERS,)18 b(51)0 2381 y(SANE)p 244 +2381 V 31 w(NET)p 453 2381 V 32 w(INIT)-7 b(,)22 b(48)0 +2494 y(SANE)p 244 2494 V 31 w(NET)p 453 2494 V 32 w(OPEN,)e(49)0 +2607 y(SANE)p 244 2607 V 31 w(NET)p 453 2607 V 32 w(ST)-8 +b(AR)j(T)e(,)19 b(51)0 2720 y(sane)p 165 2720 V 34 w(open,)24 +b(25)0 2833 y(SANE)p 244 2833 V 31 w(Option)p 526 2833 +V 34 w(Descriptor)l(,)i(17)0 2946 y(SANE)p 244 2946 V +31 w(OPTION)p 610 2946 V 31 w(IS)p 722 2946 V 33 w(A)l(CTIVE,)21 +b(20)0 3059 y(SANE)p 244 3059 V 31 w(OPTION)p 610 3059 +V 31 w(IS)p 722 3059 V 33 w(SETT)-8 b(ABLE,)18 b(20)0 +3171 y(SANE)p 244 3171 V 31 w(P)o(arameters,)24 b(29)0 +3284 y(SANE)p 244 3284 V 31 w(Range,)g(22)0 3397 y(sane)p +165 3397 V 34 w(read,)g(32)0 3510 y(sane)p 165 3510 V +34 w(set)p 299 3510 V 34 w(io)p 403 3510 V 33 w(mode,)g(34)0 +3623 y(sane)p 165 3623 V 34 w(start,)g(32)0 3736 y(SANE)p +244 3736 V 31 w(Status,)g(15)0 3849 y(SANE)p 244 3849 +V 31 w(ST)-8 b(A)e(TUS)p 603 3849 V 30 w(A)l(CCESS)p +975 3849 V 30 w(DENIED,)21 b(15)0 3962 y(SANE)p 244 3962 +V 31 w(ST)-8 b(A)e(TUS)p 603 3962 V 30 w(CANCELLED,)19 +b(15)0 4075 y(SANE)p 244 4075 V 31 w(ST)-8 b(A)e(TUS)p +603 4075 V 30 w(CO)-5 b(VER)p 938 4075 V 31 w(OPEN,)21 +b(15)0 4188 y(SANE)p 244 4188 V 31 w(ST)-8 b(A)e(TUS)p +603 4188 V 30 w(DEVICE)p 968 4188 V 31 w(B)o(USY)e(,)21 +b(15)0 4301 y(SANE)p 244 4301 V 31 w(ST)-8 b(A)e(TUS)p +603 4301 V 30 w(EOF)j(,)21 b(15)0 4413 y(SANE)p 244 4413 +V 31 w(ST)-8 b(A)e(TUS)p 603 4413 V 30 w(GOOD,)21 b(15,)i(24)0 +4526 y(SANE)p 244 4526 V 31 w(ST)-8 b(A)e(TUS)p 603 4526 +V 30 w(INV)e(AL,)21 b(15)0 4639 y(SANE)p 244 4639 V 31 +w(ST)-8 b(A)e(TUS)p 603 4639 V 30 w(IO)p 729 4639 V 32 +w(ERR)l(OR,)21 b(15)0 4752 y(SANE)p 244 4752 V 31 w(ST)-8 +b(A)e(TUS)p 603 4752 V 30 w(J)-5 b(AMMED,)21 b(15)0 4865 +y(SANE)p 244 4865 V 31 w(ST)-8 b(A)e(TUS)p 603 4865 V +30 w(NO)p 765 4865 V 32 w(DOCS,)21 b(15)0 4978 y(SANE)p +244 4978 V 31 w(ST)-8 b(A)e(TUS)p 603 4978 V 30 w(NO)p +765 4978 V 32 w(MEM,)21 b(15)0 5091 y(SANE)p 244 5091 +V 31 w(ST)-8 b(A)e(TUS)p 603 5091 V 30 w(UNSUPPOR)-5 +b(TED,)17 b(15)2095 123 y(SANE)p 2339 123 V 31 w(String,)24 +b(14,)f(47)2095 236 y(SANE)p 2339 236 V 31 w(String)p +2591 236 V 34 w(Const,)h(14)2095 349 y(sane)p 2260 349 +V 35 w(strstatus,)h(35)2095 462 y(SANE)p 2339 462 V 31 +w(TR)l(UE,)d(13)2095 574 y(SANE)p 2339 574 V 31 w(TYPE)p +2599 574 V 31 w(BOOL,)f(19)2095 687 y(SANE)p 2339 687 +V 31 w(TYPE)p 2599 687 V 31 w(B)o(UTT)n(ON,)g(19)2095 +800 y(SANE)p 2339 800 V 31 w(TYPE)p 2599 800 V 31 w(FIXED,)g(19)2095 +913 y(SANE)p 2339 913 V 31 w(TYPE)p 2599 913 V 31 w(GR)l(OUP)-10 +b(,)21 b(19)2095 1026 y(SANE)p 2339 1026 V 31 w(TYPE)p +2599 1026 V 31 w(INT)-7 b(,)23 b(19)2095 1139 y(SANE)p +2339 1139 V 31 w(TYPE)p 2599 1139 V 31 w(STRING,)e(19)2095 +1252 y(SANE)p 2339 1252 V 31 w(Unit,)i(18)2095 1365 y(SANE)p +2339 1365 V 31 w(UNFIX,)f(14)2095 1478 y(SANE)p 2339 +1478 V 31 w(UNIT)p 2588 1478 V 32 w(BIT)-7 b(,)22 b(19)2095 +1591 y(SANE)p 2339 1591 V 31 w(UNIT)p 2588 1591 V 32 +w(DPI,)g(19)2095 1704 y(SANE)p 2339 1704 V 31 w(UNIT)p +2588 1704 V 32 w(MICR)l(OSECOND,)e(19)2095 1817 y(SANE)p +2339 1817 V 31 w(UNIT)p 2588 1817 V 32 w(MM,)i(19)2095 +1929 y(SANE)p 2339 1929 V 31 w(UNIT)p 2588 1929 V 32 +w(NONE,)f(19)2095 2042 y(SANE)p 2339 2042 V 31 w(UNIT)p +2588 2042 V 32 w(PERCENT)-7 b(,)20 b(19)2095 2155 y(SANE)p +2339 2155 V 31 w(UNIT)p 2588 2155 V 32 w(PIXEL,)h(19)2095 +2268 y(SANE)p 2339 2268 V 31 w(V)-10 b(alue)p 2576 2268 +V 34 w(T)j(ype,)23 b(18)2095 2381 y(SANE)p 2339 2381 +V 31 w(VERSION)p 2766 2381 V 31 w(CODE,)e(12)2095 2494 +y(SANE)p 2339 2494 V 31 w(VERSION)p 2766 2494 V 31 w(MAJOR,)h(12)2095 +2607 y(SANE)p 2339 2607 V 31 w(W)-7 b(ord,)24 b(12,)f(47)2095 +2720 y(scan)i(area)f(options,)h(40)2095 2833 y(scan)g(resolution,)h(39) +2095 2946 y(scanner)g(b)n(utton)f(options,)g(44)2095 +3059 y(shado)n(w)f(options,)i(43)2095 3171 y(source)f(options,)g(41) +2095 3284 y(structure,)h(48)2095 3480 y(threshold)g(option,)f(41)2095 +3593 y(tl-x,)f(40)2095 3706 y(tl-y)-6 b(,)24 b(40)2095 +3819 y(T)-7 b(ype)24 b(Strings,)g(16)2095 4015 y(union,)h(48)2095 +4128 y(username,)g(24)2095 4324 y(V)-10 b(endor)25 b(Strings,)f(16)2095 +4520 y(well-kno)n(wn)h(options,)g(38)1905 5381 y(58)p +eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/sane2/0.08/sane2-0.08.tex b/sane2/0.08/sane2-0.08.tex new file mode 100644 index 00000000..c9d96da9 --- /dev/null +++ b/sane2/0.08/sane2-0.08.tex @@ -0,0 +1,2721 @@ +\documentclass[11pt,DVIps]{report} + +\usepackage{times,epsfig,changebar,html} + +\setlength{\parindent}{0pt} +\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex} +\setlength{\textwidth}{6.5in} +\setlength{\textheight}{8.5in} +\setlength{\marginparwidth}{0pt} +\setlength{\oddsidemargin}{0pt} +\setlength{\evensidemargin}{0pt} +\setlength{\marginparsep}{0pt} +\addtolength{\topmargin}{-0.75in} + +\title{\huge SANE Standard Version 2.0 proposal 0.08 - rauch/beck} +\author{} +\date{Dec 8, 2002} + +\makeindex + +\begin{document} + +\newcommand{\filename}[1]{{\tt #1}} +\newcommand{\code}[1]{{\tt #1}} +\newcommand{\var}[1]{{\it #1}} +\newcommand{\defn}[1]{#1\index{#1}} + +\begin{latexonly} + \setcounter{changebargrey}{0} % black change bars +\end{latexonly} + +\maketitle +\tableofcontents +\listoffigures +\listoftables + + +\chapter{Preface} + +The SANE standard is being developed by a group of free-software +developers. The process is open to the public and comments as well as +suggestions for improvements are welcome. Information on how to join +the SANE development process can be found in Chapter +\ref{chap:contact}. + +The SANE standard is intended to streamline software development by +providing a standard application programming interface to access +raster scanner hardware. This should reduce the number of different +driver implementations, thereby reducing the need for reimplementing +similar code. + + +\section{About This Document} + +This document is intended for developers who are creating either an +application that requires access to raster scanner hardware and for +developers who are implementing a SANE driver. It does not cover +specific implementations of SANE components. Its sole purpose is to +describe and define the SANE application interface that will enable +any application on any platform to interoperate with any SANE backend +for that platform. + +The remainder of this document is organized as follows. +Chapter~\ref{chap:intro} provides introductional material. +Chapter~\ref{chap:environ} presents the environment SANE is designed +for. Chapter~\ref{chap:api} details the SANE Application Programmer +Interface. Chapter~\ref{chap:net} specifies the network protocol that +can be used to implement the SANE API in a network transparent +fashion. Finally, Chapter~\ref{chap:contact} gives information on how +to join the SANE development process. + +\subsection{Typographic Conventions} + +Changes since the last revision of this document are highlighted +like this: + +\begin{changebar} + Paragraphs that changed since the last revision of the documention + are marked like this paragraph. +\end{changebar} + +\chapter{Introduction}\label{chap:intro} + +SANE is an application programming interface (API) that provides +standardized access to any raster image scanner hardware. The +standardized interface allows to write just one driver for each +scanner device instead of one driver for each scanner and application. +The reduction in the number of required drivers provides significant +savings in development time. More importantly, SANE raises the level +at which applications can work. As such, it will enable applications +that were previously unheard of in the UNIX world. While SANE is +primarily targeted at a UNIX environment, the standard has been +carefully designed to make it possible to implement the API on +virtually any hardware or operating system. + +SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is +that SANE is sane in the sense that it will allow easy implementation +of the API while accommodating all features required by today's +scanner hardware and applications. Specifically, SANE should be broad +enough to accommodate devices such as scanners, digital still and +video cameras, as well as virtual devices like image file filters. + +\section{Terminology} + +An application that uses the SANE interface is called a SANE {\em + frontend}. A driver that implements the SANE interface is called a +SANE {\em backend}. A {\em meta backend\/} provides some means to +manage one or more other backends. + + +\chapter{The SANE Environment}\label{chap:environ} + +SANE is defined as a C-callable library interface. Accessing a raster +scanner device typically consists of two phases: first, various +controls of the scanner need to be setup or queried. In the second +phase, one or more images are acquired. + +Since the device controls are widely different from device to device, +SANE provides a generic interface that makes it easy for a frontend to +give a user access to all controls without having to understand each +and every device control. The design principle used here is to +abstract each device control into a SANE {\em option\/}. An option is +a self-describing name/value pair. For example, the brightness +control of a camera might be represented by an option called +\code{brightness} whose value is an integer in the range from 0 to +255. + +With self-describing options, a backend need not be concerned with +{\em presentation\/} issues: the backend simply provides a list of +options that describe all the controls available in the device. +Similarly, there are benefits to the frontend: it need not be +concerned with the {\em meaning\/} of each option. It simply provides +means to present and alter the options defined by the backend. + + +\section{Attaching to a SANE backend} + +The process through which a SANE frontend connects to a backend is +platform dependent. Several possibilities exist: +\begin{itemize} + +\item {\bf Static linking:} A SANE backend may be linked directly into + a frontend. While the simplest method of attaching to a backend, it + is somewhat limited in functionality since the available devices is + limited to the ones for which support has been linked in when the + frontend was built. But even so static linking can be quite useful, + particularly when combined with a backend that can access scanners + via a network. Also, it is possible to support multiple backends + simultaneously by implementing a meta backend that manages several + backends that have been compiled in such a manner that they export + unique function names. For example, a backend called \code{be} + would normally export a function called \code{sane\_read()}. If + each backend would provide such a function, static linking would + fail due to multiple conflicting definitions of the same symbol. + This can be resolved by having backend \code{be} include a + header file that has lines of the form: + \begin{quote} +\begin{verbatim} +#define sane_read be_sane_read +\end{verbatim} + \end{quote} + With definitions of this kind, backend \code{be} will export + function name \code{be\_sane\_read()}. Thus, all backends will + export unique names. As long as a meta backend knows about these + names, it is possible to combine several backends at link time and + select and use them dynamically at runtime. + +\item {\bf Dynamic linking:} A simpler yet more powerful way to + support multiple backends is to exploit dynamic linking on platforms + that support it. In this case, a frontend is linked against a + shared library that implements any SANE backend. Since each + dynamically linked backend exports the same set of global symbols + (all starting with the prefix \code{sane\_}), the dynamic library + that gets loaded at runtime does not necessarily have to be the same + one as one the frontend got linked against. In other words, it is + possible to switch the backend by installing the appropriate backend + dynamic library. + + More importantly, dynamic linking makes it easy to implement a meta + backend that loads other backends {\em on demand}. This is a + powerful mechanism since it allows adding new backends merely by + installing a shared library and updating a configuration file. + +\item {\bf Network connection:} Arguably the ultimate way to attach to + a scanner is by using the network to connect to a backend on a + remote machine. This makes it possible to scan images from any host + in the universe, as long as there is a network connection to that + host and provided the user is permitted to access that scanner. + +\end{itemize} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth} + \caption{Example SANE Hiearchy} + \label{fig:hierarchy} + \end{center} +\end{figure} + +The above discussion lists just a few ways for frontends to attach to +a backend. It is of course possible to combine these solutions to +provide an entire hierarchy of SANE backends. Such a hierarchy is +depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine +A uses a dynamic-linking based meta backend called \code{dll} to +access the backends called \code{pnm}, \code{mustek}, and \code{net}. +The first two are real backends, whereas the last one is a meta +backend that provides network transparent access to remote scanners. +In the figure, machine B provides non-local access to its scanners +through the SANE frontend called \code{saned}. The \code{saned} in +turn has access to the \code{hp} and \code{autolum} backends through +another instance of the \code{dll} backend. The \code{autolum} meta +backend is used to automatically adjust the luminance (brightness) of +the image data acquired by the camera backend called \code{qcam}. + +Note that a meta backend really is both a frontend and a backend at +the same time. It is a frontend from the viewpoint of the backends +that it manages and a backend from the viewpoint of the frontends that +access it. The name ``meta backend'' was chosen primarily because the +SANE standard describes the interface from the viewpoint of a (real) +frontend. + + +\section{Image Data Format}\label{sec:imageformat}\index{image data format} + +Arguably the most important aspect of an image acquisition system is how +images are represented. The SANE approach is to define a simple yet powerful +representation that is sufficient for vast majority of applications and +devices. While the representation is simple, the interface has been defined +carefully to allow extending it in the future without breaking backwards +compatibility. Thus, it will be possible to accommodate future applications or +devices that were not anticipated at the time this standard was created. + +A SANE image is a rectangular area. The rectangular area is subdivided into a +number of rows and columns. At the intersection of each row and column is a +(preferable quadratic) pixel. A pixel consists of one or more sample values. +Each sample value represents one channel (e.g., the red channel). + +The SANE API transmits an image as a sequence of frames. Each frame covers +the same rectangular area as the entire image, but may contain only a subset +of the channels in the final image. For example, a red/green/blue image could +either be transmitted as a single frame that contains the sample values for +all three channels or it could be transmitted as a sequence of three frames: +the first frame containing the red channel, the second the green channel, and +the third the blue channel. + +When transmitting an image frame by frame, the frontend needs to know what +part of the image a frame represents (and how many frames it should expect). +For that purpose, the SANE API tags every frame with a type and a format +descriptor. + +\begin{changebar} + There are two different types of frames: pixel oriented frames + \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames + \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the + following sections. The frame types used by the previous version~1 of this + standard (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}}, + \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and + \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by + \code{\defn{SANE\_FRAME\_RAW}}. + + \subsection{Pixel oriented frames} + + The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The + frame contains one or more channels of data in a channel-interleaved format, + that represents sample values from a property of the individual pixels that + is subject to further description in the \code{format\_desc} member of the + \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparameters} + on page~\pageref{sec:sanegetparameters} for details about the format + descriptions. +\end{changebar} + + Each sample value has a certain bit depth. The bit depth is fixed for the + entire image and can be as small as one bit. Valid bit depths are 1, 8, or + 16 bits per sample. If a device's natural bit depth is something else, it is + up to the driver to scale the sample values appropriately (e.g., a 4 bit + sample could be scaled by a factor of four to represent a sample value of + depth 8). + +\begin{changebar} + The complete image may consist of several different channels. The number of channels + is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}. + The image may be transmitted in an arbitrary number of frames which can be + determined by watching the \code{SANE\_PFLAG\_LAST\_FRAME} flag in said type (or by + counting the channels). Note: This frame type replaces all frame types of + the SANE standard version 1. +\end{changebar} + +Conceptually, each pixel oriented frame is transmitted a byte at a time. Each +byte may contain 8 sample values (for an image bit depth of 1), one full +sample value (for an image bit depth of 8), or a partial sample value (for an +image bit depth of 16 or bigger). In the latter case, the bytes of each +sample value are transmitted in the machine's native byte order. +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + A network-based meta backend will have to ensure that the byte order + in image data is adjusted appropriately if necessary. For example, + when the meta backend attaches to the server proxy, the proxy may + inform the backend of the server's byte order. The backend can then + apply the adjustment if necessary. In essence, this implements a + ``receiver-makes-right'' approach. +\end{quote} + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/xfer.eps,width=0.5\textwidth} + \caption{Transfer order of image data bytes} + \label{fig:xfer} + \end{center} +\end{figure} + +The order in which the sample values in a frame are transmitted is illustrated +in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by +row and each row is transmitted from left-most to right-most column. The +left-to-right, top-to-bottom transmission order applies when the image is +viewed in its normal orientation (as it would be displayed on a screen, for +example). + +If a frame contains multiple channels, then the channels are transmitted in an +interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case +where a frame contains a complete red/green/blue image with a bit-depth of 8. + +\begin{figure}[htbp] + \begin{center} + \leavevmode + \psfig{file=figs/image-data.eps,width=0.8\textwidth} + \caption{Bit and byte order of image data} + \label{fig:pixels} + \end{center} +\end{figure} + +For a bit depth of 1, each byte contains 8 sample values of a {\em single\/} +channel. In other words, a bit depth 1 frame is transmitted in a byte +interleaved fashion. The first sample of each byte is represented by the most +significant bit. + +\begin{changebar} +For gray channels at a bit depth of 1 only two sample values are possible: 1 +represents minimum intensity (black) and 0 represents maximum intensity +(white). For all other channel types and bit depths a sample value of 0 +represents minimum intensity and larger values represent increasing intensity. + +\subsection{Arbitrary data frames} + +It also is possible to transmit arbitrary (not necessaryly pixel oriented) +data. This allows transmission of compressed images like jpeg, tiff, etc. + +The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}. +The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is +given in the \code{format\_desc} member of the \code{SANE\_Parameters} +structured type (see section~\ref{sec:sanegetparameters} on +page~\pageref{sec:sanegetparameters}). As such, it is assumed to be +incomprehensible to the frontend, except for selected types the frontend is +specifically capable of handling internally. The frontend is free to ignore +those frames, or employ any appropriate means to otherwise handle this data +(like saving them to disk or spawning an external viewer). +\end{changebar} + +\chapter{The SANE Application Programmer Interface (API)}\label{chap:api} + +\begin{changebar} +This Section defines version 2 of the SANE application +programmer interface (API). Any SANE frontend must depend on the +interface defined in this section only. Converseley, any SANE backend +must implement its functionality in accordance with this +specification. The interface as documented here is declared as a C +callable interface in a file called \filename{sane/sane-2.h}. This file should +normally be included via a C pre-processor directive of the form: +\begin{verbatim} + #include +\end{verbatim} +\end{changebar} + + +\section{Version Control} + +The SANE standard is expected to evolve over time. Whenever a change +to the SANE standard is made that may render an existing frontend or +backend incompatible with the new standard, the major version number +must be increased. Thus, any frontend/backend pair is compatible +provided the major version number of the SANE standard they implement +is the same. A frontend may implement backwards compatiblity by +allowing major numbers that are smaller than the expected major number +(provided the frontend really can cope with the older version). In +contrast, a backend always provides support for one and only one +version of the standard. If a specific application does require that +two different versions of the same backend are accessible at the same +time, it is possible to do so by installing the two versions under +different names. + +SANE version control also includes a minor version number and a build +revision. While control of these numbers remains with the implementor +of a backend, the recommended use is as follows. The minor version is +incremented with each official release of a backend. The build +revision is increased with each build of a backend. + +The SANE API provides the following five macros to manage version +numbers. +\begin{quote} + \begin{description} + \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the + number of the SANE standard that the interface implements. + + \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:] + \label{sec:saneversioncode} + This macro can be used to build a monotonically increasing version + code. A SANE version code consists of the SANE standard major + version number (\var{maj}), the minor version number \var{min}, + and the build revision of a backend (\var{bld}). The major and + minor version numbers must be in the range 0\ldots255 and the + build revision must be in the range 0\ldots65535. + + Version codes are monotonic in the sense that it is possible to + apply relational operators (e.g., equality or less-than test) + directly on the version code rather than individually on the three + components of the version code. + + Note that the major version number alone determines whether a + frontend/backend pair is compatible. The minor version and the + build revision are used for informational and bug-fixing purposes + only. + + \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the + major version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the + minor version number component of the version code passed in + argument \var{vc}. + \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the + build revision component of the version code passed in argument + \var{vc}. + \end{description} +\end{quote} + + +\section{Data Types} + +\subsection{Base Types} + +The SANE standard is based on just two SANE-specific base types: the +SANE byte and word. +\begin{quote} + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\ + \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};} +\end{quote} +\verb|SANE_Byte| must correspond to some scalar C type that is capable +of holding values in the range 0 to 255. \verb|SANE_Word| must be +capable of holding any of the following: +\begin{itemize} + \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE| + \item signed integers in the range $-2^{31}\ldots2^{31}-1$ + \item fixed point values in the range $-32768\ldots32767.9999$ with + a resolution of $1/65536$ + \item 32 bits (for bit sets) +\end{itemize} +Note that the SANE standard does not define what C type +\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some +platforms, the latter may map to \verb|long int| whereas on others it +may map to \verb|int|. A portable SANE frontend or backend must +therefore not depend on a particular mapping. + +\subsection{Boolean Type} + +\code{\defn{SANE\_Bool}} is used for variables that can take one of +the two truth values \code{\defn{SANE\_FALSE}} and +\code{\defn{SANE\_TRUE}}. The former value is defined to be 0, +whereas the latter is 1.\footnote{This is different from ANSI C where + any non-zero integer value represents logical TRUE.} The C +declarations for this type are given below. +\begin{quote} +\begin{verbatim} +#define SANE_FALSE 0 +#define SANE_TRUE 1 +typedef SANE_Word SANE_Bool; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Bool| whenever a given variable or formal argument has a +fixed interpretation as a boolean object. + +\subsection{Integer Type} + +\code{\defn{SANE\_Int}} is used for variables that can take integer +values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is +given below. +\begin{quote} +\begin{verbatim} +typedef SANE_Word SANE_Int; +\end{verbatim} +\end{quote} +Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It +is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Int| whenever a given variable or formal argument has a +fixed interpretation as an integer object. + + +\subsection{Fixed-point Type} + +\code{\defn{SANE\_Fixed}} is used for variables that can take fixed +point values in the range $-32768$ to $32767.9999$ with a resolution +of $1/65535$. The C declarations relating to this type are given +below. +\begin{quote} +\begin{verbatim} +#define SANE_FIXED_SCALE_SHIFT 16 +typedef SANE_Word SANE_Fixed; +\end{verbatim} +\end{quote} +The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location +of the fixed binary point. This standard defines that value to be 16, +which yields a resolution of $1/65536$. + +Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|. +It is therefore always legal to use the latter type in place of the +former. However, for clarity, it is recommended to use +\verb|SANE_Fixed| whenever a given variable or formal argument has a +fixed interpretation as a fixed-point object. + +For convenience, SANE also defines two macros that convert fixed-point +values to and from C double floating point values. +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE + fixed-point value that is smaller than the double value \var{d}. + No range checking is performed. If the value of \var{d} is out of + range, the result is undefined. + + \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest + double machine number that corresponds to fixed-point value + \var{w}. + + \end{description} +\end{quote} +SANE does {\em not\/} require that the following two expressions hold +true (even if the values of \var{w} and \var{d} are in range): +\begin{quote} +\begin{verbatim} +SANE_UNFIX(SANE_FIX(d)) == d +SANE_FIX(SANE_UNFIX(w)) == w +\end{verbatim} +\end{quote} +In other words, conversion between fixed and double values may be +lossy. It is therefore recommended to avoid repeated conversions +between the two representations. + + +\subsection{Text} + +\subsubsection{Character Type} + +Type \code{\defn{SANE\_Char}} represents a single text character or +symbol. At present, this type maps directly to the underlying C +\verb|char| type (typically one byte). The encoding for such +characters is currently fixed as ISO LATIN-1. Future versions of this +standard may map this type to a wider type and allow multi-byte +encodings to support internationalization. As a result of this, care +should be taken to avoid the assumption that +\verb|sizeof(SANE_Char)==sizeof(char)|. +\begin{quote} +\begin{verbatim} +typedef char SANE_Char; +\end{verbatim} +\end{quote} + +\subsubsection{String Type} + +Type \code{\defn{SANE\_String}} represents a text string as a sequence +of C \verb|char| values. The end of the sequence is indicated by a +\verb|'\0'| (\defn{NUL}) character. +\begin{quote} +\begin{verbatim} +typedef SANE_Char *SANE_String; +typedef const SANE_Char *SANE_String_Const; +\end{verbatim} +\end{quote} +The type \code{\defn{SANE\_String\_Const}} is provided by SANE to +enable declaring strings whose contents is unchangable. Note that in +ANSI C, the declaration +\begin{quote} +\begin{verbatim} +const SANE_String str; +\end{verbatim} +\end{quote} +declares a string pointer that is constant (not a string pointer that +points to a constant value). + + +\subsection{Scanner Handle Type} + +Access to a scanner is provided through an opaque type called +\code{\defn{SANE\_Handle}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef void *SANE_Handle; +\end{verbatim} +\end{quote} +While this type is declared to be a void pointer, an application must +not attempt to interpret the value of a \verb|SANE_Handle|. In +particular, SANE does not require that a value of this type is a legal +pointer value. + + +\subsection{Status Type} + +Most SANE operations return a value of type \code{\defn{SANE\_Status}} +to indicate whether the completion status of the operation. If an +operation completes successfully, \verb|SANE_STATUS_GOOD| is returned. +In case of an error, a value is returned that indicates the nature of +the problem. The complete list of available status codes is listed in +Table \ref{tab:status}. It is recommended to use function +\code{sane\_strstatus()} to convert status codes into a legible +string. + +\begin{table}[htbp] + \begin{center} + \begin{tabular}{|l|r|l|} + \hline + \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} & + \multicolumn{1}{c|}{\bf Description} \\ + \hline\hline +\code{\defn{SANE\_STATUS\_GOOD}} + & 0 & Operation completed succesfully. \\ +\code{\defn{SANE\_STATUS\_UNSUPPORTED}} + & 1 & Operation is not supported. \\ +\code{\defn{SANE\_STATUS\_CANCELLED}} + & 2 & Operation was cancelled. \\ +\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}} + & 3 & Device is busy---retry later. \\ +\code{\defn{SANE\_STATUS\_INVAL}} + & 4 & Data or argument is invalid. \\ +\code{\defn{SANE\_STATUS\_EOF}} + & 5 & No more data available (end-of-file). \\ +\code{\defn{SANE\_STATUS\_JAMMED}} + & 6 & Document feeder jammed. \\ +\code{\defn{SANE\_STATUS\_NO\_DOCS}} + & 7 & Document feeder out of documents. \\ +\code{\defn{SANE\_STATUS\_COVER\_OPEN}} + & 8 & Scanner cover is open. \\ +\code{\defn{SANE\_STATUS\_IO\_ERROR}} + & 9 & Error during device I/O. \\ +\code{\defn{SANE\_STATUS\_NO\_MEM}} + & 10 & Out of memory. \\ +\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}} + & 11 & Access to resource has been denied. \\ + \hline + \end{tabular} + \caption{Status Codes}\label{tab:status} + \end{center} +\end{table} + + +\subsection{Device Descriptor Type} +\begin{changebar} + +Each SANE device is represented by a structure of type +\code{\defn{SANE\_Device}}. The C declaration of this type is given +below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const vendor; + SANE_String_Const model; + SANE_String_Const type; + SANE_String_Const email_backend_author; + SANE_String_Const backend_website; + SANE_String_Const device_location; + SANE_String_Const comment; + SANE_String_Const reserved_string; + SANE_Int backend_version_code; + SANE_Int backend_capablity_flags; + SANE_Int reserved_int; + } +SANE_Device; +\end{verbatim} +\end{quote} +\end{changebar} +\index{device-name} +The structure provides the unique name of the scanner in member +\code{name}. It is this unique name that should be passed in a call +to \code{sane\_open()}. The format of this name is completely up to +the backend. The only constraints are that the name is unique among +all devices supported by the backend and that the name is a legal SANE +text string. To simplify presentation of unique names, their length +should not be excessive. It is {\em recommended\/} that backends keep +unique names below 32 characters in length. However, applications +{\em must\/} be able to cope with arbitrary length unique names. + +The next three members in the device structure provide additional +information on the device corresponding to the unique name. +Specifically, members \code{vendor}, \code{model}, and \code{type} are +single-line strings that give information on the vendor +(manufacturer), model, and the type of the device. For consistency's +sake, the following strings should be used when appropriate (the lists +will be expanded as need arises): + +\begin{table}[htbp] + \begin{center} + \leavevmode + \hspace{\fill} + \begin{tabular}[t]{|ll|} + \hline + \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\ + \hline\hline + \code{AGFA} & \code{Microtek} \\ + \code{Abaton} & \code{Minolta} \\ + \code{Acer} & \code{Mustek} \\ + \code{Apple} & \code{NEC} \\ + \code{Artec} & \code{Nikon} \\ + \code{Avision} & \code{Plustek} \\ + \code{CANON} & \code{Polaroid} \\ + \code{Connectix} & \code{Ricoh} \\ + \code{Epson} & \code{Sharp} \\ + \code{Fujitsu} & \code{Siemens} \\ + \code{Hewlett-Packard} & \code{Tamarack} \\ + \code{IBM} & \code{UMAX} \\ + \code{Kodak} & \code{Noname} \\ + \code{Logitech} & \\ + \hline + \end{tabular} + \hspace{\fill} + \begin{tabular}[t]{|l|} + \hline + \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\ + \hline\hline + \code{film scanner} \\ + \code{flatbed scanner} \\ + \code{frame grabber} \\ + \code{handheld scanner} \\ + \code{multi-function peripheral} \\ + \code{sheetfed scanner} \\ + \code{still camera} \\ + \code{video camera} \\ + \code{virtual device} \\ + \hline + \end{tabular} + \hspace{\fill} + \caption{Predefined Device Information Strings} + \label{tab:devinfo} + \end{center} +\end{table} +Note that vendor string \code{Noname} can be used for virtual devices +that have no physical vendor associated. Also, there are no +predefined model name strings since those are vendor specific and +therefore completely under control of the respective backends. + +\begin{changebar} +The backend has to set up the string \code{email\_backend\_author} +with the name and the email address of the backend author or a contact person +in the format: +\begin{verbatim} +Firstname Lastname +\end{verbatim} + +The string \code{backend\_website} should be set up by the backend +with the website or ftp address of the backend in the format: +\begin{verbatim} +http://www.domain.org/sane-hello/index.html +\end{verbatim} + +The backend should fill the string \code{device\_location} with a +text that describes where a user can find this device. The text +should be configurable by the administrator. This could e.g. look +like this: +\begin{verbatim} +building 93, 2nd plane, room 2124 +\end{verbatim} + +The string \code{comment} can be used to display any comment about the device +to the user. The text should be configurable by the administrator. + +The string \code{reserved\_string} is unused currently but planned for +future use. + +All unused strings must be set to ``'' by the backend. + +With member \code{backend\_version\_code} a frontend can find +out the version of a backend it is connected to via one or more meta +backends. + +The member \code{backend\_capability\_flags} contains 32 bits that +are planned to give the backend the chance to inform the frontend about +its capabilities. The meaning of the flags will be defined when there +is the need for it. The backend has to set all not defined bits +(in the moment all 32 bits) to 0. + +The member \code{reserved\_int} is planned for future use, the backend has +to set the value of the integer to 0. +\end{changebar} + +\subsection{Option Descriptor Type}\label{sec:odesc} + +Option descriptors are at the same time the most intricate and +powerful type in the SANE standard. Options are used to control +virtually all aspects of device operation. Much of the power of the +SANE API stems from the fact that most device controls are completely +described by their respective option descriptor. Thus, a frontend can +control a scanner abstractly, without requiring knowledge as to what +the purpose of any given option is. Conversely, a scanner can +describe its controls without requiring knowledge of how the frontend +operates. The C declaration of the +\code{\defn{SANE\_Option\_Descriptor}} type is given below. +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_String_Const name; + SANE_String_Const title; + SANE_String_Const desc; + SANE_Value_Type type; + SANE_Unit unit; + SANE_Int size; + SANE_Int cap; + SANE_Constraint_Type constraint_type; + union + { + const SANE_String_Const *string_list; + const SANE_Word *word_list; + const SANE_Range *range; + } + constraint; + } +SANE_Option_Descriptor; +\end{verbatim} +\end{quote} + +\subsubsection{Option Name} + +Member \code{name} is a string that uniquely identifies the option. +The name must be unique for a given device (i.e., the option names +across different backends or devices need not be unique). The option +name must consist of lower-case ASCII letters (\code{a}--\code{z}), +digits (\code{0}--\code{9}), or the dash character (\code{-}) only. +The first character must be a lower-case ASCII character (i.e., not a +digit or a dash). + +\subsubsection{Option Title} + +Member \code{title} is a single-line string that can be used by the +frontend as a title string. This should typically be a short (one or +two-word) string that is chosen based on the function of the option. + +\subsubsection{Option Description} + +Member \code{desc} is a (potentially very) long string that can be +used as a help text to describe the option. It is the responsibility +of the frontend to break the string into managable-length lines. +Newline characters in this string should be interpreted as paragraph +breaks. + +\subsubsection{Option Value Type} + +Member \code{type} specifies the type of the option value. The +possible values for type \code{\defn{SANE\_Value\_Type}} are described +in Table \ref{tab:valuetype}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|p{0.6\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type + \verb|SANE_Bool|. \\ + +\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type + \verb|SANE_Int|. \\ + +\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type + \verb|SANE_Fixed|. \\ + +\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type + \verb|SANE_String|. \\ + +\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value. +Instead, setting an option of this type has an option-specific +side-effect. For example, a button-typed option could be used by a +backend to provide a means to select default values or to the tell an +automatic document feeder to advance to the next sheet of paper. \\ + +\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value. +This type is used to group logically related options. A group option +is in effect up to the point where another group option is encountered +(or up to the end of the option list, if there are no other group +options). For group options, only members \code{title} and +\code{type} are valid in the option descriptor. \\ + + \hline + \end{tabular} + \caption{Option Value Types (\code{SANE\_Value\_Type})} + \label{tab:valuetype} + \end{center} +\end{table} + +\subsubsection{Option Value Unit} + +Member \code{unit} specifies what the physical unit of the option +value is. The possible values for type \code{\defn{SANE\_U\-nit}} are +described in Table \ref{tab:units}. Note that the specified unit is +what the SANE backend expects. It is entirely up to a frontend as to +how these units a presented to the user. For example, SANE expresses +all lengths in millimeters. A frontend is generally expected to +provide appropriate conversion routines so that a user can express +quantities in a customary unit (e.g., inches or centimeters). + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|l|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\ +\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\ +\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\ +\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\ +\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\ +\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\ +\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\ + +\hline + \end{tabular} + \caption{Physical Units (\code{SANE\_Unit})} + \label{tab:units} + \end{center} +\end{table} + +\subsubsection{Option Value Size}\label{sec:valuesize} + +Member \code{size} specifies the size of the option value (in bytes). +This member has a slightly different interpretation depending on the +type of the option value: +\begin{quote} + \begin{description} + \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of + the string. For the purpose of string size calcuations, the + terminating \code{NUL} character is considered to be part of the + string. Note that the terminating \code{NUL} character must + always be present in string option values. + \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size + must be a positive integer multiple of the size of a + \verb|SANE_Word|. The option value is a vector of length + \[ \code{size}/\code{sizeof(SANE\_Word)}. \] + \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to + \code{sizeof(SANE\_Word)}. + \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The + option size is ignored. + \end{description} +\end{quote} + +\subsubsection{Option Capabilities} + +Member \code{cap} describes what capabilities the option posseses. +This is a bitset that is formed as the inclusive logical OR of the +capabilities described in Table \ref{tab:capabilities}. The SANE API +provides the following to macros to test certain features of a given +capability bitset: +\begin{quote} + \begin{description} + + \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro + returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is currently active. + + \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This + macro returns \code{SANE\_TRUE} if and only if the option with the + capability set \var{cap} is software settable. + \end{description} +\end{quote} + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.59\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{c|}{\bf Code} & +\multicolumn{1}{c|}{\bf Description} \\ +\hline\hline + +\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option + value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\ + +\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by + user-intervention (e.g., by flipping a switch). The user-interface + should prompt the user to execute the appropriate action to set such + an option. This capability is mutually exclusive with + SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both + simultaneously). \\ + +\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option + value can be detected by software. If + \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/} + be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability + may or may not be set. If this capability is set but neither + \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT} + are, then there is no way to control the option. That is, the + option provides read-out of the current value only. \\ + +\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates + that an option is not directly supported by the device and is + instead emulated in the backend. A sophisticated frontend may + elect to use its own (presumably better) emulation in lieu of an emulated + option. \\ + +\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates + that the backend (or the device) is capable to picking a reasonable + option value automatically. For such options, it is possible to + select automatic operation by calling \code{sane\_control\_option()} + with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\ + +\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates + that the option is not currently active (e.g., because it's + meaningful only if another option is set to some other value). \\ + +\code{\defn{SANE\_CAP\_ADVANCED}} & 64 & + If set, this capability indicates that the option should be + considered an ``advanced user option''. +\begin{changebar} + If this capability is set for an option of type + \code{SANE\_TYPE\_GROUP}, all options belonging to the group are also + advanced, even if they don't set the capabilty themselves. +\end{changebar} + A frontend typically + displays such options in a less conspicuous way than regular options + (e.g., a command line interface may list such options last or a + graphical interface may make them available in a seperate ``advanced + settings'' dialog). + \\ + +\code{\defn{SANE\_CAP\_HIDDEN}} & 128 & +\begin{changebar} + If set, this capability indicates that the option shouldn't be + displayed to and used by the user directly. Instead a hidden option + is supposed to be automatically used by the frontend, like e.g. the + ``preview'' option. + If this capability is set for an option of type + \code{SANE\_TYPE\_GROUP}, all options belonging to the group are also + hidden, even if they don't set the capabilty themselves. + A frontend typically doesn't display such options by default but there + should be a way to override this default behaviour. +\end{changebar} + \\ + +\code{\defn{SANE\_CAP\_ALWAYS\_SETTABLE}} & 256 & +\begin{changebar} + If set, this capability indicates that the option may be at any time between + \code{sane\_open()} and \code{sane\_close()}. I.e. it's allowed to set it + even while an image is acquired. +\end{changebar} +\\ + +\hline + \end{tabular} + \caption{Option Capabilities} + \label{tab:capabilities} + \end{center} +\end{table} + +\subsubsection{Option Value Constraints} + +It is often useful to constrain the values that an option can take. +For example, constraints can be used by a frontend to determine how to +represent a given option. Member \code{constraint\_type} indicates +what constraint is in effect for the option. The constrained values +that are allowed for the option are described by one of the union +members of member \code{constraint}. The possible values of type +\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the +\code{constraint} union is described in Table~\ref{tab:constraints}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained. + The option can take any of the values possible for the option's + type. \\ + + \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is + applicable to integer and fixed-point valued options only. It + constrains the option value to a possibly quantized range of + numbers. Option descriptor member \code{constraint.range} points to + a range of the type \code{\defn{SANE\_Range}}. This type is illustrated + below: + \begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Word min; + SANE_Word max; + SANE_Word quant; + } +SANE_Range; +\end{verbatim} + \end{quote} + All three members in this structure are interpreted according to the + option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). + Members \code{min} and \code{max} specify the minimum and maximum + values, respectively. If member \code{quant} is non-zero, it + specifies the quantization value. If $l$ is the minimum value, $u$ + the maximum value and $q$ the (non-zero) quantization of a range, + then the legal values are $v=k\cdot q+l$ for all non-negative + integer values of $k$ such that $v<=u$. \\ + +\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable + to integer and fixed-point valued options only. It constrains the + option value to a list of numeric values. Option descriptor member + \code{constraint.word\_list} points to a list of words that + enumerates the legal values. The first element in that list is an + integer (\verb|SANE_Int|) that specifies the length of the list (not + counting the length itself). The remaining elements in the list are + interpreted according to the type of the option value + (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\ + +\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is + applicable to string-valued options only. It constrains the option + value to a list of strings. The option descriptor member + \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated + list of strings that enumerate the legal values for the option + value. +\\\hline + \end{tabular} + \caption{Option Value Constraints} + \label{tab:constraints} + \end{center} +\end{table} + + +\subsection{Internationalization}\label{sec:i18n} +\begin{changebar} +All backend texts should be written in english. +Localization (translation of backend texts) has to be done +in the frontend. To automatically prepare translation tables +(e.g. english to german) it is necessary to mark the texts +that shall be translated. + +\subsubsection{How is a text marked for translation} + +The keyword \code{SANE\_I18N} is used to mark a text for translation. +\code{SANE\_I18N} has to be defined as a dummy prototype: + + \begin{quote} +\begin{verbatim} +#ifndef SANE_I18N +# define SANE_I18N(text) text +#endif +\end{verbatim} + \end{quote} + +You should not mark prototypes or variables with \code{SANE\_I18N} +because it is not possible (or very hard) to find out the +texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and +variables (\verb|SANE_I18N(option[7].name)|). + +A correct marked text can look like this:\\ +\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\ +or\\ +\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\ +It also is allowed to mark texts in structs because the +prototype \code{SANE\_I18N} has no effect to the compiler. + +\subsubsection{Which texts shall be marked for translation?} +All option texts that are visible for the user should be marked for +translation. This is: +\begin{itemize} +\item +member \code{title} +\item +member \code{desc} +\item +member \code{string\_list} +\end{itemize} +of \code{SANE\_Option\_Descriptor}. + +It is not allowed to mark/translate member \code{name}. +Please also do not mark any error or debug messages that are +displayed by the backend. + +\subsubsection{File formats and translation functions} +The recommended file formats for translation tables are the \code{po} files +and \code{mo} or \code{gmo} files. +The po file contains the original text marked with the keyword \code{msgid} +and the translated text marked with the keyword \code{msgstr}. +A \code{po} file that contains all needed \code{msgid}s can be created +e.g. by the gnu gettext tool \verb|xgettext| with the option +\verb|-k SANE_I18N|. +The translator adds the translated texts to the \code{po} files. +The gettext tool \code{msgfmt} converts the \code{po} files to the +\code{mo} or \code{gmo} files.\\ + +Translation is done in the frontend. A backend has nothing +to do with the translation of texts. +The frontend should use the function \code{gettext} +to translate the texts. This e.g. can look like this:\\ +\verb|snprintf(buf, sizeof(buf), gettext("english text"));| + +If a frontend author decides to use translation functions that +need different translation tables, then the frontend is +responsible to create/convert the translation tables. +In this case it should use the \code{po} files to create its +own translation tables from it.\\ + +Note that it is strongly recommended to use the gettext tools. +\end{changebar} + + +\section{Operations} + +\subsection{\code{sane\_init}} + +This function must be called before any other SANE function can be called. +The behavior of a SANE backend is undefined if this function is not called +first or if the status code returned by \code{sane\_init} is different from +\code{\defn{SANE\_STATUS\_GOOD}}. The version code of the backend is returned +in the value pointed to by \code{version\_code}. If that pointer is +\code{NULL}, no version code is returned. Argument \code{authorize} is either +a pointer to a function that is invoked when the backend requires +authentication for a specific resource or \code{NULL} if the frontend does not +support authentication. +\begin{quote}\index{sane\_init} +\begin{verbatim} +SANE_Status sane_init (SANE_Int * version_code, + SANE_Authorization_Callback authorize); +\end{verbatim} +\end{quote} + +The authorization function may be called by a backend in response to +any of the following calls: +\begin{quote} + \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start} +\end{quote} +If a backend was initialized without authorization function, then +authorization requests that cannot be handled by the backend itself +will fail automatically and the user may be prevented from accessing +protected resources. Backends are encouraged to implement means of +authentication that do not require user assistance. E.g., on a +multi-user system that authenticates users through a login process a +backend could automatically lookup the apporpriate password based on +resource- and user-name. + +The authentication function type has the following declaration: +\begin{quote}\index{SANE\_Authorization\_Callback} + \index{domain}\index{username}\index{password} +\begin{verbatim} +#define SANE_MAX_USERNAME_LEN 128 +#define SANE_MAX_PASSWORD_LEN 128 + +typedef void (*SANE_Authorization_Callback) + (SANE_String_Const resource, + SANE_Char username[SANE_MAX_USERNAME_LEN], + SANE_Char password[SANE_MAX_PASSWORD_LEN]); +\end{verbatim} +\end{quote} +Three arguments are passed to the authorization function: +\code{resource} is a string specifying the name of the resource that +requires authorization. A frontend should use this string to build a +user-prompt requesting a username and a password. The \code{username} +and \code{password} arguments are (pointers to) an array of +\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN} +characters, respectively. The authorization call should place the +entered username and password in these arrays. The returned strings +{\em must\/} be ASCII-NUL terminated. + +\subsection{\code{sane\_exit}} + +This function must be called to terminate use of a backend. The +function will first close all device handles that still might be open +(it is recommended to close device handles explicitly through a call +to \code{sane\_clo\-se()}, but backends are required to release all +resources upon a call to this function). After this function returns, +no function other than \code{sane\_init()} may be called (regardless +of the status value returned by \code{sane\_exit()}. Neglecting to +call this function may result in some resources not being released +properly. +\begin{quote}\index{sane\_exit} +\begin{verbatim} +void sane_exit (void); +\end{verbatim} +\end{quote} + + +\subsection{\code{sane\_get\_devices}} + +This function can be used to query the list of devices that are +available. If the function executes successfully, it stores a pointer +to a \code{NULL} terminated array of pointers to \verb|SANE_Device| +structures in \code{*device\_list}. The returned list is guaranteed +to remain unchanged and valid until (a) another call to this function +is performed or (b) a call to \code{sane\_exit()} is performed. This +function can be called repeatedly to detect when new devices become +available. If argument \code{local\_only} is true, only local devices +are returned (devices directly attached to the machine that SANE is +running on). If it is false, the device list includes all remote +devices that are accessible to the SANE library. +\begin{quote}\index{sane\_get\_devices} +\begin{verbatim} +SANE_Status sane_get_devices (const SANE_Device *** device_list, + SANE_Bool local_only); +\end{verbatim} +\end{quote} + +This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an +insufficient amount of memory is available. + +\begin{quote} + \begin{center} + {\bf Backend Implementation Note} + \end{center} + SANE does not require that this function is called before a + \code{sane\_open()} call is performed. A device name may be + specified explicitly by a user which would make it unnecessary and + undesirable to call this function first. +\begin{changebar} + The same information about + a device has to be returned when \code{sane\_open} is called. +\end{changebar} +\end{quote} + + +\subsection{\code{sane\_open}} + +This function is used to establish a connection to a particular +device. The name of the device to be opened is passed in argument +\code{name}. If the call completes successfully, a handle for the +device is returned in \code{*h}. +\begin{changebar} +The description of the device +is returned in \code{**device\_description}. This is the +same description that is returned in the list by \code{sane\_get\_devices}. +The returned data \code{*h} and \code{*device\_description} is guaranteed +to remain unchanged and valid until a call to \code{sane\_close()} +is performed. +\end{changebar} +As a special case, specifying a zero-length string as the device requests +opening the first available device (if there is such a device). +\begin{quote}\index{sane\_open} +\begin{verbatim} +SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h, +const SANE_Device ** device_description); +\end{verbatim} +\end{quote} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently + busy (in use by somebody else). +\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_close}} + +This function terminates the association between the device handle +passed in argument \code{h} and the device it represents. If the +device is presently active, a call to \code{sane\_cancel()} is +performed first. After this function returns, handle \code{h} must +not be used anymore. + +\begin{quote}\index{sane\_close} +\begin{verbatim} +void sane_close (SANE_Handle h); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_get\_option\_descriptor}} + +This function is used to access option descriptors. The function +returns the option descriptor for option number \code{n} of the device +represented by handle \code{h}. Option number 0 is guaranteed to be a +valid option. Its value is an integer that specifies the number of +options that are available for device handle \code{h} (the count +includes option 0). If $n$ is not a valid option index, the function +returns \code{NULL}. The returned option descriptor is guaranteed to +remain valid (and at the returned address) until the device is closed. + +\begin{quote}\index{sane\_get\_option\_descriptor} +\begin{verbatim} +const SANE_Option_Descriptor * + sane_get_option_descriptor (SANE_Handle h, SANE_Int n); +\end{verbatim} +\end{quote} + +\subsection{\code{sane\_control\_option}}\label{sec:control} + +This function is used to set or inquire the current value of option +number \code{n} of the device represented by handle \code{h}. The +manner in which the option is controlled is specified by parameter +\code{a}. The possible values of this parameter are described in more +detail below. The value of the option is passed through argument +\code{v}. It is a pointer to the memory that holds the option value. +The memory area pointed to by \code{v} must be big enough to hold the +entire option value (determined by member \code{size} in the +corresponding option descriptor). The only exception to this rule is +that when setting the value of a string option, the string pointed to +by argument \code{v} may be shorter since the backend will stop +reading the option value upon encountering the first \code{NUL} +terminator in the string. If argument \code{i} is not \code{NULL}, +the value of \code{*i} will be set to provide details on how well the +request has been met. The meaning of this argument is described in +more detail below. +\begin{quote}\index{sane\_control\_option} +\begin{verbatim} +SANE_Status sane_control_option (SANE_Handle h, SANE_Int n, + SANE_Action a, void *v, + SANE_Int * i); +\end{verbatim} +\end{quote} + +The way the option is affected by a call to this function is +controlled by parameter \code{a} which is a value of type +\code{\defn{SANE\_Action}}. The possible values and their meaning is +described in Table~\ref{tab:actions}. + +\begin{table}[h] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\ + +\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The + option value passed through argument \code{v} may be modified by the + backend if the value cannot be set exactly. \\ + +\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend + or device will automatically select an appropriate value. This mode + remains effective until overridden by an explicit set value request. + The value of parameter \code{v} is completely ignored in this case and + may be \code{NULL}. \\ + +\hline + \end{tabular} + \caption{Action Values (\code{SANE\_Action})} + \label{tab:actions} + \end{center} +\end{table} + +After setting a value via an action value of +\verb|SANE_ACTION_SET_VALUE|, additional information on how well the +request has been met is returned in \code{*i} (if \code{i} is +non-\code{NULL}). The returned value is a bitset that may contain any +combination of the values described in Table~\ref{tab:info}. +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|p{0.5\textwidth}|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when + setting an option value resulted in a value being selected that does + not exactly match the requested value. For example, if a scanner + can adjust the resolution in increments of 30dpi only, setting the + resolution to 307dpi may result in an actual setting of 300dpi. + When this happens, the bitset returned in \code{*i} has this member + set. In addition, the option value is modified to reflect the + actual (rounded) value that was used by the backend. Note that + inexact values are admissible for strings as well. A backend may + choose to ``round'' a string to the closest matching legal string + for a constrained string value. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & +The setting of an option may affect the +\begin{changebar} + value, the availability, or the constraint of one or more {\em + other\/} options. +\end{changebar} + When this happens, the SANE backend sets this + member in \code{*i} to indicate that the application should reload + all options. This member may be set if and only if at least one + option changed. \\ + +\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & +The setting of an option may affect the parameter values (see +\code{sane\_get\_parameters()}). +If setting an option affects the parameter values, this member will +be set in \code{*i}. Note that this member may be set even if the +parameters did not actually change. However, it is guaranteed that +the parameters never change without this member being set. +\\ + +\code{\defn{SANE\_INFO\_INVALIDATE\_PREVIEW}} & 8 & +The setting of an option may affect the validity of the preview that +was acquired by the frontend earlier. When the preview image would change +significantly if it was scanned again, the SANE backend +sets this member in \code{*i} to indicate that the application should inform the +user of the invalidity of the preview. Examples for such option +settings may include setting a different scan source or significantly +changing the exposure. +\\ + + +\hline + \end{tabular} + \caption{Additional Information Returned When Setting an Option} + \label{tab:info} + \end{center} +\end{table} + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not + supported for the specified handle and option number. +\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while + communicating with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + + +\subsection{\code{sane\_get\_parameters}\label{sec:sanegetparameters}} + +This function is used to obtain the current scan parameters. The +returned parameters are guaranteed to be accurate between the time a +scan has been started (\code{sane\_start()} has been called) and the +completion of that request. Outside of that window, the returned +values are best-effort estimates of what the parameters will be when +\code{sane\_start()} gets invoked. Calling this function before a +scan has actually started allows, for example, to get an estimate of +how big the scanned image will be. The parameters passed to this +function are the handle \code{h} of the device for which the +parameters should be obtained and a pointer \code{p} to a parameter +structure. The parameter structure is described in more detail below. + +\begin{quote}\index{sane\_get\_parameters} +\begin{verbatim} +SANE_Status sane_get_parameters (SANE_Handle h, + SANE_Parameters * p); +\end{verbatim} +\end{quote} + +The scan parameters are returned in a structure of type +\code{\defn{SANE\_Parameters}}. The C declaration of this structure +is given below. +\begin{changebar} +\begin{quote} +\begin{verbatim} +typedef struct + { + SANE_Frame format; + SANE_Int flags; + SANE_Int lines; + SANE_Int depth; + SANE_Int pixels_per_line; + SANE_Int bytes_per_line; + SANE_Int channels_per_image; + SANE_String format_desc; + SANE_String proposed_filename; + SANE_String proposed_comment; + SANE_Int dpi_x; + SANE_Int dpi_y; + char reserved[32]; /* 32 bytes for future use */ + } +SANE_Parameters; +\end{verbatim} +\end{quote} +\end{changebar} + +\begin{changebar} +Member \code{format} specifies the format of the next frame to be +returned. The possible values for type \code{\defn{SANE\_Frame}} are +described in Table~\ref{tab:frameformat}. The meaning of these +values is described in more detail in section~\ref{sec:imageformat}. +The frame types used by version~1 of this standard +(\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}}, +\code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and +\code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by the +frame type \code{\defn{SANE\_FRAME\_RAW}}. + +\begin{table}[htbp] + \begin{center} + \leavevmode + \begin{tabular}{|l|r|l|} +\hline +\multicolumn{1}{|c|}{\bf Symbol} & +\multicolumn{1}{|c|}{\bf Code} & +\multicolumn{1}{|c|}{\bf Description} \\ + +\hline\hline + +\code{\defn{SANE\_FRAME\_RAW}} & 5 & Arbitrary pixel property transmission. \\ +\code{\defn{SANE\_FRAME\_MIME}} & 6 & Data described by a mime descriptor. \\ + +\hline + \end{tabular} + \caption{Frame Format (\code{SANE\_Frame})} + \label{tab:frameformat} + \end{center} +\end{table} + +The \code{flags} member is a 32 bit bitfield, for which up to now 4 +informational bits are defined, all unused bits have to be set to 0: + +\begin{itemize} + +\item +\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and +only if the frame that is currently being acquired (or the frame that +will be acquired next if there is no current frame) is the only frame +or the last frame +of a multi frame image (e.g., the current frame is the blue component +of a red, green, blue image). + +\item +\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate +further pending images. The frontend is expected to call \code{sane\_start} +again after the end of the current scan to get more images, e.g. +from an automatic document feeder. It is permissible to set that value to 1 ``in good +faith'', as it has to be determined at a very early time, where it might +not be detectable, if there actually are more images to transfer. E.g. +you will usually not know if the document feeder contains further pages +when starting to scan the current one. Thus you are allowed to set that +bit but later fail at \code{sane\_start()}. + +\item +\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate +that the current frame comes from a new physical page. This bit is of +informational character only to help frontends to group multi-image +scans. + +\item +\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tells if the current image +was acquired from the front (0) or backside (1) of the currently processed +sheet. It is of informational character and allows to group and order +multi-image transfers regardless of scanner acquisition order (front +first/back first). + +\end{itemize} + +Note, that \code{flags} is compatible to member \code{last\_frame} of +\code{SANE\_Parameters} of SANE standard version 1 (same size +and only bit 0 (bitvalue 1) was used with same function). +\end{changebar} + +Member \code{lines} specifies how many scan lines the frame is +comprised of. If this value is -1, the number of lines is not known a +priori and the frontend should call \code{sane\_read()} until it +returns a status of \code{SANE\_STATUS\_EOF}. +\begin{changebar} +Note, that even when transferring formats that have this information +inband, it is recommended to set that member, if available. If +unavailable or not applicable, set to -1 as mentioned above. +\end{changebar} + +Member \code{bytes\_per\_line} specifies the number of bytes that comprise one +scan line. +\begin{changebar} +If this value is not applicable for image data of type +\code{SANE\_FRAME\_MIME}, it must be set to -1. In this case the frontend +should just call \code{sane\_read} until \code{SANE\_STATUS\_EOF} is returned. +\end{changebar} + +Member \code{depth} specifies the number of bits per sample. +\begin{changebar} +Note, that only -1 (for not applicable), 1, and multiples of 8 are +allowed values. Data with other depths has to be scaled up accordingly. +Depth 1 is only allowed if the image consists of a single channel (lineart or +halftone modes). +\end{changebar} + +Member \code{pixels\_per\_line} specifies the number of pixels that +comprise one scan line. +\begin{changebar} +If unavailable or not applicable, set to -1. +\end{changebar} + +Assume $B$ is the number of channels in the frame, then the bit depth +$d$ (as given by member \code{depth}) and the number of pixels per +line $n$ (as given by this member \code{pixels\_per\_line}) are +related to $c$, the number of bytes per line (as given by member +\code{bytes\_per\_line}) as follows: +\begin{changebar} +\[ + c >= \left\{ + \begin{array}{ll} + \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\ + B\cdot n \cdot d / 8 & \mbox{if $d>1$} + \end{array} + \right. +\] +\end{changebar} +Note that the number of bytes per line can be larger than the minimum +value imposed by the right side of this equation. A frontend must be +able to properly cope with such ``padded'' image formats. + +\begin{changebar} +Member \code{channels\_per\_image} specifies the number of channels the +image consists of. When the image is transmitted in more than one frame +\code{channels\_per\_image} has to be the same for all frames for this image. + +Member \code{format\_desc} is used to describe the details of the frame +formats. Its meaning differs between the two formats: + +\begin{itemize} +\item +\code{SANE\_FRAME\_RAW}: +The \code{format\_desc} contains a description of the channel data and +an optional depth information separated by a colon(:). + +A plane is descibed by one channel, e.g. ``\code{gray}'' or ``\code{gray:12}''. + +Channel interleaved data is described by a comma separated list of channel descriptions, +for example ``\code{red,green,blue}'' or ``\code{red:8,green:8,blue:8}'', +the channel data is sent in the given order. + +The depth information does {\bf not} define the size of the transmitted +channel data, it is only an information for the frontend. The channel data has +to be sent in the size defined by member \code{depth}. + +Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}. +It also is allowed to use other channel descriptions, e.g. if you +use an infrared camera or scanner it could be \code{infrared} or +a wavelength description like \code{1100nm}, but be aware that a +frontend may not be able to display such channels with useful colors. + +Note that an image can be sent in single planes, in one interleaved +frame that contains all channels or in several frames that contain +one or more (interleaved) channels. When an RGB image is sent it +is prefered to send the image data in one interleaved frame +that consist of red, green and blue data in this order. +The number of channels is defined in member \code{channels\_per\_image}. + +\item +\code{SANE\_FRAME\_MIME}: + +\code{format\_desc} contains the MIME Content-Type: header field as described +in RFC 1521 (section 4) without the prefixing "Content-Type:". MIME Types and +subtypes should be either chosen from the RFC or from the list of +IANA-approved values. The data stream must be compliant with the corresponding +specification. + +When data is transmitted with the frame type \code{SANE\_FRAME\_MIME} +all data has to be transmitted within one frame, multiple frames +are not allowed (so the flag \code{last\_frame} has to be set +when using this frame type). + +A SANE backend must be able to at least optionally transmit +\code{SANE\_FRAME\_RAW} (possibly with the help of a meta backend), if the +hardware supports delivering image data at all. For data that doesn't +comprise images, it's admisable to only provide MIME frames. As a +general principle, if there are several choices in MIME types, the +format that is most widely implemented should be used. +\end{itemize} + +The member \code{proposed\_filename} can be used to suggest a reasonable +default filename or -extension in case the backend can make such a +suggestion, like e.g. an image database. +If no such suggestion is intended, set the field to ``''. + +In the case of raw frames, \code{proposed\_filename} is expected to hold +the basename for the image, with the extension determined by the save function +of the frontend, as the frontend can fully understand the data and is thus +able to encode it in any format it wishes. + +For MIME frames \code{proposed\_filename} can contain either: + +\begin{itemize} +\item +A name with a leading dot, which is considered to be a proposed +filename extension. This could also be gotten from the mime database, +but for systems lacking it, this might be convenient. Or: + +\item +A complete filename, including extension. +\end{itemize} + +Note, that for frontends that are able to parse a given MIME type +internally, it is perfectly permissible to ignore the extension +part of the proposed filename and only make use of the basename, +when using internal save algorithms for different formats. + +The string \code{proposed\_comment} can be used to transmit additional +image information, that can be stored in the comment areas several file formats +offer. It can contain any textual information the backend wishes to +convey to the user, like date/time of exposure, enganged filters, +etc. Set to ``'' if unused. + +The members \code{dpi\_x} and \code{dpi\_y} encode the horizontal and vertical +resolution. Note, that multiple-image scans may have different resolutions of +each image. It is not permissible to change resolution between frames of the +same image. If not applicable, set to -1. + +The member \code{reserved} is an array of 32 bytes (char) to keep +the size of the struct unchanged when future extensions are done. +The backend has to set the reserved bytes to 0. +\end{changebar} + + +\subsection{\code{sane\_start}} + +This function initiates aquisition of an image from the device +represented by handle \code{h}. +\begin{quote}\index{sane\_start} +\begin{verbatim} +SANE_Status sane_start (SANE_Handle h); +\end{verbatim} +\end{quote} +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The + operation should be retried later. +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_INVAL}:] The scan cannot be started with the current + set of options. The frontend should reload the option descriptors, as if + \code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} had been returned from a call to + \code{sane\_control\_option()}, since the device's capabilities may have + changed. +\end{description} +\end{quote} + + +\subsection{\code{sane\_read}} + +This function is used to read image data from the device represented +by handle \code{h}. Argument \code{buf} is a pointer to a memory area +that is at least \code{maxlen} bytes long. The number of bytes +returned is stored in \code{*len}. A backend must set this to zero +when a status other than \code{SANE\_STA\-TUS\_GOOD} is returned). +When the call succeeds, the number of bytes returned can be anywhere in +the range from 0 to \code{maxlen} bytes. +\begin{quote}\index{sane\_read} +\begin{verbatim} +SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf, + SANE_Int maxlen, SANE_Int * len); +\end{verbatim} +\end{quote} +\begin{changebar} +For efficiency reasons, medium to large +block sizes (in the range of a few kilobytes) should be used. +Returning short reads is allowed to allow for small buffers +in the backend. +\end{changebar} +If this function is called when no data is available, one of two +things may happen, depending on the I/O mode that is in effect for +handle \code{h}. +\begin{enumerate} +\item If the device is in blocking I/O mode (the default mode), the + call blocks until at least one data byte is available (or until some + error occurs). + +\item If the device is in non-blocking I/O mode, the call returns + immediately with status \code{SANE\_STA\-TUS\_GOOD} and with + \code{*len} set to zero. +\end{enumerate} +The I/O mode of handle \code{h} can be set via a call to +\code{sane\_set\_io\_mode()}. + +This function may fail with one of the following status codes. +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through + a call to \code{sane\_cancel}. +\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the + current frame. +\begin{changebar} +If \code{sane\_read} sends back any image data it +is not allowed to return with \code{SANE\_STATUS\_EOF}. +\end{changebar} +\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed. +\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of + documents. +\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open. +\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating + with the device. +\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory + is available. +\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has + been denied due to insufficient or invalid authentication. +\end{description} +\end{quote} + + +\subsection{\code{sane\_cancel}} + +This function is used to immediately or as quickly as possible cancel +the currently pending operation of the device represented by handle +\code{h}. +\begin{quote}\index{sane\_cancel} +\begin{verbatim} +void sane_cancel (SANE_Handle h); +\end{verbatim} +\end{quote} +This function can be called at any time (as long as handle \code{h} is +a valid handle) but usually affects long-running operations only (such +as image is acquisition). It is safe to call this function +asynchronously (e.g., from within a signal handler). It is important +to note that completion of this operaton does {\em not\/} imply that +the currently pending operation has been cancelled. It only +guarantees that cancellation has been {\em initiated}. Cancellation +completes only when the cancelled call returns (typically with a +status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API +does not require any other operations to be re-entrant, this implies +that a frontend must {\em not\/} call any other operation until the +cancelled operation has returned. + + +\subsection{\code{sane\_set\_io\_mode}} + +This function is used to set the I/O mode of handle \code{h}. The I/O mode +can be either blocking or non-blocking. If argument \code{m} is +\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise it's set to +blocking mode. This function can be called only after a call to +\code{sane\_start()} has been performed. +\begin{quote}\index{sane\_set\_io\_mode} +\begin{verbatim} +SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m); +\end{verbatim} +\end{quote} +By default, newly opened handles operate in blocking mode. A backend +may elect not to support non-blocking I/O mode. In such a case the +status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking +I/O must be supported by all backends, so calling this function with +argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete +successfully. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support +the requested I/O mode. +\end{description} +\end{quote} + + +\subsection{\code{sane\_get\_select\_fd}} + +This function is used to obtain a (platform-specific) file-descriptor +for handle \code{h} that is readable if and only if image data is +available (i.e., when a call to \code{sane\_read()} will return at +least one byte of data). If the call completes successfully, the +select file-descriptor is returned in \code{*fd}. +\begin{quote}\index{sane\_get\_select\_fd} +\begin{verbatim} +SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd); +\end{verbatim} +\end{quote} +This function can be called only after a call to \code{sane\_start()} +has been performed and the returned file-descriptor is guaranteed to +remain valid for the duration of the current image acquisition (i.e., +until \code{sane\_cancel()} or \code{sane\_start()} get called again +or until \code{sane\_read()} returns with status +\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to +close the returned select file descriptor at the point when the next +\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}. +This is necessary to ensure the application can detect when this +condition occurs without actually having to call \code{sane\_read()}. + +A backend may elect not to support this operation. In such a case, +the function returns with status code +\code{SANE\_STATUS\_UNSUPPORTED}. + +Note that the only operation supported by the returned file-descriptor +is a host operating-system dependent test whether the file-descriptor +is readable (e.g., this test can be implemented using \code{select()} +or \code{poll()} under UNIX). If any other operation is performed on +the file descriptor, the behavior of the backend becomes +unpredictable. Once the file-descriptor signals ``readable'' status, +it will remain in that state until a call to \code{sane\_read()} is +performed. Since many input devices are very slow, support for this +operation is strongly encouraged as it permits an application to do +other work while image acquisition is in progress. + +This function may fail with one of the following status codes: +\begin{quote} +\begin{description} +\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending. +\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support + this operation. +\end{description} +\end{quote} + + +\subsection{\code{sane\_strstatus}} + +This function can be used to translate a SANE status code into a +printable string. The returned string is a single line of text that +forms a complete sentence, but without the trailing period +(full-stop). The function is guaranteed to never return \code{NULL}. +The returned pointer is valid at least until the next call to this +function is performed. +\begin{quote}\index{sane\_strstatus} +\begin{verbatim} +SANE_String_Const sane_strstatus (SANE_Status status); +\end{verbatim} +\end{quote} + +\section{Code Flow}\index{code flow} + +The code flow for the SANE API is illustrated in +Figure~\ref{fig:flow}. Functions \code{sane\_init()} and +\code{sane\_exit()} initialize and exit the backend, respectively. +All other calls must be performed after initialization and before +exiting the backend. + +\begin{figure}[htb] + \begin{center} + \leavevmode + \psfig{file=figs/flow.eps,height=0.5\textheight} + \caption{Code flow} + \label{fig:flow} + \end{center} +\end{figure} + +Function \code{sane\_get\_devices()} can be called any time after +\code{sane\_init()} has been called. It returns the list of the +devices that are known at the time of the call. This list may change +over time since some devices may be turned on or off or a remote host +may boot or shutdown between different calls. It should be noted that +this operation may be relatively slow since it requires contacting all +configured devices (some of which may be on remote hosts). A frontend +may therefore want to provide the ability for a user to directly +select a desired device without requiring a call to this function. + +Once a device has been chosen, it is opened using a call to +\code{sane\_open()}. Multiple devices can be open at any given time. +A SANE backend must not impose artificial constraints on how many +devices can be open at any given time. + +An opened device can be setup through the corresponding device handle +using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and +\code{sane\_control\_option()}. While setting up a device, obtaining +option descriptors and setting and reading of option values can be +mixed freely. It is typical for a frontend to read out all available +options at the beginning and then build a dialog (either graphical or +a command-line oriented option list) that allows to control the +available options. It should be noted that the number of options is +fixed for a given handle. +\begin{changebar} + However, as options are set, other options may become active or inactive or + their constraint may change. Thus, after setting an option, it may be + necessary to re-read the descriptors. +\end{changebar} +While +setting up the device, it is also admissible to call +\code{sane\_get\_parameters()} to get an estimate of what the image +parameters will look like once image acquisition begins. + +The device handle can be put in blocking or non-blocking mode by a +call to \code{sane\_set\_io\_mode()}. Devices are required to support +blocking mode (which is the default mode), but support for +non-blocking I/O is strongly encouraged for operating systems such as +UNIX. + +After the device is setup properly, image acquisition can be started +by a call to \code{sane\_start()}. The backend calculates the exact +image parameters at this point. So future calls to +\code{sane\_get\_parameters()} will return the exact values, rather +than estimates. Whether the physical image acquisition starts at this +point or during the first call to \code{sane\_read()} is unspecified +by the SANE API. If non-blocking I/O and/or a select-style interface +is desired, the frontend may attempt to call +\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at +this point. Either of these functions may fail if the backend does +not support the requested operation. + +\begin{changebar} +Image data is collected by repeatedly calling \code{sane\_read()} +until this function will return an end-of-file status +(\code{SANE\_STATUS\_EOF}). This indicates the end of the current +frame. If the frontend expects additional frames (e.g., the +individual channels of a red/green/blue image or multiple images), +it can call \code{sane\_start()} again. +If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the +current image is complete. In this case, it should be tested, if +\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set. +If yes, further calls to \code{sane\_start()} can be made to acquire +more images. Please note, that as this bit has to be set at the beginning +of a the transmission of the last frame before the new image, it is possible, +that no reliable decision can be made at this time. It is thus permissible +for a backend to set this bit, and then later at the actual call to +\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}. +Such a sequence is permitted to transmit multiple images from a single +page as well as multiple pages. This behaviour should be controlled by +backend options as required, to allow single-page scanning as well as +ADF-batch-scanning. The frontend should always continue reading all images +until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on +and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other +than \code{SANE\_STATUS\_EOF} occurs in a SANE function. +Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend +to indicate the end of a multiple image scan. + +A frontend may choose to skip frames (e.g. because it cannot parse them), +which is accomplished by simply calling \code{sane\_start} again, which will get +you to the next frame, without having to read and discard the current one. + +In order to prematurely stop scanning and to reset the backend state, +\code{sane\_cancel()} can be called at any time. This call is required +as well after normal termination of a multiple image scan as described above. +\end{changebar} + +When done using the device, the handle should be closed by a call to +\code{sane\_close()}. Finally, before exiting the application, +function \code{sane\_exit()} must be called. It is important not to +forget to call this function since otherwise some resources (e.g., +temporary files or locks) may remain unclaimed. + +\begin{changebar} +The following C sample code implements a reference loop for acquiring +multiple images: + +\begin{verbatim} +SANE_Parameters parms; +SANE_Status status; + +do + { + do + { + /* Now start acquiring the next frame. */ + status = sane_start (handle); + + /* if that failed, we have a problem, and no more frames can be + * read at this time. Due to SANE_PFLAG_MORE_IMAGES still + * being clear, this will break out of _BOTH_ loops. + */ + if (status != SANE_STATUS_GOOD) + break; + + /* Now let us see what the next frame brings. */ + status = sane_get_parameters (handle, &parms); + + /* This actually should not fail, but maybe the doc feeder + * jammed or something, so we break as well, if something + * is wrong. + */ + if (status != SANE_STATUS_GOOD) + break; + + /* Now we check the announced parameters, if we can make use + * of the frame data. If not, we skip over to the next frame. + */ + if (do_i_like_that (&parms) == NO) + continue; + + /* Set up for reading the data here. Mangle filenames, + * allocate memory, rewind multiframe files, ask user + * for confirmation, ... + */ + setup_for_transfer (...); + + /* Now we read in the frame data and process it. This should + * return SANE_STATUS_GOOD, until the frame is complete, + * what causes SANE_STATUS_EOF to be returned. + */ + while (SANE_STATUS_GOOD == (status = sane_read (...))) + read_in_and_process_data_as_required (); + + /* If transfer was broken due to anything but EOF, break out. */ + if (status != SANE_STATUS_EOF) + break; + + /* Now loop until we have all frames of an image. */ + } + while (!(parms.flag & SANE_PFLAG_LAST_FRAME)); + + /* O.K. - we now have a complete image. Fit it together, save it, + * flush buffers, transmit it, increment filenames, etc. + */ + + /* Now check for more pending images. If we have more, redo from start. + * Some backends might cheat here and send us for an extra round which + * will fail at sane_start, as they were not able to determine if they + * would have more data at the start of the last frame we read. + */ + } +while (parms.flags & SANE_PFLAG_MORE_IMAGES); + +/* No more data. Fine. Reset the backend and go back to option-control + * loop. + */ + +sane_cancel (handle); +\end{verbatim} + +\end{changebar} + + +\section{Well-Known Options}\index{well-known options} + +While most backend options are completely self-describing, there are +cases where a user interface might want to special-case the handling +of certain options. For example, the scan area is typically defined +by four options that specify the top-left and bottom-right corners of +the area. With a graphical user interface, it would be tedious to +force the user to type in these four numbers. Instead, most such +interfaces will want to present to the user a preview (low-resolution +scan of the full scanner surface or a high(er) resolution scan of a subpart +of the scanner surface) and let the user pick the scan area by +dragging a rectangle into the desired position. For this reason, the +SANE API specifies a small number of option names that have +well-defined meanings. + +\subsection{Option Number Count}\index{option count} + +Option number 0 has an empty string as its name. The value of this +option is of type \code{SANE\_TYPE\_INT} and it specifies the total +number of options available for a given device (the count includes +option number 0). This means that there are two ways of counting the +number of options available: a frontend can either cycle through all +option numbers starting at one until +\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a +frontend can directly read out the value of option number 0. + +\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option} + +Option \code{resolution} is used to select the resolution at which an +image should be acquired. +\begin{changebar} +When the backend wants to allow different +values for x- and y-resolution it has to define the options +\code{x-resolution} and \code{y-resolution}. Note that only +the option \code{resolution} {\bf or} the options +\code{x-resolution} {\bf and} \code{y-resolution} may be active at the +same time. +\end{changebar} + +The type of this option is either \code{SANE\_TYPE\_INT} or +\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch). + +These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. + +\subsection{Preview Mode Option}\index{preview mode} + +The boolean option \code{preview} is used by a frontend to inform the +backend when image acquisition should be optimized for speed, rather +than quality (``preview mode''). When set to \code{SANE\_TRUE}, +preview mode is in effect, when set to \code{SANE\_FALSE} image +acquisition should proceed in normal quality mode. The setting of +this option \emph{must not\/} affect any other option. That is, as +far as the other options are concerned, the preview mode is completely +side effect free. A backend can assume that the frontend will take +care of appropriately setting the scan resolution for preview mode +(through option \code{resolution}). A backend is free to override the +\code{resolution} value with its own choice for preview mode, but it +is advised to leave this choice to the frontend wherever possible. +\begin{changebar} +When the \code{preview} option is set the backend should transfer +the image in frame type \code{SANE\_FRAME\_RAW} if possible. +\end{changebar} + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. + +\subsection{Scan Area Options\label{subsec:scanarea}}\index{scan area options} + +The four most important well-known options are the ones that define +the scan area. The scan area is defined by two points (x/y coordinate +pairs) that specify the top-left and the bottom-right corners. This +is illustrated in Figure~\ref{fig:area}. Note that the origin of the +coordinate system is at the top-left corner of the scan surface as +seen by the sensor (which typically is a mirror image of the scan +surface seen by the user). For this reason, the top-left corner is +the corner for which the abscissa and ordinate values are +simultaneously the {\em smallest} and the bottom-right corner is the +corner for which the abscissa and ordinate values are simulatenously +the {\em largest}. If this coordinate system is not natural for a +given device, it is the job of the backend to perform the necessary +conversions. +\begin{figure}[tbp] + \begin{center} + \leavevmode + \psfig{file=figs/area.eps,height=0.3\textheight} + \caption{Scan area options} + \label{fig:area} + \end{center} +\end{figure} + +The names of the four options that define the scan area are given in +the table below: +\begin{center} +\begin{tabular}{ll} +{\bf Name} & {\bf Description} \\ +\code{\defn{tl-x}} & Top-left $x$ coordinate value \\ +\code{\defn{tl-y}} & Top-left $y$ coordinate value \\ +\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\ +\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\ +\end{tabular} +\end{center} +There are several rules that should be followed by front and backends +regarding these options: +\begin{itemize} + +\item Backends must attach a unit of either pixels + (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to + these options. The unit of all four options must be identical. + +\item Whenever meaningful, a backend should attach a range or a + word-list constraint to these options. + +\item A frontend can determine the size of the scan surface by first + checking that the options have range constraints associated. If a + range or word-list constraints exist, the frontend can take the + minimum and maximum values of one of the x and y option + range-constraints to determine the scan surface size. + +\item A frontend must work properly with any or all of these options + missing. + +\begin{changebar} +\item A frontend may temporarily set the values in a way that +\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than +\code{br-y}. +\end{changebar} + +\end{itemize} + +\begin{changebar} +These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Depth Option}\index{bit depth option} +Option \code{depth} is used to select the image depth in bits/sample +in multi bit mode (e.g. for 24 bit RGB mode this value must be 8). +The type of this option is \code{SANE\_TYPE\_INT}. +The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes +(Lineart or Halftone) this option has to be inactive. +For selection of 1 bit modes (Lineart or Halftone) the +backend should use the well-known option \code{mode}. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Scan Mode Options}\index{mode options} +The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +It is used to select the scanmode (e.g. Color or Gray). +Well known modes are: \code{Color}, \code{Gray}, \code{Halftone} +and \code{Lineart}. \code{Color} and \code{Gray} are multi bit +modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart} +are single bit modes. When well-known scan modes are used, +a frontend is able to automatically decide which mode is appropriate +for a specific task, e.g the mode \code{Gray} +for scanning a fax. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Scan Source Options}\index{source options} +The option \code{source} is used to select the scan source +(e.g. Automatic Document Feeder). +It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST} +of type \code{SANE\_TYPE\_STRING}. +Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and +\code{Automatic Document Feeder}. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Threshold Option}\index{threshold option} +The option \code{threshold} is used to define the threshold +for Lineart and maybe Halftone mode. In multi bit modes +this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It defines the minimum intensity to get a white point / full intensity. + +The backend has to scale the values in the following way: +A value of 0.0 means all pixels get white / full intensity. A value of 50.0 +means intensities brighter than medium gray get white / full intensity. A +value of 100.0 means all pixels get black. If the +scanner is not able to cover the full range the backend has to define a +reduced value range (e.g. 30\ldots70 percent). + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Gamma Table Options}\index{gamma table options} +The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE} +of the type \code{SANE\_TYPE\_INT} which represents the gamma correction +table for gray. In color mode the \code{gamma-table} may be used to set +a common gamma correction for red, green and blue. The options +\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table} +are used in color mode to set a gamma correction for each color +separately. In color mode the backend is free to use only the +\code{gamma-table} option, only the \code{red-}, \code{green-} and +\code{blue-gamma-table} or all four options. When all four options +are used then the color tables should do a gamma correction with +the same input and output bit depth and the gray gamma table should +reduce (if necessary) the bit depth from the scanner internal +bit depth to the output bit depth. This should e.g. look like this: +\begin{verbatim} +red_value = gamma-table(red-gamma-table(value)) +green_value = gamma-table(green-gamma-table(value)) +blue_value = gamma-table(blue-gamma-table(value)) +\end{verbatim} + +The backend should not use the gamma tables to emulate other functions or options +like highlight, shadow, contrast, brightness, threshold, analog\_gamma. +These functions are common for all backends and should be added to the frontend +or a meta-backend. + +It is also discouraged to emulate gamma tables in the backend. The backend +should disable (or not define) this option when the scanner does not support +gamma tables in hardware. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + +\begin{changebar} +\subsection{Analog Gamma}\index{analog gamma option} +The option \code{analog-gamma} is used to define the gamma value +for an analog gamma function of the scanner in multi bit modes. +In 1 bit modes this option should be set inactive. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_NONE}. The value range +can be defined by the backend as supported. The values +have to be positive. A gamma value of 1.0 means that +the gamma correction has no effect. A value larger than +1.0 increases the brightness of the image. +In color mode there also can be options \code{analog-gamma-red}, +\code{analog-gamma-green} and \code{analog-gamma-blue}. +It is not allowed to emulate an analog gamma function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) gamma function. + +When analog gamma, highlight and shadow functions are available +at the same time then the backend author has to care about the order +in which the functions are implemented in the scanner hardware. +The SANE standard expects that changing the analog gamma value +has no effect on the shadow and highlight function. When the +analog gamma function is executed in the scanner hardware +before the shadow and highlight functions then the backend +should do a compensation. For this the shadow and highlight +values have to be gamma corrected with the relevant analog gamma value. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + + +\begin{changebar} +\subsection{Shadow Option}\index{shadow options} +The option \code{shadow} is used to define the shadow level / black point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the maximum intensity level that creates an image data value +of 0 (black). + +The backend has to scale the values in the following way: +A value of 0.0 means that the sensitivity range is not reduced, only the +minimum intensity produces an image data value of 0 (black). +A value of 50.0 means that that a medium intensity and everything that is darker +produces an image data value of 0 (black). +A value of 100.0 means the sensitivity range is reduced to 0, all image +data values are 0 (black). If the scanner is not able to +cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{shadow-red}, \code{shadow-green} +and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled. +It is not allowed to emulate a shadow function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) shadow function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + + +\begin{changebar} +\subsection{Highlight Option}\index{hightlight options} +The option \code{highlight} is used to define the highlight level / white point level. +The type of this option is \code{SANE\_TYPE\_FIXED}. +The unit is \code{SANE\_UNIT\_PERCENT}. The value range +should be 0.0\ldots100.0 if possible. +It is used to define the minimum intensity level that creates the maximum possible +image data value (white/full intensity). + +The backend has to scale the values in the following way: +A value of 0.0 means the sensitivity range is reduced to 0, all image +data have maximum value (white / full intensity). +A value of 50.0 means that a medium intensity and everything that is brighter +produces the maximum possible image data value (white / full intensity). +A value of 100.0 means that the sensitivity range is not reduced, only the +maximum intensity produces an image data with maximum possible value (white / full intensity). +If the scanner is not able to cover the full range the backend has to define a reduced +value range (e.g. 30\ldots70 percent). +In color mode there can be options \code{highlight-red}, \code{highlight-green} +and \code{highlight-blue}, in this case \code{highlight} has to be disabled. +It is not allowed to emulate a highlight function by +a digital gamma table. The backend has to disable (or not +define) this option when the scanner does not support an +analog (hardware) highlight function. + +This option is not mandatory, but if a backend does support it, it +must implement it in a manner consistent with the above definition. +\end{changebar} + + +\begin{changebar} +\subsection{Lamp Options}\index{lamp-on option}\index{lamp-off option} + +The options \code{lamp-on} and \code{lamp-off} are button options +(\code{SANE\_TYPE\_BUTTON}) and don't have a unit (\code{SANE\_UNIT\_NONE}). + +Option \code{lamp-on} is used to turn on the lamp of the scanner while +\code{lamp-off} turns it off. + +These options are not mandatory, but if a backend does support them, it +must implement them in a manner consistent with the above definition. +\end{changebar} + + +\begin{changebar} +\subsection{Scanner Button Options}\index{scanner button options} +Some scanners have buttons which state can be read by the scanner driver. +It is necessary to implement a locking function for the buttons +because it is possible that several frontends try to connect to the +same backend/scanner at the same time. Imagine what could happen +when no locking would be implemented: +Five people have started a scanning application which is connected +via network to the scanner you want to use. You start a frontend, +put a paper to the scanner and press the scan-button on the scanner. +The scanner does scan three times (because three frontends asked the +button status when you pressed the button). For three people the +image is saved to the harddisk, but it is not sure that your +frontend did scan the image. + +A backend that does make available the scanner-buttons has to +implement the following options:\\ +\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\ +\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\ +\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\ +When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS} +or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined. + +A frontend has to disable the usage of the scanner-buttons by default. This is important +because other frontends will not be able to use the buttons when the button-functions are locked. +Another important thing is that some scanners do not turn off their lamp when the driver +does frequently talk to the scanner (what is done when reading the button status from the scanner). + +\begin{itemize} + +\item +A frontend that wants to read the button status has to lock the +button functions at first. For this it does set the option +\code{scanner-buttons-lock} to \code{SANE\_TRUE}. +While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE} +the backend does check if a lockfile (e.g. ``backend''-buttons.lock) does exist. +The lockfile has to be placed in a directory where every user has read and write access to. + + \begin{itemize} + \item + If the lockfile does not exist then the backend creates the lockfile and writes the + process ID (PID) of the backend to the file. Button access is allowed: the value + of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \item + If the file does exist and the backend PID is not the file PID then the + backend has to check if the process with the PID stored in the lockfile + still is running. If yes then the button access is not allowed: the value of + option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile + is recreated and the PID of the backend is stored in the lockfile, button + access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE} + \end{itemize} + +\item +The frontend does read the value of option \code{scanner-buttons-lock}. If +it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons. +If it is \code{SANE\_FALSE} then access has been denied. + +\item +If the button access is allowed the frontend has to do the following about +once per second (while not scanning): + \begin{itemize} + \item + The frontend does set option \code{scanner-buttons-status-update}. + The backend checks if access to the buttons is allowed by comparing + the backend PID with the lockfile PID. If access is allowed it + does read the button status from the scanner and stores it in + the option \code{scanner-buttons-status}, each bit represents a button, a + value of 0 means the button is not pressed, a value of 1 means that the button + is pressed. When the scanner is busy the backend must not wait, it has to + return immediately and the button state keeps unchanged. + The backend has to implement a timeout function. When no button has been pressed + within a predefined time (e.g. 15 minutes) then the access permission is lost. + In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE} + and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has + lost permission to access the scanner-button functions. + If access is not allowed it does set the \code{scanner-buttons-status} to 0. + + \item + The frontend does read the value of option \code{scanner-buttons-status} + \end{itemize} + +\item +When the frontend does exit or it does not want to use the buttons +it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}. +The backend does check if the backend PID and the lockfile PID are +the same. If this is true then it removes the lockfile and sets the value +of \code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\code{sane\_close()} should do the same as setting option +\code{scanner-buttons-lock} to \code{SANE\_FALSE}. + +\end{itemize} +\end{changebar} + +\begin{changebar} +\subsection{Batch Scan Options}\index{Batch Scan Options} + +The batch scan options can be used by a frontend to indicate that more than +one image will be scanned in a batch. The backend can optimize for such scans +by e.g. avoiding calibration and not moving home the sensor array in this case. +The backend provides the options \code{batch-scan}, +\code{batch-scan-next-tl-x}, \code{batch-scan-next-tl-y}, +\code{batch-scan-next-br-x}, and \code{batch-scan-next-br-y}. The option +\code{batch-scan} provides a string list with the values of \code{No} if +batch scanning isn't used, \code{Start} for the first, \code{End} for the last +and \code{Loop} for any other (intermediate) image. The batch-scan-next +options specify the coordinates of the next scan and follow the same rules as +the scan area options (see section \ref{subsec:scanarea}). + +These options are not mandatory, but if a backend does support them, it must +implement them in a manner consistent with the above definition. In this +case, all options must be implemented. +\end{changebar} + + + + +\input{net.tex} + +\chapter{Contact Information}\label{chap:contact} + +The SANE standard is discussed and evolved via a mailing list. +Anybody with email access to the Internet can automatically join and +leave the discussion group by sending mail to the following address. +\begin{quote}\index{mailing list} +\begin{verbatim} +sane-devel-request@mostang.com +\end{verbatim} +\end{quote} +To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the +above address. + +A complete list of commands supported can be obtained by sending a +mail with a subject of ``\code{help}'' to the above address. The +mailing list is archived and available through the SANE home page at +URL: +\begin{quote} +\url{http://www.mostang.com/sane/} +\end{quote} + +\newpage +\input{sane.ind} + +\end{document} diff --git a/sane2/sane2-api-todo.txt b/sane2/sane2-api-todo.txt new file mode 100644 index 00000000..00811ebb --- /dev/null +++ b/sane2/sane2-api-todo.txt @@ -0,0 +1,205 @@ +Suggestions for changes for sane-api-2 (2002-12-24) + +(x = already included into sane2.tex) + + - SANE_FRAME_*: + +x - SANE_FRAME_RAW, formatdesc="red:8,green:8,blue:8", replaces old SANE_FRAME_* types + +x - SANE_FRAME_MIME, formatdesc=MIME-desciptor, only one frame/image, arbitary data + this allows transmission of e.g. jpeg, tiff and any other data format + +x - SANE_FRAME_GRAY/RGB/RED/GREEN/BLUE only allowed for sane-1 backends. + + - remove multi-frame paradigm at all? + + - remove multi-channel 1 Bit mode? + + - define 0 = black for all modes? + + + - parameter.flags + +x - compatible to sane-1 + +x - adds more_images, new_page, front/backside info, 28 more flags available + +x - dpi_x, dpi_y, proposed_filename, formatdesc, channels_per_image + +(x)- 32 bytes for future extension (set to 0) + Check how to do this without creating portability nightmares. + Keep in mind that the size of SANE_Int is unknown, same is true for + SANE_String and even char. + + - define the following well known options: + +x - BIT_DEPTH = Word_List with bits/sample + +x - GAMMA_VECTOR, and GAMMA_VECTOR_[RGB] + +x - RESOLUTION or (X_RESOLUTION and Y_RESOLUTION) + +x - scanmode COLOR, GRAY, LINEART (for frontend defaults, e.g. for fax => Gray) + +x - scansource FLATBED/DOCUMENTFEEDER/TRANSPARENCY + +x - ANALOG_GAMMA + +x - HIGHLIGHT + +x - SHADOW + +x - THRESHOLD + +x - LAMP_CONTROL + +x - Scanner button options and protocol + + - set focus position FOCUS_POS_X, FOCUS_POS_Y + + - multi pass for film scanners + - number of passes (either native or EMULATED) + SANE_TYPE_INT, word_list or range + + - direct selection of image number? + SANE_TYPE_INT + + - exposure time + +x - SANE_CAP_ADVANCED for a group + +x - SANE_CAP_ALWAYS_SETTABLE ??? (xcam/quickcam?) + +x - SANE_CAP_HIDDEN: Don't display option at all + + +x- add to SANE_Device + - email_backend_author (string) + - device_location (string) + - comment (string) + - reserved_string (string) + - version_code (integer) + - backend_capability_flags (integer) + - reserved_int (integer) + +(x)- define recommended file formats for internationalization + in sane_i18n definition files: + *.po, default translation tables: *.(g)mo + +x- sane_open does return sane_device: + A frontend may decide not to call sane_get_devices + because it already knows which device shall be + opened. In this case it does not get any information + about the device (vendor, model, ...). So it makes + sense to return the SANE_Device in sane_open + +!- saned or a stand alone "turn lamp off deamon" should get + an internal timer to turn off the lamp of some scanners. + This has to be defined closer. + May be it is necessary to find out how long a scanner + has not been used. For this saned needs a function + like sane_get_offline_time()... + +!- define a way how multiple scanareas can be handled + before the scanning is started: + Create well-known options to set the next tl-y + + - define error codes for sane_get_parameters + +x- define return value of sane_init - also necessary for SANE1 + +x- define bit order of 1 bit modes - also necessary for SANE1 + +!- implementation note for select_fd - also necessary for SANE1 + +!- all texts and translations: UTF-8 format + (this is used in KDE and gtk+-2.x) + may be UTF-8 should be forced as SANE_Char format. + +!- download backend translation and documentation: + The Download function does not care about the file + format, this propably also has to be defined in the sane standard. + - sane_download_backend_file(filename). The backend + has to load the file from a fixed directory. The path + to the directory has to contain the backend name, + e.g: /usr/local/share/sane/sane-umax/ + The frontend can not change the directory due to security!!! + +!- let backend display a frontend-info or -selection (ok/cancel) + dialog-box (e.g. "Calibration in progress: wait 10/9/8/... seconds") + this has to be done with a callback, eg.: + sane_frontend_dialog_display(**window, text, ok_text, cancel_text, backend_dialog_callback_function) + sane_frontend_dialog_close(window) + the frontend function has to be implemented in a way that the backend + can change the text. + A good place to define the callback functions could be sane_init, + where already the authorization_callback is defined. + +!- give backend the chance to tell the frontend while/after scan + that the options have changed (e.g. film scanner reduces + number of available images): + may be a flag (comparable to int *i in sane_control_option) + Maybe the frontend should reload the decriptors after a scan anyway? + +-- add sane_get_device_info function that allows the frontend + to ask for information about all involved backends and meta backends + that are used. + is this still needed with version_code in sane_device? + +-- sane_extended_call() and sane_extended_callback() ? + I don`t like this because it makes it too simple + to add proprietary functions that are not defined + in the sane standard + +(x)- define what parts in a option_descriptor may be changed after + it has been set up and passed to the frontend + Maybe add size to list of members that can be changed? + Move definition to sane_get_select_fd? + +?- add #define SANE_OPTION_IS_GETTABLE(cap) (((cap) & (SANE_CAP_SOFT_DETECT | SANE_CAP_INACTIVE)) == SANE_CAP_SOFT_DETECT) + +x- define endianess for SANE_FRAME_RAW + + - add a pointer "next" to the device handle to make linked lists instead of arrays(?) + + - when an option is set with sane_control_option that changes the image significantly + (e.g. exposure) invalidate the preview by setting SANE_INFO_INVALIDATE_PREVIEW + +x- fix sane_strstatus (remove const) + + - add SANE_String sane_verbose_error(Sane_Handle h), to show backend-specific + error messages. The error string always refers to the last error reported by the backend. + So the frontend would call this when a SANE API call returned with an error status. + E.g. out-of-memory in scanner hardware or "Couldn't open file foo". + Check for therad-safety problems. If the handle parameters is used, no errors can + be printed before sane_open has succeeded. + + - The network protocoll must be updated to reflect the changes to the SANE standard + - there were ideas to use UDP instead of TCP + - let the server define a port number for the data port to avoid firewall + problems? + - maybe it's possible to avoid the data port at all? + - add the numbers of the RPCs + - check if the callbacks are implemented according to the standard + + - How to name the SANE2 header? sane-2.h or sane2.h? + + - Split sane_cancel and add sane_end()? + +x- Update contact section + + - section with implementation notes (currently in backend-writing.txt). + + - Check grammar & spelling + + - check too long lines + + - check defective references + + - update index + + - Check that all headlines are in capital letters + +x- Changebar for sane_read + +x- check for correct quotation marks \ No newline at end of file