<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Testing Your Scanner</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="The Scanner HOWTO" HREF="index.html"><LINK REL="PREVIOUS" TITLE="SANE" HREF="sane.html"><LINK REL="NEXT" TITLE="SANE Frontends" HREF="frontends.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The Scanner HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="sane.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="frontends.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="TESTING" ></A >5. Testing Your Scanner</H1 ><P >Once you've completed all of the above, you're ready to test your scanner equipment. This section assumes your scanner is turned on and has been attached through the appropriate interface. If you have a SCSI or a USB scanner, at the command line you can issue the following command:</P ><P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ sane-find-scanner</PRE ></FONT ></TD ></TR ></TABLE ></P ><P >...which should find and identify your scanner from a list of possible devices. (Note to Debian users: starting with Sarge, or unstable, sane-find-scanner is available in the 'sane-utils' package. In Woody it is available in the 'libsane' package.) If your scanner is a type not looked for by <B CLASS="COMMAND" >sane-find-scanner</B >, you can try as root <B CLASS="COMMAND" >scanimage --list-devices</B > which should yield information about attached devices. For example, this is the output on my system: <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >device `v4l:/dev/video0' is a Noname BT878 video (Hauppauge (bt878)) virtual device device `epson:/dev/scanner0' is a Epson Perfection1240 flatbed scanner</PRE ></FONT ></TD ></TR ></TABLE > whereas when using libusb it registers as <TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >device `v4l:/dev/video0' is a Noname BT878 video (Hauppauge (bt878)) virtual device device `epson:libusb:001:003' is a Epson Perfection1240 flatbed scanner</PRE ></FONT ></TD ></TR ></TABLE > Make note of the 'backend:device' information obtained; this will be our device name to specifically access the scanner from the command line. Also, be aware that sane-find-scanner is a separate utility that does not guarantee support under SANE, it only looks for devices that claim to be scanners. </P ><P >Next you should test the scanner's image grabbing ability. You can use either one of the frontends listed in <A HREF="frontends.html" >Section 6</A > or at the command line if you wish with the following:</P ><P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ scanimage -d backend:/dev/scanner --format pnm > outfile.pnm</PRE ></FONT ></TD ></TR ></TABLE ></P ><P >Thus if you use the Epson backend, for example, the command would be as follows:</P ><P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >$ scanimage -d epson:/dev/scanner --format pnm > outfile.pnm</PRE ></FONT ></TD ></TR ></TABLE ></P ><P >You only need the <B CLASS="COMMAND" >-d</B > option if you have more than one scanner and want to select which one to use. For example, if you have an Epson and a Mustek scanner, using "-d epson" or "-d mustek" should be enough. The complete path is only needed if you have more that one scanner supported by the same backend. Obviously <B CLASS="COMMAND" >/dev/scanner</B > should be substituted with whatever scanner device you've configured (e.g., <TT CLASS="FILENAME" >/dev/video0</TT > in the case of a v4l device, and libusb as seen in the sane-find-scanner example above). The <B CLASS="COMMAND" >--format</B > switch can be either pnm or tiff, but if left out will default to pnm. See <B CLASS="COMMAND" >man scanimage</B > for more obscure but useful options. The '.pnm' format stands for 'portable anymap,' a common image format for graphical files in Linux that can be converted to nearly any other image format with <A HREF="http://www.imagemagick.org/" TARGET="_top" >Imagemagick</A > or <A HREF="http://netpbm.sourceforge.net/" TARGET="_top" >netpbm</A >.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="sane.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="frontends.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SANE</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SANE Frontends</TD ></TR ></TABLE ></DIV ></BODY ></HTML >