branch: externals/scanner
commit 599cecc8a6ccaae7c4cab985a0119403fdc78401
Author: Raffael Stocker <[email protected]>
Commit: Raffael Stocker <[email protected]>
add scan preview and brightness, contrast, delay commands/options
---
scanner.texi | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 68 insertions(+), 11 deletions(-)
diff --git a/scanner.texi b/scanner.texi
index 12c3c91b88..957e7f809b 100644
--- a/scanner.texi
+++ b/scanner.texi
@@ -268,6 +268,19 @@ This command is also available from the Scanner menu as@*
for a single-page scan and@*
@clicksequence{Tools @click{} Scanner @click{} Scan multiple images}@*
for a multi-image scan.
+
+@item M-x scanner-scan-preview
+Make a preview scan. This command makes a preview scan assuming
+document scan settings. The resolution of the scan is changed to
+@code{scanner-preview-resolution} and the scan mode is set to ``Gray'',
+otherwise all options stay in effect. If @code{scanner-use-unpaper} is
+non-@code{nil}, post-processing with unpaper is done as well. The
+resulting scan is shown in an image window, unless Emacs can't display
+images, in which case a Dired buffer is created showing the files
+generated by the scan.
+
+This command is also available from the Scanner menu as@*
+@clicksequence{Tools @click{} Scanner @click{} Make a preview scan}@*
@end table
@@ -304,6 +317,7 @@ Emacs sessions, use the customization interface.
@item M-x scanner-set-image-resolution
@item M-x scanner-set-document-resolution
@findex scanner-set-document-resolution
+@findex scanner-set-image-resolution
These commands interactively asks for a resolution (in @acronym{DPI,
dots per inch}) to be used in subsequent image and document scans,
respectively. The corresponding user options is
@@ -363,6 +377,29 @@ devices have already been detected before.
This command is also available in the Scanner menu as@*
@clicksequence{Tools @click{} Scanner @click{} Select scanning device}
+
+@item M-x scanner-set-scan-delay
+Set the delay in seconds between scans in multi-page mode. This
+commands sets the variable @code{scanner-scan-delay}.
+
+This command is also available in the Scanner menu as@*
+@clicksequence{Tools @click{} Scanner @click{} Set delay between scans}
+
+@item M-x scanner-set-brightness
+Set the brightness of the scans. The available range is
+device-specific.
+
+This command is also available in the Scanner menu as@*
+@clicksequence{Tools @click{} Scanner @click{} Set brightness}
+
+@item M-x scanner-set-contrast
+Set the contrast of the scans. The available range is
+device-specific.
+
+This command is also available in the Scanner menu as@*
+@clicksequence{Tools @click{} Scanner @click{} Set contrast}
+
+
@end table
The following commands can be found in the ``Scan Enhancement'' submenu
@@ -511,6 +548,27 @@ This option can be set per-session with the commands
@code{scanner-select-document-resolution}.
@end defopt
+@defopt scanner-preview-resolution
+This option specifies the resolution in DPI used in preview scans. The
+default is 75.
+@end defopt
+
+@defopt scanner-brightness
+This option specifies the brightness setting for scans. The default is
+20. This option assumes the @command{scanimage} switch
+@option{--brightness} is available, which is device-specific.
+
+This option can be set with the command @code{scanner-set-brightness}.
+@end defopt
+
+@defopt scanner-contrast
+This option specifies the contrast setting for scans. The default is
+50. This option assumes the @command{scanimage} switch
+@option{--contrast} is available, which is device-specific.
+
+This option can be set with the command @code{scanner-set-contrast}.
+@end defopt
+
@defopt scanner-paper-sizes
This option holds paper sizes for document scans as a property list with
the name of the page format as the key (e.g. @code{:a4}) and a list of
@@ -654,14 +712,6 @@ list of switch/value pairs, such as:
("--switch1" "value1" "-s" "2")
@end lisp
The default is nil.
-
-For example, some devices may need some tweaking of brightness and
-contrast to provide adequate scans. Something like
-@lisp
-("--brightness" "20" "--contrast" "50")
-@end lisp
-might do the trick. Note, however, that the switches in this example
-are device-dependent.
@end defopt
@@ -958,11 +1008,18 @@ This chapter lists the changes made in new releases of
Scanner.
@itemize
@item
@command{unpaper} has been added as a new backend; it allows scan
-enhancement in document scans; see @ref{Configuring unpaper} for options.
+enhancement in document scans; see @ref{Configuring unpaper} for
+options. There is a new ``Scan Enhancement'' sub-menu for this backend.
+@item
+A command for making a preview scan has been added.
+@item
+Menu items and user options for brightness and contrast have been added.
+@item
+A menu item for setting the scan delay has been added.
@item
-older @command{scanimage} versions (before 1.0.28) are now supported as well.
+Older @command{scanimage} versions (before 1.0.28) are now supported as well.
@item
-a new page size @code{:whatever} allows @command{scanimage} to select
+A new page size @code{:whatever} allows @command{scanimage} to select
the page size based on the available scan area.
@item
Scanner now comes with a manual.