home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / x / x11r6-ch / xpm-3.4 / xpm-3 / xpm-3.4c / README < prev    next >
Text File  |  1994-06-06  |  7KB  |  191 lines

  1. /*
  2.  * Copyright (C) 1989-94 GROUPE BULL
  3.  *
  4.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  5.  * of this software and associated documentation files (the "Software"), to
  6.  * deal in the Software without restriction, including without limitation the
  7.  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8.  * sell copies of the Software, and to permit persons to whom the Software is
  9.  * furnished to do so, subject to the following conditions:
  10.  *
  11.  * The above copyright notice and this permission notice shall be included in
  12.  * all copies or substantial portions of the Software.
  13.  *
  14.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17.  * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  18.  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  19.  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20.  *
  21.  * Except as contained in this notice, the name of GROUPE BULL shall not be
  22.  * used in advertising or otherwise to promote the sale, use or other dealings
  23.  * in this Software without prior written authorization from GROUPE BULL.
  24.  */
  25.  
  26.  
  27.                 XPM Version 3
  28.  
  29. WHAT IS XPM?
  30. ============
  31.  
  32. XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.
  33.  
  34. Here is provided a library containing a set of four functions, similar to the
  35. X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData,
  36. XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap for
  37. respectively including, storing, reading and writing this format, plus four
  38. other: XpmCreateImageFromData, XpmCreateDataFromImage, XpmReadFileToImage and
  39. XpmWriteFileFromImage for working with images instead of pixmaps.
  40.  
  41. This new version provides a C includable format, defaults for different types
  42. of display: monochrome/color/grayscale, hotspot coordinates and symbol names
  43. for colors for overriding default colors when creating the pixmap. It provides
  44. a mechanism for storing information while reading a file which is re-used
  45. while writing. This way comments, default colors and symbol names aren't lost.
  46. It also handles "transparent pixels" by returning a shape mask in addition to
  47. the created pixmap.
  48.  
  49. See the XPM Manual for more details.
  50.  
  51. HOW TO GET XPM?
  52. ===============
  53.  
  54. New xpm updates are announced on the comp.windows.x newsgroup, and on the
  55. "xpm-talk" list. All new "official" xpm releases can be found by ftp on:
  56.  
  57.     ftp.x.org          (18.112.44.100) contrib     (Boston, USA)
  58.     avahi.inria.fr     (192.5.60.47) pub     (Sophia Antipolis, France)
  59.  
  60.  
  61. DOCUMENTATION:
  62. =============
  63.  
  64. Old users might read the CHANGES file for a history of changes interesting
  65. the user.
  66.  
  67. Read the doc. The documentation is in PostScript format (file doc/xpm.ps) and
  68. has been produced with FrameMaker. The source files are available on request.
  69.  
  70.  
  71. INSTALLATION:
  72. ============
  73.  
  74. To obtain the XPM library, first uncompress and untar the compressed tar file
  75. in an approriate directory.
  76.  
  77. Then you can either compile xpm via "imake" or in a stand-alone way.
  78.  
  79. WITH IMAKE:
  80.  
  81.     Imakefiles are provided to build both shared and unshared libraries.
  82.     First have a look at the beginning of the lib/Imakefile and see if you
  83.     need to do some modification to fit with your system.
  84.     Then execute the following commands:
  85.  
  86.         xmkmf -a
  87.         make
  88.  
  89.     which will build the XPM library and the sxpm application. 
  90.     Then do:
  91.  
  92.              make install
  93.         make install.man
  94.  
  95.     which will install the library and the sxpm pregram and man page.
  96.  
  97.     If it fails, you may edit the Imakefiles to add compilation flags to
  98.     suit your machine.
  99.  
  100. WITHOUT IMAKE:
  101.  
  102.     To compile xpm, in the xpm directory you just created, do:
  103.  
  104.             make -f Makefile.noX
  105.  
  106.     Then to install it, do:
  107.  
  108.         make -f Makefile.noX install
  109.  
  110. SXPM:
  111. ====
  112.  
  113. In addition to the library the sxpm tool is provided to show XPM file and
  114. convert them from XPM1 or XPM2 to XPM version 3. If you have previously done
  115. 'make' or 'make all' you should have it yet, otherwise just do:
  116.  
  117.               cd sxpm; make
  118.  
  119. This application shows you most of the features of XPM and its source can be
  120. used to quickly see how to use the provided functions.
  121.  
  122. By executing 'sxpm -help' you will get the usage.
  123.  
  124. Executing 'sxpm -plaid' will show a demo of the XpmCreatePixmapFromData
  125. function. The pixmap is created from the static variable plaid defined in the
  126. sxpm.c file. sxpm will end when you press the key 'q' in the created window.
  127.  
  128. Executing 'sxpm -plaid -sc lines_in_mix blue' will show the feature of
  129. overriding color symbols giving a colorname, executing 'sxpm -sp lines_in_mix
  130. 1' will show overriding giving a pixel value, and executing 'sxpm -plaid -cp
  131. red 0' will show overriding giving a color value.
  132.  
  133. Then you should try 'sxpm -plaid -o output' to get an output file using the
  134. XpmWriteFileFromPixmap function.
  135.  
  136. You can now try 'sxpm -plaid -o - -nod -rgb /usr/lib/X11/rgb.txt' to directly
  137. get the pixmap printed out on the standard output with colornames instead of
  138. rgb values.
  139.  
  140. Then you should try 'sxpm plaid.xpm' to use the XpmReadFileToPixmap function,
  141. and 'cat plaid_mask.xpm|sxpm' to see how "transparent pixels" are handled.
  142.  
  143. The XpmCreatePixmapFromData function is on purpose called without any XpmInfos
  144. flag to show the utility of this one. Indeed, compare the color section of the
  145. two files foo and bar obtained from 'sxpm -nod -plaid -o foo' and 'sxpm -nod
  146. plaid.xpm -o bar'. All the default colors and also the comments have been
  147. restored.
  148.  
  149. To end look at plaid_ext.xpm and try "sxpm -nod plaid_ext.xpm -v" to see how
  150. extensions are handled.
  151.  
  152. Of course, other combinations are allowed and should be tried. Thus, 'sxpm
  153. plaid.xpm -o output -nod' will show you how to convert a file from XPM1 or XPM2
  154. to a XPM version 3 using sxpm.
  155.  
  156. See the manual page for more detail.
  157.  
  158. OTHER TOOLS:
  159. ===========
  160.  
  161. Several converters dealing with XPM and a pixmap editor can be found in the
  162. xpm-contrib distribution. Also I recommend the use of netpbm to do any kind of
  163. general image operations such as scaling, resizing, dithering, and to convert
  164. from and to any other image format.
  165.  
  166. DISCUSSION:
  167. ==========
  168.  
  169. There is a mailing list to discuss about XPM which is xpm-talk@sophia.inria.fr.
  170. Any request to subscribe should be sent to xpm-talk-request@sophia.inria.fr.
  171.  
  172. COPYRIGHT:
  173. ==========
  174.  
  175.   Copyright 1989-94 GROUPE BULL --
  176.   See license conditions in the COPYRIGHT file of the XPM distribution
  177.  
  178. Please mail any bug reports or modifications done, comments, suggestions,
  179. requests for updates or patches to port on another machine to:
  180.  
  181. lehors@sophia.inria.fr        (INTERNET)
  182.  
  183. 33 (FRANCE) 93.65.77.71        (VOICE PHONE)
  184.  
  185. Arnaud Le Hors            (SURFACE MAIL)
  186. Bull c/o Inria BP. 109
  187. 2004, Route des lucioles
  188. Sophia Antipolis
  189. 06561 Valbonne Cedex
  190. FRANCE
  191.