PHOTOGRAPHS in the QUIPU directory service.

To compile first edit the Makefile and find the line

	DISPLAY = ttyphoto fax2ps

Edit this line to select which display processes you would like
compiled.  The options are:

   Xphoto   - Display photo in X11 window environment
   xfax     - Display photo in X11 window environment (fine resolution)
   sunphoto - Display photo in sunview environment
   ttyphoto - Display photo on a simple terminal
   hexphoto - Display photo in hex !!!
   t4014    - Display on Tetronix 4014 (emulating!) terminals.
   fax2ps   - Convert the photo to postscript


Then compile using
	
	./make 

an install using
	
	./make inst-all


Each display process can be tested with the file "sk" in this
directory e.g.,

	 ttyphoto < sk

To get the QUIPU interfaces to call these routine when a photo is loaded, an
entry of the form

	photo falco ttyphoto
or
	photo xterm Xphoto

is needed in your dsaptailor file.
This will tell the interfaces to use the program `ttyphoto' if your 
terminal type (determined from the TERM environment variable) is
`falco', in the first case, or to use `Xphoto' if you are using an `xterm'.



The photo format used by QUIPU is G3FAX format.  If you have bitmaps
in a different format you can use PBMPLUS package to convert them into
G3FAX format.  If you don't have a copy of PBMPLUS, contact 

      Jef Poskanzer <jef@well.sf.ca.us>. 

(PBMPLUS can also be found in the contrib/ section of the X11R4 source)
Once you have acquired PBMPLUS, build the libpbm.a library (go to the
pbm/ directory in the PBMPLUS source tree and type make).  Next edit
the Makefile in this directory to set the PBMDIR make variable to
reflect where the top of the PBMPLUS source tree is located.  Finally,
type:

	% ./make pbm
	# ./make inst-all

This will generate a pbmtofax program, which can be used as follows:

        pbmtofax < bitmap.pbm > bitmap.fax


If you can not get hold of PBMPLUS, then you might find the program 

	pr2pe 

of use.  This converts sunview pixrect files into G3FAX format.



The ttyphoto program's output can be modified with 4 environment variables:

photo_scale: 	set to `small' (default), `medium' or `large'.
photo_invert:	set true or false.
photo_equal:    false - display photo as is.
		true - apply histogram equalisation to try and improve quality.
		edge -  Used `edges by expansion' to try to get a better photo
photo_mapping:  This must contain a 16 charcter string.
		The string is used to create the greyscale.
Suggestions as to how to improve `ttyphoto' are welcome.


Display for devices other than those supplied can be easily added.
Take a copy of template.c, and supply the 5 routines defined.
Look at sunview.c hexphoto.c ttyphoto.c t4014.c and winx.c examples.
(You may consider donating such interfaces to ISODE for future release!)
Then compile using:

	cc -o myphoto d_main.o decode.o build_trees.o interface.o myphoto.o


