XPM README

Contents

  1. What Is XPM?
  2. Where to get XPM?
  3. Documentation
  4. Installation
    1. With imake
    2. Without imake
  5. SXPM
  6. CXPM
  7. Other Tools
  8. Discussion
  9. Copyright

1. 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 four functions, similar to the X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData, XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap for respectively including, storing, reading and writing this format, plus four other: XpmCreateImageFromData, XpmCreateDataFromImage, XpmReadFileToImage and XpmWriteFileFromImage for working with images instead of pixmaps.

This new version provides a C includable format, defaults for different types of display: monochrome/color/grayscale, hotspot coordinates and symbol names for colors for overriding default colors when creating the pixmap. It provides a mechanism for storing information while reading a file which is re-used while writing. This way comments, default colors and symbol names aren't lost. It also handles "transparent pixels" by returning a shape mask in addition to the created pixmap.

See the XPM Manual for details.

2. Where to get XPM?

New XPM updates are announced on the comp.windows.x newsgroup, and on the "xpm-talk" list and you can always consult the XPM Home page at http://www.inria.fr/koala/lehors/xpm.html

The latest "official" XPM release can always be found at:
Boston, USA: ftp://ftp.x.org/contrib
Sophia Antipolis, France: ftp://koala.inria.fr/pub/xpm

3. Documentation

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

Read the doc. The documentation is in PostScript format (doc/xpm.PS) and has been produced with FrameMaker. The source files are available on request.

A FAQ (Frequently Asked Questions) is also provided, so if you experience any problem you should have a look at this file.

4. Installation

To obtain the XPM library, first uncompress and untar the compressed tar file in an appropriate directory.

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

4.1. With imake

Imakefiles are provided to build both shared and unshared libraries. However, building a shared lib is very OS dependent and often requires specific files which are not available. Also config files are often not set correctly for this task. So if it fails you can avoid trying to build one and simply build the static library instead. In order to do so you should edit the top Imakefile to add -DSharedLibXpm=NO to the definition of IMAKE_DEFINES as described.

The compilation and installation of the library and the sxpm program should only require you to edit the top Imakefile. But you should do so in order to specify the locations where the various files should be installed and to set the DEFINES variable accordingly to your system.

On Solaris 2.* the compilation works only in the native svr4 environment, avoid the bsd one or it won't compile. Especially you should be using /opt/SUNWspro/b