.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "SCANIMAGE-PERL 1p" .TH SCANIMAGE-PERL 1p "2017-02-12" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" scanimage \- scan an image .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBscanimage\fR \&\fB[ \-d | \-\-device\-name\fR \&\fIdev ]\fR \&\fB[ \-\-format\fR \&\fIformat ]\fR \&\fB[ \-i | \-\-icc\-profile\fR \&\fIprofile ]\fR \&\fB[ \-L | \-\-list\-devices ]\fR \&\fB[ \-f | \-\-formatted\-device\-list \fR \&\fIformat ]\fR \&\fB[ \-\-batch \fR \&\fI[= format ]]\fR \&\fB[ \-\-batch\-start\fR \&\fIstart ]\fR \&\fB[ \-\-batch\-count\fR \&\fIcount ]\fR \&\fB[ \-\-batch\-increment\fR \&\fIincrement ]\fR \&\fB[ \-\-batch\-double ]\fR \&\fB[ \-\-accept\-md5\-only ]\fR \&\fB[ \-p | \-\-progress ]\fR \&\fB[ \-n | \-\-dont\-scan ]\fR \&\fB[ \-T | \-\-test ]\fR \&\fB[ \-h | \-\-help ]\fR \&\fB[ \-v | \-\-verbose ]\fR \&\fB[ \-B | \-\-buffersize ]\fR \&\fB[ \-V | \-\-version ]\fR \&\fI[ device-specific-options ]\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBscanimage\fR is a command-line interface to control image acquisition devices such as flatbed scanners or cameras. The device is controlled via command-line options. After command-line processing, \&\fBscanimage\fR normally proceeds to acquire an image. The image data is written to standard output in one of the \s-1PNM \s0(portable aNyMaP) formats (\s-1PBM\s0 for black-and-white images, \s-1PGM\s0 for grayscale images, and \s-1PPM\s0 for color images) or in \s-1TIFF \s0(black-and-white, grayscale or color). \&\fBscanimage\fR accesses image acquisition devices through the \&\fB\s-1SANE\s0\fR (Scanner Access Now Easy) interface and can thus support any device for which there exists a \&\fB\s-1SANE\s0\fR backend (try \&\fBapropos\fR \&\fIsane\-\fR to get a list of available backends). .SH "EXAMPLES" .IX Header "EXAMPLES" To get a list of devices: .PP .Vb 1 \& scanimage \-L .Ve .PP To scan with default settings to the file image.pnm: .PP .Vb 1 \& scanimage >image.pnm .Ve .PP To scan 100x100 mm to the file image.tiff (\-x and \-y may not be available with all devices): .PP .Vb 1 \& scanimage \-x 100 \-y 100 \-\-format=tiff >image.tiff .Ve .PP To print all available options: .PP .Vb 1 \& scanimage \-h .Ve .SH "OPTIONS" .IX Header "OPTIONS" Parameters are separated by a blank from single-character options (e.g. \&\-d epson) and by a \*(L"=\*(R" from multi-character options (e.g. \-\-device\-name=epson). .PP The \&\fB\-d\fR or \&\fB\-\-device\-name\fR options must be followed by a \&\fB\s-1SANE\s0\fR device-name like \&\fI` epson:/dev/sg0 '\fR or \&\fI` hp:/dev/usbscanner0 '.\fR A (partial) list of available devices can be obtained with the \&\fB\-\-list\-devices\fR option (see below). If no device-name is specified explicitly, \&\fBscanimage\fR reads a device-name from the environment variable \&\fB\s-1SANE_DEFAULT_DEVICE .\s0\fR If this variable is not set, \&\fBscanimage\fR will attempt to open the first available device. .PP The \&\fB\-\-format \fR \&\fIformat\fR option selects how image data is written to standard output. \&\fIformat\fR can be \&\fBpnm\fR or \&\fBtiff.\fR If \&\fB\-\-format\fR is not used, \s-1PNM\s0 is written. .PP The \&\fB\-i\fR or \&\fB\-\-icc\-profile\fR option is used to include an \s-1ICC\s0 profile into a \s-1TIFF\s0 file. .PP The \&\fB\-L\fR or \&\fB\-\-list\-devices\fR option requests a (partial) list of devices that are available. The list is not complete since some devices may be available, but are not listed in any of the configuration files (which are typically stored in directory \fI/etc/sane.d ).\fR This is particularly the case when accessing scanners through the network. If a device is not listed in a configuration file, the only way to access it is by its full device name. You may need to consult your system administrator to find out the names of such devices. .PP The \&\fB\-f\fR or \&\fB\-\-formatted\-device\-list\fR option works similar to \&\fB\-\-list\-devices ,\fR but requires a format string. \&\fBscanimage\fR replaces the placeholders \&\fB\f(CB%d\fB \f(CB%v\fB \f(CB%m\fB \f(CB%t\fB \f(CB%i\fB\fR with the device name, vendor name, model name, scanner type and an index number respectively. The command .IP "\fBscanimage \-f\fR \fI\e*(lq scanner number \f(CI%i\fI device \f(CI%d\fI is a \f(CI%t\fI, model \f(CI%m\fI, produced by \f(CI%v\fI \e*(rq\fR" 4 .IX Item "scanimage -f *(lq scanner number %i device %d is a %t, model %m, produced by %v *(rq" .PP will produce something like: .IP "scanner number 0 device sharp:/dev/sg1 is a flatbed scanner, model \s-1JX250 SCSI,\s0 produced by \s-1SHARP\s0" 4 .IX Item "scanner number 0 device sharp:/dev/sg1 is a flatbed scanner, model JX250 SCSI, produced by SHARP" .PP The \&\fB\-\-batch*\fR options provide the features for scanning documents using document feeders. \&\fB\-\-batch\fR \&\fI[ format ]\fR is used to specify the format of the filename that each page will be written to. Each page is written out to a single file. If \&\fIformat\fR is not specified, the default of out%d.pnm (or out%d.tif for \-\-format tiff) will be used. \&\fIformat\fR is given as a printf style string with one integer parameter. \&\fB\-\-batch\-start\fR \&\fIstart\fR selects the page number to start naming files with. If this option is not given, the counter will start at 0. \&\fB\-\-batch\-count\fR \&\fIcount\fR specifies the number of pages to attempt to scan. If not given, scanimage will continue scanning until the scanner returns a state other than \s-1OK. \s0 Not all scanners with document feeders signal when the \&\s-1ADF\s0 is empty, use this command to work around them. With \&\fB\-\-batch\-increment\fR \&\fIincrement\fR you can change the amount that the number in the filename is incremented by. Generally this is used when you are scanning double-sided documents on a single-sided document feeder. A specific command is provided to aid this: \&\fB\-\-batch\-double\fR will automatically set the increment to 2. \&\fB\-\-batch\-prompt\fR will ask for pressing \s-1RETURN\s0 before scanning a page. This can be used for scanning multiple pages without an automatic document feeder. .PP The \&\fB\-\-accept\-md5\-only\fR option only accepts user authorization requests that support \s-1MD5\s0 security. The \&\fB\s-1SANE\s0\fR network daemon \&\fB( saned )\fR is capable of doing such requests. See \&\fBsaned (8).\fR .PP The \&\fB\-p\fR or \&\fB\-\-progress\fR option requests that \&\fBscanimage\fR prints a progress counter. It shows how much image data of the current image has already been received by \&\fBscanimage \fR (in percent). .PP The \&\fB\-n\fR or \&\fB\-\-dont\-scan\fR option requests that \&\fBscanimage\fR only sets the options provided by the user but doesn't actually perform a scan. This option can be used to e.g. turn off the scanner's lamp (if supported by the backend). .PP The \&\fB\-T\fR or \&\fB\-\-test\fR option requests that \&\fBscanimage\fR performs a few simple sanity tests to make sure the backend works as defined by the \&\fB\s-1SANE\s0\fR \&\s-1API \s0(in particular the \&\fBsane_read\fR function is exercised by this test). .PP The \&\fB\-h\fR or \&\fB\-\-help\fR options request help information. The information is printed on standard output and in this case, no attempt will be made to acquire an image. .PP The \&\fB\-v\fR or \&\fB\-\-verbose\fR options increase the verbosity of the operation of \&\fBscanimage.\fR The option may be specified repeatedly, each time increasing the verbosity level. .PP The \&\fB\-B\fR or \&\fB\-\-buffersize\fR option changes the input buffersize that \&\fBscanimage\fR uses from default 32*1024 to 1024*1024 kbytes. .PP The \&\fB\-V\fR or \&\fB\-\-version\fR option requests that \&\fBscanimage\fR prints the program and package name, the version number of the \&\fB\s-1SANE\s0\fR distribution that it came with and the version of the backend that it loads. Usually that's the dll backend. If more information about the version numbers of the backends are necessary, the \&\fB\s-1DEBUG\s0\fR variable for the dll backend can be used. Example: SANE_DEBUG_DLL=3 scanimage \&\-L. .PP As you might imagine, much of the power of \&\fBscanimage\fR comes from the fact that it can control any \&\fB\s-1SANE\s0\fR backend. Thus, the exact set of command-line options depends on the capabilities of the selected device. To see the options for a device named \&\fIdev ,\fR invoke \&\fBscanimage\fR via a command-line of the form: .IP "\fBscanimage \-\-help \-\-device\-name\fR \fIdev\fR" 4 .IX Item "scanimage --help --device-name dev" .PP The documentation for the device-specific options printed by \&\fB\-\-help\fR is best explained with a few examples: .PP .Vb 2 \& \-l 0..218mm [0] \& Top\-left x position of scan area. .Ve .IP "The description above shows that option \fB\-l\fR expects an option value in the range from 0 to 218 mm. The value in square brackets indicates that the current option value is 0 mm. Most backends provide similar geometry options for top-left y position (\-t), width (\-x) and height of scan-area (\-y)." 4 .IX Item "The description above shows that option -l expects an option value in the range from 0 to 218 mm. The value in square brackets indicates that the current option value is 0 mm. Most backends provide similar geometry options for top-left y position (-t), width (-x) and height of scan-area (-y)." .PP .Vb 2 \& \-\-brightness \-100..100% [0] \& Controls the brightness of the acquired image. .Ve .IP "The description above shows that option \fB\-\-brightness\fR expects an option value in the range from \-100 to 100 percent. The value in square brackets indicates that the current option value is 0 percent." 4 .IX Item "The description above shows that option --brightness expects an option value in the range from -100 to 100 percent. The value in square brackets indicates that the current option value is 0 percent." .PP .Vb 2 \& \-\-default\-enhancements \& Set default values for enhancement controls. .Ve .IP "The description above shows that option \fB\-\-default\-enhancements\fR has no option value. It should be thought of as having an immediate effect at the point of the command-line at which it appears. For example, since this option resets the \fB\-\-brightness\fR option, the option-pair \fB\-\-brightness 50 \-\-default\-enhancements\fR would effectively be a no-op." 4 .IX Item "The description above shows that option --default-enhancements has no option value. It should be thought of as having an immediate effect at the point of the command-line at which it appears. For example, since this option resets the --brightness option, the option-pair --brightness 50 --default-enhancements would effectively be a no-op." .PP .Vb 2 \& \-\-mode Lineart|Gray|Color [Gray] \& Selects the scan mode (e.g., lineart or color). .Ve .ie n .IP "The description above shows that option \fB\-\-mode\fR accepts an argument that must be one of the strings \fBLineart ,\fR \fBGray ,\fR or \fBColor .\fR The value in the square bracket indicates that the option is currently set to \fBGray .\fR For convenience, it is legal to abbreviate the string values as long as they remain unique. Also, the case of the spelling doesn't matter. For example, option setting \fB\-\-mode col\fR is identical to \fB""\-\-mode Color"" .\fR" 4 .el .IP "The description above shows that option \fB\-\-mode\fR accepts an argument that must be one of the strings \fBLineart ,\fR \fBGray ,\fR or \fBColor .\fR The value in the square bracket indicates that the option is currently set to \fBGray .\fR For convenience, it is legal to abbreviate the string values as long as they remain unique. Also, the case of the spelling doesn't matter. For example, option setting \fB\-\-mode col\fR is identical to \fB``\-\-mode Color'' .\fR" 4 .IX Item "The description above shows that option --mode accepts an argument that must be one of the strings Lineart , Gray , or Color . The value in the square bracket indicates that the option is currently set to Gray . For convenience, it is legal to abbreviate the string values as long as they remain unique. Also, the case of the spelling doesn't matter. For example, option setting --mode col is identical to --mode Color ." .PP .Vb 3 \& \-\-custom\-gamma[=(yes|no)] [inactive] \& Determines whether a builtin or a custom gamma\-table \& should be used. .Ve .ie n .IP "The description above shows that option \fB\-\-custom\-gamma\fR expects either no option value, a ""yes"" string, or a ""no"" string. Specifying the option with no value is equivalent to specifying ""yes"". The value in square-brackets indicates that the option is not currently active. That is, attempting to set the option would result in an error message. The set of available options typically depends on the settings of other options. For example, the \fB\-\-custom\-gamma\fR table might be active only when a grayscale or color scan-mode has been requested." 4 .el .IP "The description above shows that option \fB\-\-custom\-gamma\fR expects either no option value, a ``yes'' string, or a ``no'' string. Specifying the option with no value is equivalent to specifying ``yes''. The value in square-brackets indicates that the option is not currently active. That is, attempting to set the option would result in an error message. The set of available options typically depends on the settings of other options. For example, the \fB\-\-custom\-gamma\fR table might be active only when a grayscale or color scan-mode has been requested." 4 .IX Item "The description above shows that option --custom-gamma expects either no option value, a yes string, or a no string. Specifying the option with no value is equivalent to specifying yes. The value in square-brackets indicates that the option is not currently active. That is, attempting to set the option would result in an error message. The set of available options typically depends on the settings of other options. For example, the --custom-gamma table might be active only when a grayscale or color scan-mode has been requested." .PP Note that the \&\fB\-\-help\fR option is processed only after all other options have been processed. This makes it possible to see the option settings for a particular mode by specifying the appropriate mode-options along with the \&\fB\-\-help\fR option. For example, the command-line: .PP \&\fB scanimage \-\-help \-\-mode\fR \&\fIcolor\fR .PP would print the option settings that are in effect when the color-mode is selected. .PP .Vb 4 \& \-\-gamma\-table 0..255,... \& Gamma\-correction table. In color mode this option \& equally affects the red, green, and blue channels \& simultaneously (i.e., it is an intensity gamma table). .Ve .ie n .IP "The description above shows that option \fB\-\-gamma\-table\fR expects zero or more values in the range 0 to 255. For example, a legal value for this option would be ""3,4,5,6,7,8,9,10,11,12"". Since it's cumbersome to specify long vectors in this form, the same can be expressed by the abbreviated form ""[0]3\-[9]12"". What this means is that the first vector element is set to 3, the 9\-th element is set to 12 and the values in between are interpolated linearly. Of course, it is possible to specify multiple such linear segments. For example, ""[0]3\-[2]3\-[6]7,[7]10\-[9]6"" is equivalent to ""3,3,3,4,5,6,7,10,8,6"". The program \fBgamma4scanimage\fR can be used to generate such gamma tables (see \fBgamma4scanimage (1)\fR for details)." 4 .el .IP "The description above shows that option \fB\-\-gamma\-table\fR expects zero or more values in the range 0 to 255. For example, a legal value for this option would be ``3,4,5,6,7,8,9,10,11,12''. Since it's cumbersome to specify long vectors in this form, the same can be expressed by the abbreviated form ``[0]3\-[9]12''. What this means is that the first vector element is set to 3, the 9\-th element is set to 12 and the values in between are interpolated linearly. Of course, it is possible to specify multiple such linear segments. For example, ``[0]3\-[2]3\-[6]7,[7]10\-[9]6'' is equivalent to ``3,3,3,4,5,6,7,10,8,6''. The program \fBgamma4scanimage\fR can be used to generate such gamma tables (see \fBgamma4scanimage (1)\fR for details)." 4 .IX Item "The description above shows that option --gamma-table expects zero or more values in the range 0 to 255. For example, a legal value for this option would be 3,4,5,6,7,8,9,10,11,12. Since it's cumbersome to specify long vectors in this form, the same can be expressed by the abbreviated form [0]3-[9]12. What this means is that the first vector element is set to 3, the 9-th element is set to 12 and the values in between are interpolated linearly. Of course, it is possible to specify multiple such linear segments. For example, [0]3-[2]3-[6]7,[7]10-[9]6 is equivalent to 3,3,3,4,5,6,7,10,8,6. The program gamma4scanimage can be used to generate such gamma tables (see gamma4scanimage (1) for details)." .PP .Vb 2 \& \-\-filename [/tmp/input.ppm] \& The filename of the image to be loaded. .Ve .IP "The description above is an example of an option that takes an arbitrary string value (which happens to be a filename). Again, the value in brackets show that the option is current set to the filename \fB/tmp/input.ppm .\fR" 4 .IX Item "The description above is an example of an option that takes an arbitrary string value (which happens to be a filename). Again, the value in brackets show that the option is current set to the filename /tmp/input.ppm ." .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .PD 0 .IP "\fB\s-1SANE_DEFAULT_DEVICE\s0\fR" 4 .IX Item "SANE_DEFAULT_DEVICE" .PD The default device-name. .SH "FILES" .IX Header "FILES" .IP "\fI/etc/sane.d\fR" 4 .IX Item "/etc/sane.d" This directory holds various configuration files. For details, please refer to the manual pages listed below. .IP "\fI~/.sane/pass\fR" 4 .IX Item "~/.sane/pass" This file contains lines of the form .IP "user:password:resource" 4 .IX Item "user:password:resource" scanimage uses this information to answer user authorization requests automatically. The file must have 0600 permissions or stricter. You should use this file in conjunction with the \-\-accept\-md5\-only option to avoid server-side attacks. The resource may contain any character but is limited to 127 characters. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBsane (7),\fR \&\fBgamma4scanimage (1),\fR \&\fBxscanimage (1),\fR \&\fB\f(BIxcam\fB\|(1) ,\fR \&\fB\f(BIxsane\fB\|(1) ,\fR \&\fBscanadf (1),\fR \&\fBsane-dll (5),\fR \&\fBsane-net (5),\fR \&\fBsane\-\*(L"backendname\*(R" (5)\fR .SH "AUTHOR" .IX Header "AUTHOR" Transliterated from the C original by Jeffrey Ratcliffe. .SH "BUGS" .IX Header "BUGS" All the bugs of scanimage and much, much more.