12.3. Scanners: ScannerDrake, Sane and XSane

This section will speak about ScannerDrake (scanner wizard), SANE and XSane (scanner interface software). It will also give, at the end of the section, a list of other scanner interface software under Linux.

12.3.1. Getting Started

12.3.1.1. Introduction

Using scanners under Mandrake Linux has never been easier. If your scanner is supported by SANE, it's only a matter of installing the required RPMs, have your scanner identified and configured, and launch the image-acquisition application.

Since the configuration step could prove difficult in some cases, especially with very ancient or very recent hardware, Mandrake Linux includes a brand new tool, ScannerDrake, which is part of the DrakX package. Thanks to ScannerDrake, you will be able to install your scanner in less than a minute.

Before launching ScannerDrake, however, all of the SANE packages must be correctly installed on your Mandrake Linux machine (see The SANE software).

Tip

Not that all scanners are supported under Linux: before buying new hardware, it's always a good idea to pay a visit to Mandrakesoft's Hardware Database and to the Linux Hardware Database web sites, as well as to the SANE home page, to check for compatibility issues.

12.3.1.2. The SANE software

SANE, which stands for "Scanner Access Now Easy", is an interface to scanners and other image-acquisition devices like digital cameras and framebuffers. SANE sits in the middle between the device and the acquisition/image processing software, in order to allow developers to write application software without worrying about device drivers.

The SANE software consists of three packages: the SANE library (libsane1), the SANE back-ends (sane-backends, the modules for the scanner devices) and the SANE front-ends (sane-frontends, basic programs for scanning images). Please refer to the "Package Management" section if you are not yet comfortable with package management.

Before trying to configure and use your scanner, you have to install all of these packages, unless you already did so during the installation process. At this stage, it doesn't matter if your scanner is turned on: SANE will install gladly even if there's no physical device connected to the computer (yet).

12.3.1.3. ScannerDrake

ScannerDrake is the Mandrake Linux scanner detection and configuration tool. At the moment of writing the present manual, ScannerDrake only supported USB and some SCSI scanners, but support for the majority of SCSI and parallel port scanners is under active development.

Before launching ScannerDrake, all relevant software packages have to be correctly installed, the USB interface must be working properly, the scanner itself must be connected to your computer and the power turned on. Refer to the manufacturer's manual to know how to install and test your hardware.

When everything is ready, open a terminal and, as root, type scannerdrake. The program will detect the manufacturer and model of your scanner, and ask you if you want to configure it. Answer Yes, and voilą, you are ready to use the programs that come with sane-frontends, XSane or other acquisition software. If you are a GNOME or KDE user, moreover, you will find a very convenient XSane icon on your desktop through "dynamic icons" (provided that you installed the xsane package).

Figure 12-13. ScannerDrake Is Ready to Configure Your Scanner

To test that everything works correctly, launch xscanimage from a shell and try to acquire a picture with your scanner. You can first acquire a preview of the scanned image clicking on the Preview window button, as shown in figure 12-14.

Figure 12-14. xscanimage, a Basic But Effective Acquisition Program

Note that xscanimage can also be invoked directly from GIMP, selecting the Xtns Acquire ImageDevice dialog... menu item, or choosing directly the [name_of_your_scanner]:/dev/usb/scanner0 sub-menu, where [name_of_your_scanner] will be the manufacturer name of your scanner, e.g. epson, mustek, hp, etc.

12.3.1.4. XSane

While xscanimage is more than enough for your basic scanning needs, more experienced and/or graphic-oriented users will be glad to know that Mandrake Linux includes a more sophisticated program, XSane, which offers more options and a more informative display as regards the image acquisition process.

When you double click on the XSane icon on the desktop, or launch it typing xsane from a terminal window, you will see several windows pop up on the screen, as shown in figure 12-15.

Figure 12-15. XSane Multiple Windows And ScannerDrake Icon on Desktop

Moreover, if you install a supplementary package, xsane-gimp, you will have a GIMP plug-in at your disposal. This will allow you to import your images directly in the GIMP for image retouching tasks (see the Graphic Art And Image Manipulation section). To do this, simply choose the File Acquire XSane: device window... menu item to launch XSane. When you will go ahead and scan the image, it will be sent directly to GIMP, and you will be able to edit and retouch it.

12.3.2. Advanced Configuration

12.3.2.1. Fine-Tuning The Resolution

Most modern scanners can boast a high resolution, typically 600 DPI (Dot Per Inch) or even more, which can increase to higher values through interpolation. But it would be a mistake to perform all of your scanning at the maximum available resolution. It could happen that there is very little, if any, quality difference between a 300 and a 600 DPI image scan, but the file size will grow exponentially at higher values, up to many MBs of disk space for a single image file.

The resolution value should be chosen according to the device on which the image will be reproduced. For images that will be shown on computer monitors, e.g. web site images, the resolution will have to be as close as possible as the monitor's one, about 80 DPI (for a 1024x768 display, could be less for 800x600); higher values will result not only in "heavier" images, but the dimensions will also increase, so that an image scanned at 160 DPI instead of 80 will be about twice as large[1].

If you intend to print your images, a resolution of 150-200 DPI should be enough for many home printers; increase this value if you have a very high quality ink jet printer or a dye-sublimation one. Keep in mind that the value commonly used in printed magazines is 300 DPI.

Higher values should be chosen only for specific uses, such as enlarged images on very high quality printers, or scans of black and white originals. You will have to experiment a little, until you are satisfied with the results.

12.3.2.2. OCR Software

Unfortunately, OCR (Optical Character Recognition) software is not as common or sophisticated as the image acquisition counterpart. There is at least one package, however, that is mature enough to be used: Clara OCR. The graphic interface is very simple and doesn't require a specific desktop environment, such as GNOME or KDE, but it will be necessary to train the program on the scan of a sample page. The training process can be quite tedious, and not very intuitive for the newbie[2], so be sure to read the tutorial file. More experienced users should also refer to the Advanced User's Manual.

At least another project, GOCR/JOCR, has reached an usable status. You can download it from its web page and try it, but bear in mind that it's still beta software (latest release at the moment of writing was 0.3.5) that requires supplementary packages (please refer to its home page for more information). Perhaps the best way to use gocr is as a Kooka plug-in (see the Other Scanner Interface Software section).

12.3.3. Other Scanner Interface Software

Here is a list of other scanner interface software which is known to work under Linux:

Notes

[1]

This, however, is a quick way to enlarge images taken from small originals. You could also scan at a higher resolution and then save it at half size, using a graphic manipulation software like GIMP, to improve image quality if you are not satisfied with the result obtained at 80-90 DPI.

[2]

To quote the authors: "Clara OCR is not simple to use. A basic knowledge about how it works is required for using it".


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2002.
http://www.mandrakelinux.com/