kopia lustrzana https://gitlab.com/sane-project/website
				
				
				
			
		
			
				
	
	
		
			67 wiersze
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
			
		
		
	
	
			67 wiersze
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
<!-- received="Fri Apr  9 02:14:04 1999 PDT" -->
 | 
						||
<!-- sent="Fri, 09 Apr 1999 10:15:44 +0100" -->
 | 
						||
<!-- name="Dr. Andreas Bolsch" -->
 | 
						||
<!-- email="Andreas.Bolsch@maths.nott.ac.uk" -->
 | 
						||
<!-- subject="Re: Scanner -> printer problem" -->
 | 
						||
<!-- id="" -->
 | 
						||
<!-- inreplyto="Scanner -> printer problem" -->
 | 
						||
<title>sane-devel: Re: Scanner -> printer problem</title>
 | 
						||
<h1>Re: Scanner -> printer problem</h1>
 | 
						||
<b>Dr. Andreas Bolsch</b> (<a href="mailto:Andreas.Bolsch@maths.nott.ac.uk"><i>Andreas.Bolsch@maths.nott.ac.uk</i></a>)<br>
 | 
						||
<i>Fri, 09 Apr 1999 10:15:44 +0100</i>
 | 
						||
<p>
 | 
						||
<ul>
 | 
						||
<li> <b>Messages sorted by:</b> <a href="date.html#163">[ date ]</a><a href="index.html#163">[ thread ]</a><a href="subject.html#163">[ subject ]</a><a href="author.html#163">[ author ]</a>
 | 
						||
<!-- next="start" -->
 | 
						||
<li> <b>Next message:</b> <a href="0164.html">Petter Reinholdtsen: "Re: Linking non-libtool libraries into a new backend?"</a>
 | 
						||
<li> <b>Previous message:</b> <a href="0162.html">Dr. Andreas Bolsch: "Re: Color images - Lines mismatched ?"</a>
 | 
						||
<li> <b>Maybe in reply to:</b> <a href="0144.html">Raymond A. Ingles: "Scanner -> printer problem"</a>
 | 
						||
<!-- nextthread="start" -->
 | 
						||
<li> <b>Next in thread:</b> <a href="0158.html">Graham Stoney: "Re: Linking non-libtool libraries into a new backend?"</a>
 | 
						||
<!-- reply="end" -->
 | 
						||
</ul>
 | 
						||
<!-- body="start" -->
 | 
						||
The problem is that pnmtops is intended for printing pictures, i.e.<br>
 | 
						||
there are provisions for a generous margin and a convenient 'best fit'.<br>
 | 
						||
 <br>
 | 
						||
Let's suppose we use a4 paper, that is 210mm x 297mm. The useable height<br>
 | 
						||
and width are 95% (margin hardcoded in pnmtops), so 199.50mm x 282.15mm.<br>
 | 
						||
If we'd like to center this 'window' we would use e.g.<br>
 | 
						||
 <br>
 | 
						||
  scanimage -d <device> --mode <mode> --resolution 150 -l5.25mm \        <br>
 | 
						||
            -x199.5mm -t7.425mm -y282.15mm | \<br>
 | 
						||
 <br>
 | 
						||
Now 'dpi' must be an integral multiple of 72 for pnmtops (for otherwise<br>
 | 
						||
the scaling algorithm does awkward things), and as we scanned with<br>
 | 
						||
150dpi here, the scale factor is 72.0 / 150.0 = 0.48, so<br>
 | 
						||
 <br>
 | 
						||
  pnmtops -scale 0.48 -dpi 72 -width 8.28 -height 11.71 | lpr<br>
 | 
						||
 <br>
 | 
						||
does the job. Note that width and height are not used for scaling here,<br>
 | 
						||
they just affect the centering (if they're not too small).<br>
 | 
						||
 <br>
 | 
						||
This gives for me reasonable copies up to a slight horizontal<br>
 | 
						||
distortion (about 1%). The latter, however, is due to mechanical<br>
 | 
						||
inaccuracy of the scanner as it's present even in the pnm file. <br>
 | 
						||
 <br>
 | 
						||
Of course, as already remarked, this method is rather slow, so in<br>
 | 
						||
general pnmtolj is a better choice for b/w copies. However, for<br>
 | 
						||
color ...<br>
 | 
						||
<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">majordomo@mostang.com</a>
 | 
						||
</pre>
 | 
						||
<!-- body="end" -->
 | 
						||
<p>
 | 
						||
<ul>
 | 
						||
<!-- next="start" -->
 | 
						||
<li> <b>Next message:</b> <a href="0164.html">Petter Reinholdtsen: "Re: Linking non-libtool libraries into a new backend?"</a>
 | 
						||
<li> <b>Previous message:</b> <a href="0162.html">Dr. Andreas Bolsch: "Re: Color images - Lines mismatched ?"</a>
 | 
						||
<li> <b>Maybe in reply to:</b> <a href="0144.html">Raymond A. Ingles: "Scanner -> printer problem"</a>
 | 
						||
<!-- nextthread="start" -->
 | 
						||
<li> <b>Next in thread:</b> <a href="0158.html">Graham Stoney: "Re: Linking non-libtool libraries into a new backend?"</a>
 | 
						||
<!-- reply="end" -->
 | 
						||
</ul>
 |