aboutsummaryrefslogtreecommitdiff
path: root/libXpm/doc
diff options
context:
space:
mode:
Diffstat (limited to 'libXpm/doc')
-rw-r--r--libXpm/doc/FAQ.html344
-rw-r--r--libXpm/doc/Makefile.am6
-rw-r--r--libXpm/doc/README.AMIGA10
-rw-r--r--libXpm/doc/README.MSW127
-rw-r--r--libXpm/doc/README.html303
-rw-r--r--libXpm/doc/xpm.PS.gzbin0 -> 49010 bytes
6 files changed, 790 insertions, 0 deletions
diff --git a/libXpm/doc/FAQ.html b/libXpm/doc/FAQ.html
new file mode 100644
index 000000000..18d4ee6ff
--- /dev/null
+++ b/libXpm/doc/FAQ.html
@@ -0,0 +1,344 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<TITLE>FAQ XPM</TITLE>
+</HEAD>
+
+<body>
+<h1 align="center">The XPM<br>
+Frequently Asked Questions</h1>
+<p>
+This article contains the answers to some Frequently Asked Questions about the
+XPM format and/or library. If you don't find the answer to your problem here,
+then you can mail either to lehors@sophia.inria.fr or to the mailing list
+xpm-talk@sophia.inria.fr.
+
+
+<h2>Contents</h2>
+
+<ol>
+<li><a href="#Q1">How do I convert my images to or from XPM ?</a>
+<li><a href="#Q2">Why are my XPM files said to be invalid ?</a>
+<li><a href="#Q3">Why does my program core dumps using XPM ?</a>
+<li><a href="#Q4">Why does my program core dumps using XPM with a widget ?</a>
+<li><a href="#Q5">How can I get a non rectangular icon using XPM ?</a>
+<li><a href="#Q6">What exactly triggers the creation of a mask when using XPM ?</a>
+<li><a href="#Q7">How should I use the mask ?</a>
+<li><a href="#Q8">Is there a string to pixmap converter somewhere ?</a>
+<li><a href="#Q9">How can I edit XPM icons ?</a>
+<li><a href="#Q10">Is there a collection of icons somewhere ?</a>
+<li><a href="#Q11">The documentation fails to print out. Why ?</a>
+<li><a href="#copy">Copyright</a>
+</ol>
+
+
+<h2><a name="Q1">1. How do I convert my images to or from XPM ?</a></h2>
+<p>
+ Netpbm is surely the best image conversion package that I know of. It defines
+ formats for color, gray and monochrome images and provides a set of filters.
+ Thus a GIF image can be converted to XPM with something like:
+<p>
+ $ giftoppm youricon.gif | ppmtoxpm > youricon.xpm
+<p>
+ The latest release can be found at least from wuarchive.wustl.edu
+ (128.252.135.4), directory /graphics/graphics/packages/NetPBM
+
+
+<h2><a name="Q2">2. Why are my XPM files said to be invalid ?</a></h2>
+<p>
+ There are three official versions of the XPM format. The XPM library since
+ version 3.3 can read all them but writes out only XPM 3. Also the small
+ program called sxpm which is part of the XPM library package can be used to
+ automatically translate XPM 1 and 2 files to XPM 3 with a command such as:
+<p>
+ $ sxpm -nod yourxpm1or2file -o yourxpm3file
+<p>
+ Also, the XPM format defines "None" to be the color name meaning
+ "transparent", but IXI used to hack the XPM library in its early days to
+ handle transparency as "#Transparent". This makes IXI format not compatible
+ with the official XPM format, and so not readable neither by the official XPM
+ library nor any of the programs built on top of it.
+<p>
+ The only solutions are either to stick on IXI programs which can deal with
+ their format or convert your files to the standard XPM format. This can be
+ done simply by changing "#Transparent" to "None".
+
+
+<h2><a name="Q3">3. Why does my program core dumps using XPM ?</a></h2>
+<p>
+ Be sure the XpmAttributes structure you pass by reference has a valid
+ valuemask. You can give NULL instead if you don't want to use an
+ XpmAttributes but if you do, you MUST initialize its valuemask component to
+ some valid value, at least 0, otherwise unpredictable errors can occur.
+<p>
+ So instead of doing something like:
+<pre>
+ XpmAttributes attrib;
+
+ XpmReadFileToPixmap(dpy, d, filename, &amp;pixmap, &amp;mask, &amp;attrib);
+</pre>
+<p>
+ you should do:
+<pre>
+ XpmAttributes attrib;
+
+ attrib.valuemask = 0;
+ XpmReadFileToPixmap(dpy, d, filename, &amp;pixmap, &amp;mask, &amp;attrib);
+</pre>
+
+
+<h2><a name="Q4">4. Why does my program core dumps using XPM with a widget ?</a></h2>
+<ul>
+<li>First the XPM library is Xlib level, so don't pass your widget as a
+ Drawable parameter. A Drawable is either a Window or a Pixmap. The widget's
+ window can do the job but:
+
+<li>Then a widget only gets a Window when realized, so passing XtWindow(widget)
+ with a not yet realized widget is wrong. Either realize you widget first or
+ use another window. Since the Drawable parameter is only used to specify
+ the screen to which the pixmap must be created on, most of the time the
+ default root window is just fine.
+</ul>
+
+
+<h2><a name="Q5">5. How can I get a non rectangular icon using XPM ?</a></h2>
+<p>
+ The X Window System does not support transparent color. However there are
+ several ways you can use to get the same visual effect using XPM:
+<ul>
+<li>First you can use the None color to get a shape mask and use it as
+ explained below (question 7).
+
+<li>Second you can define a symbolic color name such as "mask" in the XPM
+ format file, then use the color overriding mechanism to set this symbolic
+ color to the color of the underlying object. Note that in this case the XPM
+ library won't create a shape mask, and that if the color of the underlying
+ object is changed then you'll have to create a new pixmap.
+</ul>
+
+
+<h2><a name="Q6">6. What exactly triggers the creation of a mask when using XPM ?</a></h2>
+<p>
+ Basically a mask is created if "None" is used as one of the color of the
+ pixmap. Be aware that this is not only true if it is used in the XPM of the
+ pixmap since the colors can be overridden at load time. So a mask is created
+ if the "None" color is used at load time, coming either from the XPM
+ definition or the color overriding.
+
+
+<h2><a name="Q7">7. How should I use the mask ?</a></h2>
+<p>
+ There are basically two ways of using the mask:
+<ul>
+<li>Use the mask as a shapemask with the X11 Nonrectangular Saphe Window
+ Extension. Typically this is what should be done when the icon is used in a
+ desktop.
+
+<li>Use the mask as a clipmask in the GC you pass to XCopyArea when drawing the
+ pixmap. So the "transparent" pixels being not actually drawn will get the
+ underlying pixels colors.
+</ul>
+
+
+<h2><a name="Q8">8. Is there a string to pixmap converter for Motif ?</a></h2>
+<p>
+ Yes, Motif 2.0 or later does support XPM pixmaps as well as XBM bitmaps.
+
+
+<h2><a name="Q9">9. How can I edit XPM icons ?</a></h2>
+<p>
+ As listed below several editors either commercial or not are supporting the
+ XPM format. However, pixmap is the one I would recommend since it is freely
+ available and, being fully dedicated to XPM, it allows to edit all the
+ special things, such as the symbolic color names, which makes XPM different
+ from all the other image formats. Pixmap can always be found by ftp from
+ ftp.x.org (contrib) and avahi.inria.fr (pub/pixmap).
+<p>
+Last Update: 3 August 1994
+<table border=1>
+<caption>XPM Icon Editors</caption>
+<tr><th>Program<th>Infos<th>Source/Author<th>Platforms<th>SA<th>XPM<th>cost
+<tr><td>pixmap<td><ul>
+ <li><a href="ftp://ftp.x.org/contrib/application/pixmap/pixmap2.6.tar.gz">ftp://ftp.x.org/contrib/application/pixmap/pixmap2.6.tar.gz</a>
+ <li>requires 3.4 or higher revision of Xpm lib.
+ <li>supports all XPM format features
+ <li>current version doesn't work on 24-plane displays
+</ul>
+<td>Lionel Mallet<td>source<td>yes<td>3<td>NC
+
+<tr><td>pixt<td><ul>
+ <li><a href="ftp://ftp.x.org/contrib/pixt.tar.Z">ftp://ftp.x.org/contrib/pixt.tar.Z</a>
+ <li>doesn't work on 24-plane displays
+ <li>last updated November 1991
+</ul>
+<td>J. Michael Flanery<td>source<td>yes<td>1<td>NC
+
+<tr><td>pixed<td><ul>
+ <li>part of X.desktop
+ <li>current version doesn't work on 24-plane displays
+</ul>
+<td>IXI<td>Many UNIX<td>no<td>3<td>N/A
+
+<tr><td>olpixmap<td><ul>
+ <li>packaged with the OLIT (OpenLook) toolkit
+</ul>
+<td>USL<td>Sun, SVR4.2, UnixWare<td>no<td>1<td>N/A
+
+<tr><td>xfedor<td><ul>
+ <li>only uses XLIB
+ <li>doesn't work on 24-plane displays
+</ul>
+<td>Daniel Dardailler<td>source<td>yes<td>3<td>NC
+
+<tr><td>SCOpaint<td><ul>
+ <li>included with the ODT package
+</ul>
+<td>SCO/Wing Eng<td>ODT<td>yes<td>2.8<td>N/A
+
+<tr><td>pme.icn<td><ul>
+ <li>written in the Icon language
+</ul>
+<td>Icon Project<td>source<td>yes<td>3<td>NC
+
+<tr><td>PixEditT<td><ul>
+ <li>there is currently no support for editing the colormap
+</ul>
+<td>Free Widget Foundation<td>source<td>yes<td>3<td>NC
+
+<tr><td>xscribble<td><ul>
+ <li>requires the FWF, 8-bit pseudocolor
+ <li><a href="ftp://ftp.cis.ufl.edu/pub/thoth">ftp://ftp.cis.ufl.edu/pub/thoth</a>
+ <li>Alpha version (last updated April 1993)
+</ul>
+<td>Robert Forsman<td>source<td>yes<td>?<td>NC
+
+<tr><td>vueicon<td><ul>
+ <li>included with Vue3.0
+</ul>
+<td>Hewlett-Packard<td>HP<td>yes<td>3<td>N/A
+
+<tr><td>iconedit V3<td>&nbsp;<td>SunSoft<td>Sparc/Sun3<td>yes<td>2<td>N/A
+
+<tr><td>Pixmap Editor<td><ul>
+ <li>this is a Widget, not a complete program
+</ul>
+<td>ICS<td>?<td>yes<td>?<td>?
+
+<tr><td>ezX<td>&nbsp;<td>Sunrise Softwarey<td>?<td>?<td>?<td>N/A
+
+<tr><td>XPaint<td><ul>
+ <li>full featured, works on all displays
+ <li>current release is 2.1.1 (last update January 1994)
+</ul>
+<td>David Koblas<td>source<td>yes<td>3<td>NC
+
+<tr><td>Phoenix<td><ul>
+ <li>full featured, 24-bit painting program, requires Motif.
+ <li><a href="ftp://nic.funet.fi/pub/graphics/packages/phoenix">ftp://nic.funet.fi/pub/graphics/packages/phoenix</a>
+ <li>Beta version (last updated September 1993)
+</ul>
+<td>ohtcolor@niksula.hut.fi<td>source<td>yes<td>3<td>NC
+
+<tr><td>pixed<td><ul>
+ <li>pixed is part of the TeleUSE UIMS
+ <li>More info is available from service@ignite.alsys.com
+</ul>
+<td>Alsys<td>Many UNIX<td>yes<td>3<td>N/A
+
+<tr><td>display<td><ul>
+ <li><a href="ftp://ftp.x.org/contrib/application/ImageMagick/ImageMagick-3.2.tar.gz">ftp://ftp.x.org/contrib/application/ImageMagick/ImageMagick-3.2.tar.gz</a>
+ <li>lots of image conversion and manipulation features
+</ul>
+<td>John Cristy<td>source<td>yes<td>3<td>NC
+</table>
+
+<p>
+SA - Stand Alone program<br>
+NC - No Charge (i.e. free); most programs are copyrighted.<br>
+XPM - XPM format supported<br>
+source - built from source code; likely works on all standard X platforms<br>
+N/A - icon editor is normally distributed with other software
+
+<p>
+Send updates, additions, corrections, etc. to <a
+href="mailto:dan@bristol.com">dan@bristol.com</a>
+
+
+<h2><a name="Q10">10. Is there a collection of icons somewhere ?</a></h2>
+<p>
+ At least there is one freely available: Anthony's X Icon Library. You can
+ found it on several ftp servers, such as <a href="ftp://server.berkeley.edu/pub/AIcons">server.berkeley.edu/pub/AIcons</a>. It
+ contains only small icons (less than about 100x100 pixels in size) which are
+ stored in groups in a logical way. Color icons are stored in XPM format and
+ Black & White icons in XBM.
+
+
+<h2><a name="Q11">11. The documentation fails to print out. Why ?</a></h2>
+<p>
+ The PostScript documentation file is formatted for US letter paper. Frame
+ Maker tries very hard to ensure that you have the right paper and punts if
+ you don't. However, you can easily work around this problem by applying the
+ following patch. If for some reason applying the patch fails, you can still
+ do it by hand. Just locate the corresponding block in the PS file and remove
+ the lines with a leading '-' character.
+ By the way, this applies to any doc generated by Frame Maker. The
+ corresponding block might be slightly different depending on which version of
+ Frame Maker was used, but it is still easy to locate.
+
+<pre>
+*** xpm.PS Wed Sep 11 15:47:43 1996
+--- xpm-A4.PS Thu Nov 21 09:27:28 1996
+***************
+*** 647,668 ****
+ 0 ne /edown exch def
+ /yscale exch def
+ /xscale exch def
+- FMLevel1 {
+- manualfeed {setmanualfeed} if
+- /FMdicttop countdictstack 1 add def
+- /FMoptop count def
+- setpapername
+- manualfeed {true} {papersize} ifelse
+- {manualpapersize} {false} ifelse
+- {desperatepapersize} {false} ifelse
+- { (Can't select requested paper size for Frame print job!) FMFAILURE } if
+- count -1 FMoptop {pop pop} for
+- countdictstack -1 FMdicttop {pop end} for
+- }
+- {{1 dict dup /PageSize [paperwidth paperheight]put setpagedevice}stopped
+- { (Can't select requested paper size for Frame print job!) FMFAILURE } if
+- {1 dict dup /ManualFeed manualfeed put setpagedevice } stopped pop }
+- ifelse
+
+ FMPColor {
+ currentcolorscreen
+--- 647,652 ----
+</pre>
+
+
+<hr>
+<h2><a name="copy">Copyright (C) 1989-95 GROUPE BULL</a></h2>
+<p>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+<p>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+<p>
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+<p>
+Except as contained in this notice, the name of GROUPE BULL shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from GROUPE BULL.
+</body>
+</html>
diff --git a/libXpm/doc/Makefile.am b/libXpm/doc/Makefile.am
new file mode 100644
index 000000000..5119700b4
--- /dev/null
+++ b/libXpm/doc/Makefile.am
@@ -0,0 +1,6 @@
+EXTRA_DIST = \
+ xpm.PS.gz \
+ FAQ.html \
+ README.AMIGA \
+ README.html \
+ README.MSW
diff --git a/libXpm/doc/README.AMIGA b/libXpm/doc/README.AMIGA
new file mode 100644
index 000000000..7a40137dd
--- /dev/null
+++ b/libXpm/doc/README.AMIGA
@@ -0,0 +1,10 @@
+The XPM library for Amiga works best with AmigaOS 3.x, but will work
+(with limited color support) with earlier OS versions too. It can be
+compiled with both SAS/C and GCC (makefiles are included).
+
+All functions except the Xpm*Pixmap* functions are supported.
+
+I have also written some Amiga-specific utility functions (not
+included). Contact me if you would like to have them too.
+
+-Lorens Younes (d93-hyo@nada.kth.se)
diff --git a/libXpm/doc/README.MSW b/libXpm/doc/README.MSW
new file mode 100644
index 000000000..f6315256e
--- /dev/null
+++ b/libXpm/doc/README.MSW
@@ -0,0 +1,127 @@
+
+README.MSW hedu@cul-ipn.uni-kiel.de 5/94
+
+ The XPM library for MS-Windows
+
+Motivated by the wxWindows library, which is a (freely available) toolkit
+for developing multi-platform, graphical applications from the same body
+of C++ code, I wanted to have XPM pixmaps for MS-windows. Instead of rewriting
+a XPM-parser I managed to port the XPM-library-code to MS-windows.
+Thanks to Anaud Le Hors this became a part of the official XPM-library.
+
+Until now it's only used together with wxWindows. And even there it's more
+a kind of beta. But it should be possible to run it as a simple libxpm.a
+without wxWindows.
+
+The key is a transformation of some X types plus some basic X functions.
+There is not yet a special MSW-API, so you should know the X types used.
+
+The following is done in simx.h:
+
+typedef HDC Display;
+typedef COLORREF Pixel;
+
+typedef struct {
+ Pixel pixel;
+ BYTE red, green, blue;
+} XColor;
+
+typedef struct {
+ HBITMAP bitmap;
+ unsigned int width;
+ unsigned int height;
+ unsigned int depth;
+} XImage;
+
+With these defines and the according functions from simx.c you can call
+XPM-functions the way it's done under X windows. It can look like this:
+
+ ErrorStatus=XpmCreateImageFromData(&dc, data,
+ &ximage,(XImage **)NULL, &xpmAttr);
+ ms_bitmap = ximage->bitmap;
+ // releases the malloc,but do not destroy the bitmap
+ XImageFree(ximage);
+
+Supported functions are the Xpm*Image* but not the Xpm*Pixmap*.
+
+DRAWBACKS:
+The main drawback is the missing support for Colormaps! There was nothing for
+it in wxWindows, so I did not know how to deal with Colormaps.
+
+The size of the pixmaps is bounded by malloc() (width*height*2 < 64K).
+
+Close colors do not look that close. But that seems to be the window system.
+
+Neither a special API for MSW nor a special MSW documentation other than this.
+(I can only point you to wxxpm as an example , see below.)
+
+INSTALLATION:
+There is not yet a makefile with it. Simply take all the *.c files
+into your project except the files related to Pixmap operations: *P*.c.
+!!!You MUST set FOR_MSW on the preprocessor options!!!
+(You might uncomment NEED_STRCASECMP in xpm.h if it's in your lib)
+This should compile into libxpm.a. Good luck...
+
+FTP:
+wxWindows is currently available from the Artificial Intelligence
+Applications Institute (University of Edinburgh) by anonymous FTP.
+ skye.aiai.ed.ac.uk pub/wxwin/
+or read http://burray.aiai.ed.ac.uk/aiai/aiai.html
+
+wxxpm, XPM support for wxWindows, the latest version is available at
+ yoda.cul-ipn.uni-kiel.de pub/wxxpm/
+ and maybe in the contrib or tools of wxWindows
+
+Please contact me if you have suggestions, comments or problems!
+
+================================================================
+Some fixes and comments by Jan Wielemaker (jan@swi.psy.uva.nl),
+Oct 24, 1996:
+
+ * Please try not to disturb me on this, XPM is not my
+ piece of cake.
+
+ * Hermann Dunkel has appearently moved in virtual space.
+
+Changes:
+
+ * I've used the xpm package under NT 4.0 and MSVC++ 4.2.
+
+ * I've made a big performance improvement in
+ ParseAndPutPixels(), fixed creation of the mask in
+ SetColor() in create.c. I looked into XCreateImage()
+ in simx.c, but commented out my improvement for reasons
+ you'll find there. If you know what is going on, statement
+ (1) does not apply to you.
+
+Comments on installation:
+
+ * Donot include the to/from pixmap files into the project.
+ These are the ones containing a capital P somewhere in their
+ name. You can also first include all, and then remove all
+ the files you get errors on :-)
+
+ * The DC that is requested should be a valid memory DC, thus
+ CreateCompatibleDC(NULL) provides a good generic one, but
+ GetDC(NULL) doesn't! This costed me some time.
+
+ * The real difficulty is using the mask, mostly due to the
+ bad documentation. If 95 or NT is your target, use:
+
+ MaskBlt(context.hdc, // Destination DC
+ x, y, w, h, // Destination area
+ mhdc, // Memory DC with the image selected
+ sx, sy, // Source X,Y
+ msk, // HBITMAP of the mask
+ sx, sy, // Mask X,Y
+ MAKEROP4(SRCPAINT, SRCCOPY)); // The magic op code.
+================================================================
+
+
+--
+ ////|\\\\ \\\\\\ Hermann Dunkel
+ O O ////// IPN Uni Kiel, Germany
+ | \\\\\\ Tel: +49 431 / 880 3144
+ \___/ ////// E-mail: hedu@cul-ipn.uni-kiel.de
+ \_/ \\\\\\ X.400 : c=de;a=d400;p=uni-kiel;ou=nw-didaktik;s=dunkel
+
diff --git a/libXpm/doc/README.html b/libXpm/doc/README.html
new file mode 100644
index 000000000..6711f23b3
--- /dev/null
+++ b/libXpm/doc/README.html
@@ -0,0 +1,303 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<TITLE>XPM README</TITLE>
+</HEAD>
+
+<body>
+<h1 align="center">XPM README</h1>
+
+<h2>Contents</h2>
+
+<ol>
+<li><a href="#sec1">What Is XPM?</a>
+<li><a href="#sec2">Where to get XPM?</a>
+<li><a href="#sec3">Documentation</a>
+<li><a href="#sec4">Installation</a>
+<ol>
+<li><a href="#sec4.1">With imake</a>
+<li><a href="#sec4.2">Without imake</a>
+</ol>
+<li><a href="#sec5">SXPM</a>
+<li><a href="#sec6">CXPM</a>
+<li><a href="#sec7">Other Tools</a>
+<li><a href="#sec8">Discussion</a>
+<li><a href="#copy">Copyright</a>
+</ol>
+
+
+<h2><a name="sec1">1. What Is XPM?</a></h2>
+<p>
+XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.
+<p>
+Here is provided a library containing a set of four functions, similar to the
+X bitmap functions as defined in the Xlib: <code>XpmCreatePixmapFromData</code>,
+<code>XpmCreateDataFromPixmap</code>, <code>XpmReadFileToPixmap</code> and <code>XpmWriteFileFromPixmap</code> for
+respectively including, storing, reading and writing this format, plus four
+other: <code>XpmCreateImageFromData</code>, <code>XpmCreateDataFromImage</code>, <code>XpmReadFileToImage</code> and
+<code>XpmWriteFileFromImage</code> for working with images instead of pixmaps.
+<p>
+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.
+<p>
+See the XPM Manual for details.
+
+
+<h2><a name="sec2">2. Where to get XPM?</a></h2>
+<p>
+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 <a
+href="http://www.inria.fr/koala/lehors/xpm.html">http://www.inria.fr/koala/lehors/xpm.html</a>
+<p>The latest "official" XPM release can always be found at:
+<br>Boston, USA: <a
+href="ftp://ftp.x.org/contrib">ftp://ftp.x.org/contrib</a>
+<br>Sophia Antipolis, France: <a
+href="ftp://koala.inria.fr/pub/xpm">ftp://koala.inria.fr/pub/xpm</a>
+
+
+<h2><a name="sec3">3. Documentation</a></h2>
+<p>
+Old users might read the <a href="CHANGES">CHANGES</a> file for a history
+of changes interesting the user.
+<p>
+Read the doc. The documentation is in PostScript format (<a
+href="doc/xpm.PS">doc/xpm.PS</a>) and has been produced with
+FrameMaker. The source files are available on request.
+<p>
+A <a href="FAQ.html">FAQ</a> (Frequently Asked Questions) is also provided,
+so if you experience any problem you should have a look at this file.
+
+
+<h2><a name="sec4">4. Installation</a></h2>
+<p>
+To obtain the XPM library, first uncompress and untar the compressed tar file
+in an appropriate directory.
+<p>
+Then you can either compile XPM via "imake" or in a stand-alone way.
+
+<h3><a name="sec4.1">4.1. With imake</a></h3>
+<p>
+ 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.
+<p>
+ 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.
+<p>
+ 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/bin/cc and not /usr/ucb/cc.
+ Also since the compiler is no longer part of the OS distribution a lot
+ of people use gcc instead. This is fine, but be aware that the imake
+ tool you get as part of the X Window System on a solaris box is
+ configured for cc. Therefore the compilation using the generated
+ Makefiles will not succeed unless you have changed the default
+ configuration. An easy work around is to directly edit the generated
+ lib/Makefile to change '-K pic' to '-fpic'. Fixing your imake
+ configuration would be better though.
+<p>
+ On Linux, if you do not use ELF yet you'd better get the binary
+ distribution available from sunsite. Because it's really a pain to
+ build a shared lib and the current XPM distribution doesn't contain
+ the jump files you would need to do so. On the other hand people have
+ had no problems building it using ELF.
+<p>
+ Then execute the following command:
+<pre>
+ xmkmf -a
+</pre>
+<p>
+ or if this option is not supported by your version of xmkmf:
+<pre>
+ xmkmf
+ make Makefiles
+ make includes
+ make depend (optional)
+</pre>
+<p>
+ Then simply execute:
+<pre>
+ make
+</pre>
+<p>
+ which will build the XPM library and the sxpm application.
+ Then do:
+<pre>
+ make install
+ make install.man
+</pre>
+<p>
+ which will install the library and the sxpm program and man page.
+<p>
+ If it fails, be sure you have set the DEFINES correctly in the top
+ Imakefile to suit your machine.
+
+<h4>NOTE ON USING IMAKE:</h4>
+<p>
+ Building the XPM distribution with imake requires to have imake
+ <strong>correctly installed and configured</strong> on your
+ system. I do my best at tweaking the Imakefiles so they work with
+ as many imake flavors people might have as possible but there is
+ nothing I can do against wrong imake configurations. So if your
+ build fails using imake, don't send me email for advice. Get your
+ imake configuration fixed or forget about it!
+
+
+<h3><a name="sec4.2">4.2. Without imake</a></h3>
+<p>
+ A set of makefiles is provided for those who do not have imake
+ available on their system. However, this is only provided as a
+ convenience and you should be considered as a starting point and not as
+ something ready to use. These makefiles, called Makefile.noX, will most
+ likely require some editing in order be set accordingly to your system.
+<p>
+ Once this setting is done, you should be able to compile XPM, by
+ executing the following command:
+<pre>
+ make -f Makefile.noX
+</pre>
+<p>
+ Then to install it, do:
+<pre>
+ make -f Makefile.noX install
+</pre>
+
+
+<h2><a name="sec5">5. SXPM</a></h2>
+<p>
+In addition to the library the sxpm tool is provided to show XPM file and
+convert them from XPM1 or XPM2 to XPM version 3. If you have previously done
+'make' or 'make all' you should already have it, otherwise just do:
+<pre>
+ cd sxpm; make
+</pre>
+<p>
+This application shows you most of the features of XPM and its source can be
+used to quickly see how to use the provided functions.
+<p>
+By executing 'sxpm -help' you will get the usage.
+<p>
+Executing 'sxpm -plaid' will show a demo of the XpmCreatePixmapFromData
+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.
+<p>
+Executing 'sxpm -plaid -sc lines_in_mix blue' will show the feature of
+overriding color symbols giving a colorname, executing 'sxpm -plaid -sp
+lines_in_mix 1' will show overriding giving a pixel value, and executing 'sxpm
+-plaid -cp red 0' will show overriding giving a color value.
+<p>
+Then you should try 'sxpm -plaid -o output' to get an output file using the
+XpmWriteFileFromPixmap function.
+<p>
+You can now try 'sxpm -plaid -o - -nod -rgb /usr/lib/X11/rgb.txt' to directly
+get the pixmap printed out on the standard output with colornames instead of
+rgb values.
+<p>
+Then you should try 'sxpm plaid.xpm' to use the XpmReadFileToPixmap function,
+and 'cat plaid_mask.xpm|sxpm' to see how "transparent pixels" are handled.
+<p>
+The XpmCreatePixmapFromData function is on purpose called without any XpmInfos
+flag to show the utility of this one. Indeed, compare the color section of the
+two files foo and bar obtained from 'sxpm -nod -plaid -o foo' and 'sxpm -nod
+plaid.xpm -o bar'. All the default colors and also the comments have been
+restored.
+<p>
+To end look at plaid_ext.xpm and try "sxpm -nod plaid_ext.xpm -v" to see how
+extensions are handled.
+<p>
+Of course, other combinations are allowed and should be tried. Thus, 'sxpm
+plaid.xpm -o output -nod' will show you how to convert a file from XPM1 or XPM2
+to a XPM version 3 using sxpm.
+<p>
+See the manual page for more detail.
+
+
+<h2><a name="sec6">6. CXPM</a></h2>
+<p>
+The cxpm tool is provided to help you figure out whether an XPM file is correct
+or not with regard to its format. If you have previously done 'make' or
+'make all' you should already have it, otherwise just do:
+<pre>
+ cd cxpm; make
+</pre>
+<p>
+The related man page will tell you everything about it but here is a simple
+example of what it does:
+<pre>
+$ ./cxpm bogus_pixmap
+Xpm Error: Invalid XPM file.
+Error found line 3 near character 5
+</pre>
+<p>
+It is pretty limited but at least, unlike sxpm, it gives you some hint on where
+the error occured within the file.
+
+
+<h2><a name="sec7">7. Other Tools</a></h2>
+<p>
+Several converters dealing with XPM and a pixmap editor can be found in the
+xpm-contrib distribution. Also I recommend the use of netpbm to do any kind of
+general image operations such as scaling, resizing, dithering, and to convert
+from and to any other image format.
+
+<h2><a name="sec8">8. Discussion</a></h2>
+<p>
+There is a mailing list to discuss about XPM which is <a
+href="mailto:xpm-talk@sophia.inria.fr">xpm-talk@sophia.inria.fr</a>.
+Any request to subscribe should be sent to <a
+href="mailto:xpm-talk-request@sophia.inria.fr">xpm-talk-request@sophia.inria.fr</a>.
+The archive of the xpm-talk list is available through the web at
+<a
+href="http://zenon.inria.fr/koala/xpm-talk-hypermail">http://zenon.inria.fr/koala/xpm-talk-hypermail</a>
+and through ftp at <a
+href="ftp://koala.inria.fr/pub/xpm/xpm-talk-archive">ftp://koala.inria.fr/pub/xpm/xpm-talk-archive</a>
+<p>
+Please mail any bug reports or modifications done, comments, suggestions,
+requests for updates or patches to port on another machine to:
+
+<p>Email: <a href="lehors@sophia.inria.fr">lehors@sophia.inria.fr</a>
+<br>Phone: +33 (0)4 93 65 78 89
+<br>Surface Mail:<br>
+Arnaud Le Hors<br>
+Inria BP.93<br>
+2004, Route des lucioles<br>
+06902 Sophia Antipolis Cedex<br>
+FRANCE
+
+
+<hr>
+<h2><a name="copy">Copyright (C) 1989-95 GROUPE BULL</a></h2>
+<p>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+<p>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+<p>
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+<p>
+Except as contained in this notice, the name of GROUPE BULL shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from GROUPE BULL.
+</body>
diff --git a/libXpm/doc/xpm.PS.gz b/libXpm/doc/xpm.PS.gz
new file mode 100644
index 000000000..40e25de9d
--- /dev/null
+++ b/libXpm/doc/xpm.PS.gz
Binary files differ