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

Xscan V 1.1
Ulrich Eckhardt		1.Sep.1996

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

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
If you have a Kernel that does not work with this driver then check the
patches directory. Here you can find some patches for kernels 1.3 and 2.0 

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

Check the Imakefile, you can enable the usage of the 3D-Athena Widget Set or
use the pixmap library 
 
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 grey scales. 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
merman users approximately 25cm). If you are low on memory, you can decrease
the number of scannlines.

--------------------------------------------------------------------------
		Changes
--------------------------------------------------------------------------

01.Sep.1996

Some smaller bug fixes and improvement of speed. Also include a new
patch for the scanner driver and Kernel 2.0.0

10.Jan.1996

Fixed a bug which shows some false colours in gray scale - mode


10.Jul.1995

I fixed a bug, which sometimes crash the program if you change the number
of grey scales. Now the program can use the X-Pixmap library. If you iconify
the program (if it was compiled with X-Pixmap) the window manager 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 scanner drivers. 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 like this program send me a picture-postcard from your area where
you live. 

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

E-Mail : Ulrich.Eckhardt@darmstadt.netsurf.de
         uli@rgw-express.de

