sane-project-website/old-archive/2001-06/0019.html

193 wiersze
7.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Patches for improved batch scanning in scanimage</TITLE>
<META NAME="Author" CONTENT="caskey-lists-sane-devel@technocage.com (caskey-lists-sane-devel@technocage.com)">
<META NAME="Subject" CONTENT="Patches for improved batch scanning in scanimage">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Patches for improved batch scanning in scanimage</H1>
<!-- received="Sat Jun 2 05:42:01 2001" -->
<!-- isoreceived="20010602124201" -->
<!-- sent="Sat, 2 Jun 2001 05:42:58 -0700 (PDT)" -->
<!-- isosent="20010602124258" -->
<!-- name="caskey-lists-sane-devel@technocage.com" -->
<!-- email="caskey-lists-sane-devel@technocage.com" -->
<!-- subject="Patches for improved batch scanning in scanimage" -->
<!-- id="Pine.LNX.4.10.10106020514210.843-300000@vaio.factory.tci" -->
<STRONG>From:</STRONG> <A HREF="mailto:caskey-lists-sane-devel@technocage.com?Subject=Re:%20Patches%20for%20improved%20batch%20scanning%20in%20scanimage&In-Reply-To=&lt;Pine.LNX.4.10.10106020514210.843-300000@vaio.factory.tci&gt;"><EM>caskey-lists-sane-devel@technocage.com</EM></A><BR>
<STRONG>Date:</STRONG> Sat Jun 02 2001 - 05:42:58 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0020.html">Gregory F. March: "Re: New member with questions..."</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0018.html">Tim Waugh: "Re: New member with questions..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0022.html">Henning Meier-Geinitz: "Re: Patches for improved batch scanning in scanimage"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0022.html">Henning Meier-Geinitz: "Re: Patches for improved batch scanning in scanimage"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#19">[ date ]</A>
<A HREF="index.html#19">[ thread ]</A>
<A HREF="subject.html#19">[ subject ]</A>
<A HREF="author.html#19">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hello,
<BR>
<P>Short story:
<BR>
<P>Attached are two patches for scanimage and its man page to add in a
<BR>
collection of useful command line parameters to ease scanning of documents
<BR>
on scanners with ADFs.
<BR>
<P>Long story:
<BR>
<P>I've been wanting to archive some old papers, documents and proceedings
<BR>
that I had lying around getting beat up from being moved from one pile to
<BR>
the next. I couldn't bear to drop the docs in the shredder because of that
<BR>
&quot;I might need it one day&quot; feeling.
<BR>
<P>After much head-banging I finally discovered the way to bring my old but
<BR>
barely-used scanner back into service was to get it working under SANE. I
<BR>
lucked out and just happen to have one of the supported USB HP scanners.
<BR>
(An HP C6270A) As far as HP was concerned, I could just drop dead for
<BR>
having so old of a scanner so I'm glad for all of the hard work on the
<BR>
part of the SANE team. It has been working like a champ for a week now.
<BR>
<P>I ran into some troubles while making digital images of documents with my
<BR>
ADF for a couple of reasons. First, the HP will happily scan from the ADF
<BR>
until its empty then commence doing bed-scans until scanimage is killed.
<BR>
Also, the ADF I have is a tiny 20 page model and most of my docs are in
<BR>
the 60-120 page range.
<BR>
<P>For some reason it doesn't report a status change when the ADF is empty.
<BR>
At least not over a USB connection. The 1.0.4 scanimage included in
<BR>
sane-backends-1.0.4, only had a simple --batch mode. My extreme thanks to
<BR>
whoever put that in, it worked great, but given the limitations of the HP
<BR>
I had, I needed more control over batch scanning.
<BR>
<P>I've added three more command line parameters for adjusting the starting
<BR>
number of the output files, the increment between them and the number of
<BR>
pages to scan. This makes it much easier to do a bulk scan of a document
<BR>
that won't fit entirely in your ADF, is double-sided when you have a
<BR>
single-sided scanner or you have a scanner that won't stop when the ADF is
<BR>
empty.
<BR>
<P>Here's how my new parameters work:
<BR>
<P>To scan in a 63 page double-sided report:
<BR>
<P>&nbsp;$ scanimage --batch=document-%03d.pnm \
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--batch-count=32 \
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--batch-double
<BR>
<P>&nbsp;$ scanimage --batch=document-%03d.pnm \
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--batch-count=31 \
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--batch-double \
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--batch-start=2
<BR>
<P>Some shuffling of the papers is necessary to have all the odd numbered
<BR>
pages face-up for the second scan, but it is much easier to gather
<BR>
everything into a single composite tiff if their names already sort in the
<BR>
proper order.
<BR>
<P>The --batch-double command serves as a shortcut to --batch-increment=2.
<BR>
<P>Hope this stuff helps someone. Its very low level but it is about all I
<BR>
needed.
<BR>
<P>C=)
<BR>
<P>--------------------------------------------------------------------------
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Premature optimization is the root of all evil&quot; -Donald Knuth
<BR>
--------------------------------------------------------------------------
<BR>
Caskey &lt;caskey*technocage.com&gt; /// TechnoCage Inc.
<BR>
--------------------------------------------------------------------------
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Heuer's Law: Any feature is a bug unless it can be turned off.
<BR>
<P>
<BR><HR NOSHADE>
<UL>
<LI>TEXT/PLAIN attachment: <A HREF="att-0019/01-scanimage.c-1.0.4-batch.patch">scanimage.c-1.0.4-batch.patch</A>
</UL>
<!-- attachment="01-scanimage.c-1.0.4-batch.patch" -->
<BR><HR NOSHADE>
<UL>
<LI>TEXT/PLAIN attachment: <A HREF="att-0019/02-scanimage.man-1.0.4-batch.patch">scanimage.man-1.0.4-batch.patch</A>
</UL>
<!-- attachment="02-scanimage.man-1.0.4-batch.patch" -->
<P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Patches%20for%20improved%20batch%20scanning%20in%20scanimage&In-Reply-To=&lt;Pine.LNX.4.10.10106020514210.843-300000@vaio.factory.tci&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0020.html">Gregory F. March: "Re: New member with questions..."</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0018.html">Tim Waugh: "Re: New member with questions..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0022.html">Henning Meier-Geinitz: "Re: Patches for improved batch scanning in scanimage"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0022.html">Henning Meier-Geinitz: "Re: Patches for improved batch scanning in scanimage"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#19">[ date ]</A>
<A HREF="index.html#19">[ thread ]</A>
<A HREF="subject.html#19">[ subject ]</A>
<A HREF="author.html#19">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Sat Jun 02 2001 - 05:43:25 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>