*************************************************************************

Xscan V 1.0
Ulrich Eckhardt		10.Jul.1995

*************************************************************************

This is a scanner program for X-Windows. It supports black/white scanner from
Mustek or compatible scanners (my own scanner is a very cheap scanner
from Conrad-Electronic for 75 DM which works very good). 

Xscan allows you to see what you are currently scanning,  store it as a
X-Bitmap file and convert it to gray scale images if your scanner supports 
rastering.

-------------------------------------------------------------------------
			Installation
-------------------------------------------------------------------------

First you need the scanner driver for Mustek scanners from Thomas Faehnle.
You find it on sunsite.unc.edu under
/pub/Linux/kernel/patches/scanner/scan-driver-0.1.8.tgz

You must install a device called /dev/scan (see the appropriate README file).
Copy the file m105.h to your public header files. 

If you have the X-Pixmap library installed, uncomment the appropriate lines
in the Imakefile, else comment the lines out.

Now you can build Xscan :

	xmkmf
	make
	make install

The file xscan.xpm is a bitmap file with a scanner for your desktop. You can 
use it for your own desktop. 

----------------------------------------------------------------------------
				Usage 
----------------------------------------------------------------------------

This program is very simple to use. You can start scanning with the scan-
button. After pressing it, a box with the text "scanning in progress" appears.
Now you can scan. To finish scanning press the stop button in the box.

With the buttons "2x2" "4x4" "8x8" Xscan generates "pseudo-grey" images. It 
counts the numbers of black pixels in an area of 2x2 or 4x4 or 8x8 pixels.
With an area of 2x2 pixel you got 4 greyscales. The image will be the half
size. By 4x4 pixel there are 16 grey scales etc. The button "bw" switches
back to normal black and white.  

To save the current image, click only the save button. The program asks you
about the filename to save. 

The resource "MaxScanLines" set the maximum number of scannlines. The default 
value is 4000 lines. With a 400dpi scanner you can scan 10 inches (for
german users approximately 25cm). If you are low on memory, you can decrease
the number of scannlines.

--------------------------------------------------------------------------
		Changes
--------------------------------------------------------------------------
I fixed a bug, which sometimes crash the program if you change the number
of greyscales. Now the program can use the X-Pixmap library. If you iconify
the program (if it was compiled with X-Pixmap) the windowmanager shows the
correct icon.
 		
--------------------------------------------------------------------------
		Notes on other scanner types.
--------------------------------------------------------------------------

This program is for black and white scanners only. I think it's easy to
port it for other scannerdrivers. The file hardware.c contains the scanner-
dependent routines.

The function ScanInfo returns the number of bytes (not bits!!) per scan line
and the resolution in dots per inch.

"get_line" reads some bytes from /dev/scan. If a line is complete the line
will be shown in the "canvas widget". 

------------------------------------------------------------------------

If you have any suggestions, wishes, notes or bug reports or you just like
it, please send me a postcard or a letter. I haven't got an E-Mail address.

Ulrich Eckhardt
W.-Liebknecht Str. 53
64846 Gross-Zimmern
Germany
