*** Copyright 1990 GROUPE BULL -- See licence conditions in file COPYRIGHT ***

				XPM Version 3

WHAT IS XPM?
============

XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.

Here is provided a library containing a set of three functions, similar to the
X bitmap functions as defined in the Xlib: XCreatePixmapFromData,
XReadPixmapFile and XWritePixmapFile for respectively including, reading and
writing this format.

This new version provides a C includable format, defaults for different types
of display: monochrome/color/grayscale, and symbol names for colors for
overriding default colors when creating the pixmap. In addition it provides a
structure for storing information while reading a file which is re-used while
writing. This way comments, default colors and symbol names aren't lost.

See the XPM Manual for more details.

DOCUMENTATION:
=============

Old users might read the CHANGES file for a history of changes interesting
the user.

Read the docs (xpm.tex is the manual in LaTeX form). The documentation is in
LaTeX format (IMPORTANT: see the Makefile to know how to print it. You will
need to include a postscript header "idraw.pro" and postscript files.  The
LaTeX source should work with most dvi2ps or dvips programs. I use myself
Tomas Rokicki's dvips v5.0 that you can get by anonymous ftp on
labrea.stanford.edu).  We can mail you a PostScript version of the
documentation if you are not able to print it, or you can grab one on the ftp
servers.

INSTALLATION:
============

To obtain the XPM library, first execute the shell archive file in an
approriate directory.

Then you can either compile xpm via "imake" or in a stand-alone way.

WITH IMAKE:

	The Imakefile is provided. You should know how to use imake to build 
	the XPM Makefile, by executing "xmkmf" then do:

		make depend
		make

	which will build the XPM library and sxpm application. 
	Then do:

	     	make install
		make install.man

	which will install the library and the sxpm man page.

	If it fails, you may edit the Imakefile to add compilation flags to
	suit your machine.

WITHOUT IMAKE:

	To compile xpm, in the xpm directory you just created, do:

	        make -f Makefile.noXtree

	Then to install it, do:

		make -f Makefile.noXtree install

NOTE:   if you compile  with gcc, use "gcc -traditional", otherwise you will
        have compilation warnings (but the code will work Ok)

SXPM:
====

In addition to the library the sxpm tool is provided to show XPM file and
convert them from XPM2 to XPM version 3. If you have previously done 'make' or
'make all' you should have it yet, otherwise just do:

		      make sxpm

This application shows you all the features of XPM and the three provided
functions.

By executing 'sxpm' without any option you will see a demo of the
XCreatePixmapFromData function. The pixmap is created from the static variable
plaid defined in the sxpm.c file. Sxpm will end when you press the key Q in
the created window.

Executing 'sxpm -s lines_in_mix blue' will show the feature of overriding
color symbols giving a colorname, and executing 'sxpm -p lines_in_mix 1' will
show overriding giving pixel value.

Then you should try 'sxpm -out output' to get an output file using the
XWritePixmapFile function.

You can now try 'sxpm -stdout -nod -rgb /usr/lib/X11/rgb.txt' to directly get
the pixmap printed out on the standard output with colornames instead of rgb
values.

Then you should try 'sxpm -in plaid' to use the XReadPixmapFile function.

The XCreatePixmapFromData function is on purpose called without any Xpminfo 
pointer to show the utility of this one. Indeed, compare the color section of
the two files foo and bar obtained from 'sxpm -out foo' and 
'sxpm -in plaid -o bar'.

Of course, other combinations are allowed and should be tried. Thus, 
'sxpm -in plaid -out output -nod' will show you how to convert a file from
XPM2 to a XPM version 3 using sxpm.

See the manual page for more detail.

CONVERTERS:
==========

In the converters directory you can find different converters about XPM.
There is a perl script xpm1to3.perl to convert XPM1 format file to XPM version
3 natural. And there are files needed to build the converters ppmtoxpm and
xpmtoppm; to get instructions about how to build it you should read the
corresponding ppm.README file.

KNOWN BUG:
=========

If two symbols get the same color pixel when reading a pixmap, one will be
lost when writting it out.

DISCUSSION:
==========

There is a mailing list to discuss about XPM which is xpm-talk@mirsa.inria.fr.
Any request to subscribe should be sent to xpm-talk-request@mirsa.inria.fr.

COPYRIGHT:
==========

  Copyright 1990 GROUPE BULL -- See licence conditions in file COPYRIGHT
  See the COPYRIGHT file in the XPM distribution

Please mail any bug reports or modifications done, comments, suggestions,
requests for updates or patches to port on another machine to:

lehors@mirsa.inria.fr		(INTERNET)

33 (FRANCE) 93.65.77.71		(VOICE PHONE)

Arnaud Le Hors			(SURFACE MAIL)
Bull c/o Inria BP. 109
2004, Route des lucioles
Sophia Antipolis
06561 Valbonne Cedex
FRANCE
