home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netpbma.zip / vms / PBMplus.hlp < prev    next >
Text File  |  1994-02-28  |  234KB  |  6,815 lines

  1. 1 HELP
  2.         See PBMplus and OVERVIEW.
  3.  
  4. 1 OVERVIEW
  5.         Enhanced portable bitmap  toolkit.  The PBMPLUS toolkit allows
  6.     conversions between image files  of different format.  By means of
  7.     using common intermediate formats, only  2  * N conversion filters
  8.     are required to support N distinct  formats,  instead  of the N**2
  9.     which would be required to convert directly between any one format
  10.     and  any  other.    The  package also includes  simple  tools  for
  11.     manipulating portable bitmaps.
  12.  
  13.         The package consists of four upwardly compatible sections:
  14.         
  15.     pbm     Supports monochrome bitmaps (1 bit per pixel).
  16.  
  17.     pgm     Supports grayscale  images.    Reads  either  PBM  or  PGM
  18.             formats and writes PGM format.
  19.  
  20.     ppm     Supports full-color images.  Reads either PBM, PGM, or PPM
  21.             formats, writes PPM format.
  22.  
  23.     pnm     Supports content-independent manipulations on any  of  the
  24.             three formats listed above, as well  as  external  formats
  25.             having  multiple  types.  Reads either PBM,  PGM,  or  PPM
  26.             formats,  and  generally writes the same type as  it  read
  27.             (whenever a PNM tool makes an exception and ``promotes'' a
  28.             file to a higher format, it informs the user).
  29.  
  30.         See PBMplus for more infomation.
  31.  
  32. 1 PBMplus
  33.         Enhanced portable bitmap  toolkit.  The PBMPLUS toolkit allows
  34.     conversions between image files  of different format.  By means of
  35.     using common intermediate formats, only  2  * N conversion filters
  36.     are required to support N distinct  formats,  instead  of the N**2
  37.     which would be required to convert directly between any one format
  38.     and  any  other.    The  package also includes  simple  tools  for
  39.     manipulating portable bitmaps.
  40.  
  41.         The package consists of four upwardly compatible sections:
  42.         
  43.     pbm     Supports monochrome bitmaps (1 bit per pixel).
  44.  
  45.     pgm     Supports grayscale  images.    Reads  either  PBM  or  PGM
  46.             formats and writes PGM format.
  47.  
  48.     ppm     Supports full-color images.  Reads either PBM, PGM, or PPM
  49.             formats, writes PPM format.
  50.  
  51.     pnm     Supports content-independent manipulations on any  of  the
  52.             three formats listed above, as well  as  external  formats
  53.             having  multiple  types.  Reads either PBM,  PGM,  or  PPM
  54.             formats,  and  generally writes the same type as  it  read
  55.             (whenever a PNM tool makes an exception and ``promotes'' a
  56.             file to a higher format, it informs the user).
  57.  
  58. 2 Description_of_Contents
  59.         A brief,  one-line  description  of  each  of  the  individual
  60.     programs in the PBMplus package.  They are sorted by general type.
  61.  
  62. 3 pbm
  63.     atktopbm    convert Andrew Toolkit raster object to portable bitmap
  64.     brushtopbm  convert Xerox doodle brushes to portable bitmap
  65.     cmuwmtopbm  convert CMU window manager format to portable bitmap
  66.     g3topbm     convert Group 3 FAX to portable bitmap
  67.     icontopbm   convert Sun icon to portable bitmap
  68.     gemtopbm    convert GEM .img format to portable bitmap
  69.     macptopbm   convert MacPaint to portable bitmap
  70.     mgrtopbm    convert MGR format to portable bitmap
  71.     pktopbm     convert packed (PK) format font into portable bitmap(s)
  72.     pbmmerge    merge wrapper routine
  73.     pbmto10x    convert portable bitmap to Gemini 10x printer graphics
  74.     pbmto4425   convert portable bitmap to AT&T 4425 terminal
  75.     pbmtoascii  convert portable bitmap to ASCII graphic form
  76.     pbmtoatk    convert portable bitmap to Andrew Toolkit raster object
  77.     pbmtobbnbg  convert portable bitmap to BBN BitGraph graphics
  78.     pbmtocmuwm  convert portable bitmap to CMU window manager format
  79.     pbmtoepson  convert portable bitmap to Epson printer graphics
  80.     pbmtog3     convert portable bitmap to Group 3 FAX
  81.     pbmtogem    convert portable bitmap into GEM .img file
  82.     pbmtogo     convert portable bitmap to GraphOn graphics
  83.     pbmtoicon   convert portable bitmap to Sun icon
  84.     pbmtolj     convert portable bitmap to HP LaserJet graphics
  85.     pbmtoln03   convert portable bitmap to DEC LN03+ Laserprinter
  86.     pbmtolps    convert portable bitmap to PostScript
  87.     pbmtomacp   convert portable bitmap to MacPaint
  88.     pbmtomgr    convert portable bitmap to MGR format
  89.     pbmtopgm    convert portable bitmap to portable graymap by ave. areas
  90.     pbmtopi3    convert portable bitmap to Atari Degas .pi3
  91.     pbmtopk     convert portable bitmap into a packed (PK) format font
  92.     pbmtoplot   convert portable bitmap into Unix plot(5) file
  93.     pbmtoptx    convert portable bitmap to Printronix graphics
  94.     pbmtoxbm    convert portable bitmap to X11 bitmap
  95.     pbmtox10bm  convert portable bitmap to X10 bitmap
  96.     pbmtoybm    convert portable bitmap into Bennet Yee "face" file
  97.     pbmtozinc   convert portable bitmap to Zinc Interface Library icon
  98.     pbmtoepsi   convert portable bitmap into an encapsulated PostScript
  99.     pi3topbm    convert Atari Degas .pi3 to portable bitmap
  100.     xbmtopbm    convert X10 or X11 bitmap to portable bitmap
  101.     ybmtopbm    convert Bennet Yee "face" file into portable bitmap
  102.  
  103.     pbmclean    flip isolated pixels in portable bitmap
  104.     pbmlife     apply Conway's rules of Life to a portable bitmap
  105.     pbmmake     create a blank bitmap of a specified size and color
  106.     pbmmask     create a mask bitmap from a regular bitmap
  107.     pbmreduce   reduce a portable bitmap N times, using Floyd-Steinberg
  108.     pbmspcale   enlarge a portable bitmap with edge smoothing
  109.     pbmtext     render text into a bitmap
  110.     pbmupc      create a Universal Product Code bitmap
  111.  
  112. 3 pgm
  113.     asciitopgm  convert ASCII graphics into a portable graymap
  114.     fstopgm     convert Usenix FaceSaver format to portable graymap
  115.     hipstopgm   convert HIPS format to portable graymap
  116.     lispmtopgm  convert a Lisp Machine bitmap file into pgm format
  117.     bioradtopgm convert a Biorad confocal file into a portable graymap
  118.     psidtopgm   convert PostScript "image" data to portable graymap
  119.     rawtopgm    convert raw grayscale bytes to portable graymap
  120.     spottopgm   convert SPOT satellite images to Portable Greymap format
  121.     pgmtofs     convert portable graymap to Usenix FaceSaver format
  122.     pgmtolispm  convert a portable graymap into Lisp Machine format
  123.     pgmtopbm    convert portable graymap to portable bitmap
  124.  
  125.     pgmbentley  Bentleyize a portable graymap
  126.     pgmcrater   create cratered terrain by fractal forgery
  127.     pgmedge     edge-detect a portable graymap
  128.     pgmenhance  edge-enhance a portable graymap
  129.     pgmhist     print a histogram of the values in a portable graymap
  130.     pgmkernel   generate a convolution kernel
  131.     pgmmerge    merge wrapper routine
  132.     pgmnoise    create a graymap made up of white noise
  133.     pgmnorm     normalize contrast in a portable graymap
  134.     pgmoil      turn a portable graymap into an oil painting
  135.     pgmramp     generate a grayscale ramp
  136.     pgmtexture  calculate textural features on a portable graymap
  137.  
  138. 3 ppm
  139.     bmptoppm    convert BMP file to portable pixmap
  140.     gouldtoppm  convert Gould scanner file to portable pixmap
  141.     ilbmtoppm   convert IFF ILBM to portable pixmap
  142.     imgtoppm    convert Img-whatnot to portable pixmap
  143.     mtvtoppm    convert MTV ray-tracer output to portable pixmap
  144.     pcxtoppm    convert PC Paintbrush format to portable pixmap
  145.     pgmtoppm    colorize a portable graymap into a portable pixmap
  146.     pi1toppm    convert Atari Degas .pi1 to portable pixmap
  147.     picttoppm   convert Macintosh PICT to portable pixmap
  148.     pjtoppm     convert HP PaintJet file to portable pixmap
  149.     ppmtoacad   convert portable pixmap to AutoCAD database or slide
  150.     ppmtobmp    convert portable pixmap to BMP file
  151.     ppmtogif    convert portable pixmap to GIF
  152.     ppmtoicr    convert portable pixmap to NCSA ICR graphics
  153.     ppmtoilbm   convert portable pixmap to IFF ILBM
  154.     ppmtomitsu  convert a portable pixmap to a Mitsubishi S340-10 file
  155.     ppmtomap    extract all colors from a portable pixmap
  156.     ppmtopcx    convert portable pixmap to PC Paintbrush format
  157.     ppmtopgm    convert portable pixmap to portable graymap
  158.     ppmtopi1    convert portable pixmap to Atari Degas .pi1
  159.     ppmtopict   convert portable pixmap to Macintosh PICT
  160.     ppmtopj     convert portable pixmap to HP PaintJet file
  161.     ppmtopjxl   convert portable pixmap to HP PaintJet XL PCL file
  162.     ppmtopuzz   convert portable pixmap to X11 "puzzle" file
  163.     ppmtorgb3   separate a portable pixmap to three portable graymaps
  164.     ppmtosixel  convert portable pixmap to DEC sixel format
  165.     ppmtotga    convert portable pixmap to TrueVision Targa file
  166.     ppmtouil    convert portable pixmap to Motif UIL icon file
  167.     ppmtoxpm    convert portable pixmap to XPM format
  168.     ppmtoyuv    convert portable pixmap to Abekas YUV format
  169.     qrttoppm    convert QRT ray-tracer output to portable pixmap
  170.     rawtoppm    convert raw RGB bytes to portable pixmap
  171.     rgb3toppm   combine three portable graymaps to one portable pixmap
  172.     sldtoppm    convert an AutoCAD slide file into a portable pixmap
  173.     spctoppm    convert Atari compressed Spectrum to portable pixmap
  174.     sputoppm    convert Atari uncompressed Spectrum to portable pixmap
  175.     tgatoppm    convert TrueVision Targa file to portable pixmap
  176.     ximtoppm    convert Xim to portable pixmap
  177.     xpmtoppm    convert XPM format to portable pixmap
  178.     xvminitoppm convert a XV "thumbnail" picture to PPM
  179.     yuvtoppm    convert Abekas YUV format to portable pixmap
  180.  
  181.     ppm3d       convert 2 portable pixmap to a red/blue 3d glasses pixmap
  182.     ppmbrighten change images Saturation and Value from an HSV map
  183.     ppmchange   change pixels of one color to another in a portable pixmap
  184.     ppmdim      dim a portable pixmap down to total blackness
  185.     ppmdist     simple grayscale for machine generated, color images
  186.     ppmdither   ordered dither for color images
  187.     ppmflash    brighten a picture up to complete white-out
  188.     ppmforge    fractal forgeries of clouds, planets, and starry skies
  189.     ppmhist     print a histogram of a portable pixmap
  190.     ppmmake     create a pixmap of a specified size and color
  191.     ppmmix      blend together two portable pixmaps
  192.     ppmpat      create a pretty pixmap
  193.     ppmquant    quantize colors down to a specified number
  194.     ppmqvga     8 plane quantization
  195.     ppmrelief   run a Laplacian Relief filter on a portable pixmap
  196.     ppmshift    shift lines of a portable pixmap left or right by a
  197.                 random amount
  198.     ppmspread   displace a portable pixmap's pixels by a random amount
  199.  
  200. 3 pnm
  201.     pnmtoddif   convert portable anymap to DDIF format
  202.     pnmtofits   convert a portable anymap into FITS format
  203.     pnmtops     convert portable anymap to PostScript
  204.     pnmtorast   convert portable anymap to Sun raster file
  205.     pnmtotiff   convert portable anymap to TIFF file
  206.     pnmtoxwd    convert portable anymap to X11 window dump
  207.     fitstopnm   convert a FITS file into a portable anymap
  208.     rasttopnm   convert Sun raster file to portable anymap
  209.     tifftopnm   convert TIFF file to portable anymap
  210.     xwdtopnm    convert X10 or X11 window dump to portable anymap
  211.     pnmtosir    convert a portable anymap into a Solitaire format
  212.     sirtopnm    convert a Solitaire file into a portable anymap
  213.     zeisstopnm  convert a Zeiss confocal file into a portable anymap
  214.  
  215.     pnmalias    antialias a portable anyumap.
  216.     pnmarith    perform arithmetic on two portable anymaps
  217.     pnmcat      concatenate portable anymaps
  218.     pnmcomp     composite two portable anymap files together
  219.     pnmconvol   general MxN convolution on a portable anymap
  220.     pnmcrop     crop all like-colored borders off a portable anymap
  221.     pnmcut      select a rectangular region from a portable anymap
  222.     pnmdepth    change the maxval in a portable anymap
  223.     pnmenlarge  enlarge a portable anymap N times
  224.     pnmfile     describe a portable anymap
  225.     pnmflip     perform one or more flip operations on a portable anymap
  226.     pnmgamma    perform gamma correction on a portable anymap
  227.     pnmhistmap  draw a histogram for a PGM or PPM file
  228.     pnminvert   invert a portable anymap
  229.     pnmnlfilt   non-linear filters: smooth, alpha trim mean,
  230.                 optimal estimation smoothing, edge enhancement
  231.     pnmnoraw    force a portable anymap into ASCII format
  232.     pnmpad      add borders to portable anymap
  233.     pnmpaste    paste a rectangle into a portable anymap
  234.     pnmrotate   rotate a portable anymap
  235.     pnmscale    scale a portable anymap
  236.     pnmshear    shear a portable anymap
  237.     pnmtile     replicate a portable anymap into a specified size
  238.  
  239. 2 See_Also
  240.         There are a number of related image-manipulation tools:
  241.  
  242.     IM Raster Toolkit
  243.         A portable and efficient format toolkit.   The format supports
  244.     pixels  of  arbitrary  channels,  components, and bit  precisions,
  245.     while  allowing  compression  and machine byte-order independence.
  246.     Support for  image  manipulation,  digital  halftoning, and format
  247.     conversion.  Previously  distributed on tape c/o the University of
  248.     Waterloo (an ftp version is to appear later).  Author:  Alan Paeth
  249.     (awpaeth@watcgl.uwaterloo.ca).
  250.  
  251.     Utah RLE Toolkit
  252.         Conversion  and  manipulation  package,  similar  to  PBMPLUS.
  253.     Available  via  ftp  as  cs.utah.edu:   pub/toolkit-2.0.tar.Z  and
  254.     ucsd.edu:  graphics/utah-raster-toolkit.tar.Z.
  255.  
  256.     Fuzzy Pixmap Manipulation
  257.         Conversion  and  manipulation  package,  similar  to  PBMPLUS.
  258.     Version     1.0    available    via    ftp    as    nl.cs.cmu.edu:
  259.     /usr/mlm/ftp/fbm.tar.Z,  uunet.uu.net:        pub/fbm.tar.Z,   and
  260.     ucsd.edu:    graphics/fbm.tar.Z.       Author:    Michael  Mauldin
  261.     (mlm@nl.cs.cmu.edu).
  262.  
  263.     Img Software Set
  264.         Reads and  writes  its own image format, displaying results on
  265.     an X11 screen,  and does some image manipulations.  Version 1.3 is
  266.     available  via  ftp  as    ftp.x.org:contrib/img_1.3.tar.Z,    and
  267.     venera.isi.edu:pub/img_1.3.tar.Z, along with a large collection of
  268.     color images.  Author:  Paul Raveling (raveling@venera.isi.edu).
  269.  
  270.     Xim
  271.         Reads and writes its own image  format,  displays  on  an  X11
  272.     screen,  and  does some image manipulations.   Available  in  your
  273.     nearest  X11R4  source  tree  as it contrib/clients/xim.   A  more
  274.     recent version is available via ftp from video.mit.edu.   It  uses
  275.     X11R4 and the OSF/Motif toolkit to provide basic interactive image
  276.     manipulation  and  reads/writes GIF, xwd, xbm, tiff, rle, xim, and
  277.     other formats.  Author:  Philip R.  Thompson.
  278.  
  279.     xloadimage
  280.         Reads in images in various formats and displays them on an X11
  281.     screen.  Available  via  ftp as ftp.x.org:contrib/xloadimage*, and
  282.     in  your nearest comp.sources.x  archive.    Author:    Jim  Frost
  283.     (madd@std.com).
  284.  
  285.     TIFF Software
  286.         Nice portable library for reading and writing TIFF files, plus
  287.     a few tools for  manipulating  them  and  reading  other  formats.
  288.     Available    via    ftp    as   sgi.com:pub/graphics/*.tar.Z    or
  289.     uunet.uu.net:graphics/tiff.tar.Z. Author: Sam Leffler (sam@sgi.com).
  290.  
  291.     ALV
  292.         A  Sun-specific  image  toolkit.    Version  2.0.6  posted  to
  293.     comp.sources.sun on 11 December 1989.  Also available via email to
  294.     alv-users-request@cs.bris.ac.uk.
  295.  
  296.     popi
  297.         An  image  manipulation  language.    Version  2.1  posted  to
  298.     comp.sources.misc on 12 December 1989.
  299.  
  300.     ImageMagick
  301.         X11  package  for  display  and  interactive  manipulation  of
  302.     images.  Uses its own format (MIFF), and includes some converters.
  303.     Available via ftp as ftp.x.org:contrib/ImageMagick.tar.Z.
  304.  
  305.     Khoros
  306.         Huge  (~100  meg)  graphical  development environment based on
  307.     X11R4.    Components  include  a visual programming language, code
  308.     generators for  extending  the  visual  language  and  adding  new
  309.     application packages to  the system, an interactive user interface
  310.     editor, an interactive image display package, an extensive library
  311.     of  image  and  signal processing  routines,  and  2D/3D  plotting
  312.     packages.  Available via ftp as pprg.unm.edu:pub/khoros/*.
  313.  
  314.     JPEG package
  315.         JPEG is a a standardized compression method for full-color and
  316.     gray-scale  images  of "real-world"  scenes;    this  experimental
  317.     package includes programs to compress  gif and ppm format files to
  318.     JPEG  format  ( cjpeg(1L)), and to  decompress  them  (djpeg(1L)).
  319.     Available by ftp as uunet.uu.net:graphics/jpeg/jpegsrc.v1.tar.Z.
  320.  
  321.         libpbm(3L),  libpgm(3L),    libpnm(3L),  libppm(3L),  pbm(5L),
  322.     pgm(5L), pnm(5L), ppm(5L), rasterfile(1)
  323.  
  324. 2 Author
  325.         Distribution of 1 December 1991.   Copyright 1989, 1991 by Jef
  326.     Poskanzer.
  327.  
  328.         Feedback and questions are welcome.  Please send them to:
  329.  
  330.                              jef@well.sf.ca.us
  331.                               apple!well!jef
  332.  
  333.         When  sending  bug  reports,  always  include  the output from
  334.     running  any  pbmplus  program  with  the -version flag, including
  335.     descriptions of  the  type  of system you are on, the compiler you
  336.     use, and whether you are using Makefiles or Imakefiles.
  337.  
  338.         When  suggesting  new  formats  or  features,  please  include
  339.     whatever documentation you have,  and  a  uuencoded  sample.   The
  340.     response time will depend upon  my  schedule and the complexity of
  341.     the task;  if you need  it right away, or it is a complicated job,
  342.     you might consider paying me.
  343.  
  344.         The  Usenet  newsgroup  alt.graphics.pixutils  is a forum  for
  345.     discussion  of  image  conversion  and editing packages.   Posting
  346.     queries  there  may be better than mailing them to  me,  since  it
  347.     allows other people to help provide answers.
  348.  
  349.         Permission  to use, copy, modify, and distribute this software
  350.     and its  documentation  for  any purpose and without fee is hereby
  351.     granted, provided that  the  above  copyright notice appear in all
  352.     copies and that both  that  copyright  notice  and this permission
  353.     notice  appear  in supporting documentation.    This  software  is
  354.     provided "as is" without express or  implied  warranty.  Thus, you
  355.     may do what you want with this  software.    Build  it  into  your
  356.     package, steal code from it, whatever.  Just be sure to let people
  357.     know where it came from.
  358.  
  359. 1 asciitopgm
  360.         asciitopgm - convert ASCII graphics into a portable graymap
  361.  
  362. 2 Synopis
  363.         asciitopgm [-d divisor] height width [asciifile]
  364.  
  365. 2 Description
  366.         Reads  ASCII data as input.  Produces a portable graymap  with
  367.     pixel values which are an approximation of the "brightness" of the
  368.     ASCII  characters,  assuming black-on-white printing.    In  other
  369.     words, a capital M is very  dark,  a  period  is  ver light, and a
  370.     space is white.  Input lines which are fewer than width characters
  371.     are automatically padded with spaces.
  372.  
  373.         The divisor argument is a floating-point number by  which  the
  374.     output pixels are divided;  the default value is 1.0.  This can be
  375.     used to adjust the brightness of the graymap:  for example, if the
  376.     image is too dim, reduce the divisor.
  377.  
  378.         In keeping with  (I believe) Fortran line-printer conventions,
  379.     input lines beginning with  a  +  (plus)  character are assumed to
  380.     "overstrike" the previous line, allowing  a  larger  range of gray
  381.     values.
  382.  
  383.         This tool contradicts the message in  the  pbmtoascii  manual:
  384.     "Note that there is no asciitopbm tool  -  this  transformation is
  385.     one-way."
  386.  
  387. 2 Bugs
  388.         The    table    of    ASCII-to-grey    values  is  subject  to
  389.     interpretation,  and,  of course, depends on the typeface intended
  390.     for the input.
  391.  
  392. 2 See_Also
  393.         pbmtoascii(1), pgm(5)
  394.  
  395. 2 Author
  396.         Wilson H. Bent. Jr. (whb@usc.edu)
  397.  
  398. 1 atktopbm
  399.      atktopbm  -  convert  Andrew  Toolkit  raster  object to portable
  400.      bitmap
  401.  
  402. 2 Synopsis
  403.      atktopbm [atkfile]
  404.  
  405. 2 Description
  406.      Reads an Andrew Toolkit raster object as input.  Produces  a
  407.      portable bitmap as output.
  408.  
  409. 2 See_Also
  410.      pbmtoatk, pbm
  411.  
  412. 2 Author
  413.      Copyright (C) 1991 by Bill Janssen.
  414.  
  415. 1 brushtopbm
  416.      brushtopbm - convert a doodle brush  file  into  a  portable
  417.      bitmap
  418.  
  419. 2 Synopsis
  420.      brushtopbm [brushfile]
  421.  
  422. 2 Description
  423.      Reads a Xerox doodle brush file as input.  Produces a  port-
  424.      able bitmap as output.
  425.  
  426.      Note that there is currently no pbmtobrush tool.
  427.  
  428. 2 See_Also
  429.      pbm
  430.  
  431. 2 Author
  432.      Copyright (C) 1988 by Jef Poskanzer.
  433.  
  434. 1 cmuwmtopbm
  435.      cmuwmtopbm - convert a CMU  window  manager  bitmap  into  a
  436.      portable bitmap
  437.  
  438. 2 Synopsis
  439.      cmuwmtopbm [cmuwmfile]
  440.  
  441. 2 Description
  442.      Reads a CMU window manager  bitmap  as  input.   Produces  a
  443.      portable bitmap as output.
  444.  
  445. 2 See_Also
  446.      pbmtocmuwm, pbm
  447.  
  448. 2 Author
  449.      Copyright (C) 1989 by Jef Poskanzer.
  450.  
  451. 1 g3topbm
  452.      g3topbm - convert a Group 3 fax file into a portable bitmap
  453.  
  454. 2 Synopsis
  455.      g3topbm [-kludge] [-reversebits] [-stretch] [g3file]
  456.  
  457. 2 Description
  458.      Reads a Group 3 fax file as input.  Produces a portable bit-
  459.      map as output.
  460.  
  461. 2 Options
  462.      -kludge
  463.           Tells g3topbm to ignore the  first  few  lines  of  the
  464.           file;  sometimes fax files have some junk at the begin-
  465.           ning.
  466.  
  467.      -reversebits
  468.           Tells  g3topbm  to  interpret  bits   least-significant
  469.           first,  instead  of the default most-significant first.
  470.           Apparently some fax modems do it one way and others  do
  471.           it  the  other  way.   If you get a whole bunch of "bad
  472.           code word" messages, try using this flag.
  473.  
  474.      -stretch
  475.           Tells g3topbm to stretch the image vertically by dupli-
  476.           cating each row.  This is for the low-quality transmis-
  477.           sion mode.
  478.  
  479.      All flags can be abbreviated to their shortest  unique  pre-
  480.      fix.
  481.  
  482. 2 References
  483.      The standard for Group 3 fax is defined in CCITT Recommenda-
  484.      tion T.4.
  485.  
  486. 2 Bugs
  487.      Probably.
  488.  
  489. 2 See_Also
  490.      pbmtog3, pbm
  491.  
  492. 2 Author
  493.      Copyright (C) 1989 by Paul Haeberli <paul@manray.sgi.com>.
  494.  
  495. 1 icontopbm
  496.      icontopbm - convert a Sun icon into a portable bitmap
  497.  
  498. 2 Synopsis
  499.      icontopbm [iconfile]
  500.  
  501. 2 Description
  502.      Reads a Sun icon as input.  Produces a  portable  bitmap  as
  503.      output.
  504.  
  505. 2 See_Also
  506.      pbmtoicon, pbm
  507.  
  508. 2 Author
  509.      Copyright (C) 1988 by Jef Poskanzer.
  510.  
  511. 1 gemtopbm
  512.      gemtopbm - convert a GEM .img file into a portable bitmap
  513.  
  514. 2 Synopsis
  515.      gemtopbm [-d] gemfile
  516.  
  517. 2 Description
  518.      Reads a GEM .img file as input.  Produces a portable  bitmap
  519.      as output.
  520.  
  521. 2 Options
  522.      -d   Produce output describing  the  contents  of  the  .img
  523.           file.
  524.  
  525. 2 Bugs
  526.      Does not support file containing more than one plane.  Can't
  527.      read from standard input.
  528.  
  529. 2 See_Also
  530.      pbmtogem, pbm
  531.  
  532. 2 Author
  533.      Copyright (C) 1988 Diomidis D. Spinellis (dds@cc.ic.ac.uk).
  534.  
  535. 1 macptopbm
  536.      macptopbm - convert a MacPaint file into a portable bitmap
  537.  
  538. 2 Synopsis
  539.      macptopbm [-extraskip N] [macpfile]
  540.  
  541. 2 Description
  542.      Reads a MacPaint file as input.  Produces a portable  bitmap
  543.      as output.
  544.  
  545. 2 Options
  546.      -extraskip
  547.           This flag is to get around a problem with some  methods
  548.           of  transferring  files  from the Mac world to the Unix
  549.           world.  Most of  these  methods  leave  the  Mac  files
  550.           alone, but a few of them add the "finderinfo" data onto
  551.           the front of the Unix file.  This means  an  extra  128
  552.           bytes  to skip over when reading the file.  The symptom
  553.           to watch for is  that  the  resulting  PBM  file  looks
  554.           shifted  to  one side.  If you get this, try -extraskip
  555.           128, and if that still doesn't look right  try  another
  556.           value.
  557.  
  558.      All flags can be abbreviated to their shortest  unique  pre-
  559.      fix.
  560.  
  561. 2 See_Also
  562.      picttoppm, pbmtomacp, pbm
  563.  
  564. 2 Author
  565.      Copyright (C) 1988 by Jef Poskanzer.   The  MacPaint-reading
  566.      code   is   copyright   (c)  1987  by  Patrick  J.  Naughton
  567.      (naughton@wind.sun.com).
  568.  
  569. 1 mgrtopbm
  570.      mgrtopbm - convert a MGR bitmap into a portable bitmap
  571.  
  572. 2 Synopsis
  573.      mgrtopbm [mgrfile]
  574.  
  575. 2 Description
  576.      Reads a MGR bitmap as input.  Produces a portable bitmap  as
  577.      output.
  578.  
  579. 2 See_Also
  580.      pbmtomgr, pbm
  581.  
  582. 2 Author
  583.      Copyright (C) 1989 by Jef Poskanzer.
  584.  
  585. 1 pbmclean
  586.      pbmclean - flip isolated pixels in portable bitmap
  587.  
  588. 2 Synopsis
  589.      pbmclean [-connect] [pbmfile]
  590.  
  591. 2 Description
  592.      Reads a portable bitmap as input. Outputs a portable  bitmap
  593.      with  every  pixel  which  has  less  than connect identical
  594.      neighbours inverted.  Pbmclean  can  be  used  to  clean  up
  595.      "snow" on bitmap images.
  596.  
  597. 2 See_Also
  598.      pbm
  599.  
  600. 2 Author
  601.      Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef
  602.      Poskanzer.
  603.  
  604.      Permission  to  use,  copy,  modify,  and  distribute   this
  605.      software  and  its documentation for any purpose and without
  606.      fee is hereby granted, provided  that  the  above  copyright
  607.      notice  appear  in  all  copies and that both that copyright
  608.      notice and this permission notice appear in supporting docu-
  609.      mentation.   This  software  is  provided  "as  is"  without
  610.      express or implied warranty.
  611.  
  612. 1 pbmlife
  613.      pbmlife - apply Conway's rules of Life to a portable bitmap
  614.  
  615. 2 Synopsis
  616.      pbmlife [pbmfile]
  617.  
  618. 2 Description
  619.      Reads a portable bitmap as input.  Applies the rules of Life
  620.      to  it for one generation, and produces a portable bitmap as
  621.      output.
  622.  
  623.      A white pixel in the image is interpreted as a live beastie,
  624.      and a black pixel as an empty space.
  625.  
  626. 2 See_Also
  627.      pbm
  628.  
  629. 2 Author
  630.      Copyright (C) 1988, 1991 by Jef Poskanzer.
  631.  
  632. 1 pbmmake
  633.      pbmmake - create a blank bitmap of a specified size
  634.  
  635. 2 Synopsis
  636.      pbmmake [-white|-black|-gray ] width height
  637.  
  638. 2 Description
  639.      Produces a  portable  bitmap  of  the  specified  width  and
  640.      height.  The color defaults to white.
  641.  
  642. 2 Options
  643.      In addition to the usual -white  and  -black,  this  program
  644.      implements -gray.  This gives a simple 50% gray pattern with
  645.      1's and 0's alternating.
  646.  
  647.      All flags can be abbreviated to their shortest  unique  pre-
  648.      fix.
  649.  
  650. 2 See_Also
  651.      pbm, ppmmake
  652.  
  653. 2 Author
  654.      Copyright (C) 1989 by Jef Poskanzer.
  655.  
  656. 1 pbmmask
  657.      pbmmask - create a mask bitmap from a regular bitmap
  658.  
  659. 2 Synopsis
  660.      pbmmask [-expand] [pbmfile]
  661.  
  662. 2 Description
  663.      Reads a portable bitmap as input.  Creates  a  corresponding
  664.      mask bitmap and writes it out.
  665.  
  666.      The color to be interpreted as  "background"  is  determined
  667.      automatically.  Regardless of which color is background, the
  668.      mask will be white where the background is and  black  where
  669.      the figure is.
  670.  
  671.      This lets you do a masked paste like this, for objects  with
  672.      a black background:
  673.          pbmmask obj > objmask
  674.          pnmpaste < dest -and objmask <x> <y> | pnmpaste -or obj <x> <y>
  675.      For objects with a white background, you can  either  invert
  676.      them or add a step:
  677.          pbmmask obj > objmask
  678.          pnminvert objmask | pnmpaste -and obj 0 0 > blackback
  679.          pnmpaste < dest -and objmask <x> <y> | pnmpaste -or blackback <x> <y>
  680.      Note that this three-step version  works  for  objects  with
  681.      black  backgrounds  too,  if you don't care about the wasted
  682.      time.
  683.  
  684.      You can also use masks with graymaps and pixmaps, using  the
  685.      pnmarith tool.  For instance:
  686.          ppmtopgm obj.ppm | pgmtopbm -threshold | pbmmask > objmask.pbm
  687.          pnmarith -multiply dest.ppm objmask.pbm > t1.ppm
  688.          pnminvert objmask.pbm | pnmarith -multiply obj.ppm - > t2.ppm
  689.          pnmarith -add t1.ppm t2.ppm
  690.      An interesting variation on this is to pipe the mask through
  691.      the  pnmsmooth script before using it.  This makes the boun-
  692.      dary between the two images less sharp.
  693.  
  694.      -expand
  695.           Expands the mask by one pixel out from the image.  This
  696.           is useful if you want a little white border around your
  697.           image.  (A better solution might be to turn the pbmlife
  698.           tool into a general cellular automaton tool...)
  699.  
  700. 2 See_Also
  701.      pnmpaste, pnminvert, pbm, pnmarith, pnmsmooth
  702.  
  703. 2 Author
  704.      Copyright (C) 1988 by Jef Poskanzer.
  705.  
  706. 1 pbmpscale
  707.      pbmpscale - enlarge a portable bitmap with edge smoothing
  708.  
  709. 2 Synopsis
  710.      pbmpscale N [ pbmfile ]
  711.  
  712. 2 Description
  713.      Reads a portable bitmap as input,  and  outputs  a  portable
  714.      bitmap enlarged N times. Enlargement is done by pixel repli-
  715.      cation, with some additional smoothing of corners and edges.
  716.  
  717. 2 See_Also
  718.      pnmenlarge, ppmscale, pbm
  719.  
  720. 2 Author
  721.      Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef
  722.      Poskanzer.
  723.  
  724.      Permission  to  use,  copy,  modify,  and  distribute   this
  725.      software  and  its documentation for any purpose and without
  726.      fee is hereby granted, provided  that  the  above  copyright
  727.      notice  appear  in  all  copies and that both that copyright
  728.      notice and this permission notice appear in supporting docu-
  729.      mentation.   This  software  is  provided  "as  is"  without
  730.      express or implied warranty.
  731.  
  732. 2 Notes
  733.      pbmpscale works best for  enlargements  of  2.  Enlargements
  734.      greater  than  2 should be done by as many enlargements of 2
  735.      as possible, followed by an  enlargement  by  the  remaining
  736.      factor.
  737.  
  738. 1 pbmreduce
  739.      pbmreduce - read a portable bitmap and reduce it N times
  740.  
  741. 2 Synopsis
  742.      pbmreduce [-floyd|-fs|-threshold ] [-value val] N [pbmfile]
  743.  
  744. 2 Description
  745.      Reads a portable bitmap as input.  Reduces it by a factor of
  746.      N, and produces a portable bitmap as output.
  747.  
  748.      pbmreduce duplicates a lot of the functionality of pgmtopbm;
  749.      you  could  do  something  like  pnmscale  |  pgmtopbm,  but
  750.      pbmreduce is a lot faster.
  751.  
  752.      pbmreduce can be used to "re-halftone" an image.  Let's  say
  753.      you  have  a  scanner  that  only  produces black&white, not
  754.      grayscale, and it does a terrible job  of  halftoning  (most
  755.      b&w  scanners  fit  this  description).   One way to fix the
  756.      halftoning is to scan at the  highest  possible  resolution,
  757.      say  300  dpi,  and  then  reduce by a factor of three or so
  758.      using pbmreduce.  You can even correct the brightness of  an
  759.      image, by using the -value flag.
  760.  
  761. 2 Options
  762.      By default, the halftoning after the reduction is  done  via
  763.      boustrophedonic  Floyd-Steinberg  error  diffusion; however,
  764.      the -threshold flag can be used to specify simple threshold-
  765.      ing.  This gives better results when reducing line drawings.
  766.  
  767.      The -value flag alters the thresholding value for all quant-
  768.      izations.   It  should  be  a  real  number between 0 and 1.
  769.      Above 0.5 means darker images; below 0.5 means lighter.
  770.  
  771.      All flags can be abbreviated to their shortest  unique  pre-
  772.      fix.
  773.  
  774. 2 See_Also
  775.      pnmenlarge, pnmscale, pgmtopbm, pbm
  776.  
  777. 2 Author
  778.      Copyright (C) 1988 by Jef Poskanzer.
  779.  
  780. 1 pbmtext
  781.      pbmtext - render text into a bitmap
  782.  
  783. 2 Synopsis
  784.      pbmtext [-font fontfile] [text]
  785.  
  786. 2 Description
  787.      Takes the specified text, either a single line from the com-
  788.      mand line or multiple lines from standard input, and renders
  789.      it into a bitmap.
  790.  
  791. 2 Options
  792.      By default, pbmtext uses a  built-in  font.   You  can  also
  793.      specify  your own font with the -font flag.  The fontfile is
  794.      a pbm file, created in a very specific way.  In your  window
  795.      system  of choice, display the following text in the desired
  796.      (fixed-width) font:
  797.  
  798.          M ",/^_[`jpqy| M
  799.  
  800.          /  !"#$%&'()*+ /
  801.          < ,-./01234567 <
  802.          > 89:;<=>?@ABC >
  803.          @ DEFGHIJKLMNO @
  804.          _ PQRSTUVWXYZ[ _
  805.          { \]^_`abcdefg {
  806.          } hijklmnopqrs }
  807.          ~ tuvwxyz{|}~  ~
  808.  
  809.          M ",/^_[`jpqy| M
  810.  
  811.      Do a screen grab or window dump  of  that  text,  using  for
  812.      instance  xwd,  xgrabsc,  or screendump.  Convert the result
  813.      into a pbm file.  If necessary, use pnmcut to remove  every-
  814.      thing  except  the text.  Finally, run it through pnmcrop to
  815.      make sure the edges are right up against the text.   pbmtext
  816.      can figure out the sizes and spacings from that.
  817.  
  818. 2 See_Also
  819.      pbm, pnmcut, pnmcrop
  820.  
  821. 2 Author
  822.      Copyright (C) 1991 by Jef Poskanzer.
  823.  
  824. 1 pbmto4425
  825.      pbmto4425 - Display PBM images on an AT&T 4425 terminal
  826.  
  827. 2 Synopsis
  828.      pbmto4425 [pbmfile]
  829.  
  830. 2 Description
  831.      Pbmto4425 displays PBM format images on an AT&T  4425  ASCII
  832.      terminal  using  that  terminal's  mosaic graphics character
  833.      set.  The program should also  work  with  other  VT100-like
  834.      terminals with mosaic graphics character sets such as the C.
  835.      Itoh CIT-101, but it has not yet been  tested  on  terminals
  836.      other than the 4425.
  837.  
  838.      Pbmto4425 puts the terminal into 132 column mode to  achieve
  839.      the  maximum  resolution  of the terminal.  In this mode the
  840.      terminal has a resolution of 264 columns by  69  rows.   The
  841.      pixels  have  an  aspect  ratio of 1:2.6, therefore an image
  842.      should be processed before being displayed in a manner  such
  843.      as this:
  844.  
  845.           % pnmscale -xscale 2.6 pnmfile \
  846.                | pnmscale -xysize 264 69 \
  847.                | ppmtopgm \
  848.                | pgmtopbm \
  849.                | pbmto4425
  850.  
  851. 2 Author
  852.      Copyright (C) 1993 by Robert Perlberg
  853.  
  854. 1 pbmto10x
  855.      pbmto10x - convert a portable bitmap into Gemini 10X printer
  856.      graphics
  857.  
  858. 2 Synopsis
  859.      pbmto10x [-h] [pbmfile]
  860.  
  861. 2 Description
  862.      Reads a portable bitmap as input.  Produces a file of Gemini
  863.      10X printer graphics as output.  The 10x's printer codes are
  864.      alleged to be similar to the Epson codes.
  865.  
  866.      Note that there is no 10xtopbm tool - this transformation is
  867.      one way.
  868.  
  869. 2 Options
  870.      The resolution is normally 60H by 72V.  If the  -h  flag  is
  871.      specified, resolution is 120H by 144V.  You may find it use-
  872.      ful to rotate landscape images before printing.
  873.  
  874. 2 See_Also
  875.      pbm
  876.  
  877. 2 Author
  878.      Copyright (C) 1990 by Ken Yap
  879.  
  880. 1 pbmtoascii
  881.      pbmtoascii - convert a portable bitmap into ASCII graphics
  882.  
  883. 2 Synopsis
  884.      pbmtoascii [-1x2|-2x4] [pbmfile]
  885.  
  886. 2 Description
  887.      Reads a portable bitmap as input.  Produces a somewhat crude
  888.      ASCII graphic as output.
  889.  
  890.      Note that there is no asciitopbm tool - this  transformation
  891.      is one-way.
  892.  
  893. 2 Options
  894.      The -1x2 and -2x4 flags give you two alternate ways for  the
  895.      bits  to  get  mapped to characters.  With 1x2, the default,
  896.      each character represents a group of 1 bit across by 2  bits
  897.      down.  With -2x4, each character represents 2 bits across by
  898.      4 bits down.  With the 1x2 mode you can see  the  individual
  899.      bits,  so it's useful for previewing small bitmaps on a non-
  900.      graphics terminal.  The 2x4 mode  lets  you  display  larger
  901.      bitmaps  on  a  standard  80-column display, but it obscures
  902.      bit-level details.  2x4 mode is  also  good  for  displaying
  903.      graymaps  -  "pnmscale  -width  158  |  pgmnorm  |  pgmtopbm
  904.      -thresh" should give good results.
  905.  
  906. 2 See_Also
  907.      pbm
  908.  
  909. 2 Author
  910.      Copyright (C) 1988, 1992 by Jef Poskanzer.
  911.  
  912. 1 pbmtoatk
  913.      pbmtoatk - convert portable bitmap to Andrew Toolkit  raster
  914.      object
  915.  
  916. 2 Synopsis
  917.      pbmtoatk [pbmfile]
  918.  
  919. 2 Description
  920.      Reads a portable bitmap as input.  Produces a Andrew Toolkit
  921.      raster object as output.
  922.  
  923. 2 See_Also
  924.      atktopbm, pbm
  925.  
  926. 2 Author
  927.      Copyright (C) 1991 by Bill Janssen.
  928.  
  929. 1 pbmtobg
  930.      pbmtobg - convert a portable bitmap into BitGraph graphics
  931.  
  932. 2 Synopsis
  933.      pbmtobg [rasterop] [x y] < pbmfile
  934.  
  935. 2 Description
  936.      Reads a portable bitmap as  input.   Produces  BBN  BitGraph
  937.      terminal Display Pixel Data (DPD) sequence as output.
  938.  
  939.      The rasterop can be specified on the command line.  If  this
  940.      is  omitted,  3 (replace) will be used.  A position in (x,y)
  941.      coordinates can also be specified.  If both are  given,  the
  942.      rasterop  comes  first.  The portable bitmap is always taken
  943.      from the standard input.
  944.  
  945.      Note that there is no bgtopbm tool.
  946.  
  947. 2 See_Also
  948.      pbm
  949.  
  950. 2 Author
  951.      Copyright 1989 by Mike Parker.
  952.  
  953. 1 pbmtocmuwm
  954.      pbmtocmuwm - convert a portable bitmap  into  a  CMU  window
  955.      manager bitmap
  956.  
  957. 2 Synopsis
  958.      pbmtocmuwm [pbmfile]
  959.  
  960. 2 Description
  961.      Reads a portable bitmap as input.   Produces  a  CMU  window
  962.      manager bitmap as output.
  963.  
  964. 2 See_Also
  965.      cmuwmtopbm, pbm
  966.  
  967. 2 Author
  968.      Copyright (C) 1989 by Jef Poskanzer.
  969.  
  970. 1 pbmtoepsi
  971.      pbmtoepsi - convert a portable bitmap into  an  encapsulated
  972.      PostScript style preview bitmap
  973.  
  974. 2 Synopsis
  975.      pbmtoepsi [-bbonly] [pbmfile]
  976.  
  977. 2 Description
  978.      Reads a portable bitmap as input.  Produce  an  encapsulated
  979.      Postscript style bitmap as output. The output is not a stand
  980.      alone postscript file, it is only a  preview  bitmap,  which
  981.      can  be  included  in an encapsulated PostScript file.  Note
  982.      that there is no epsitopbm tool - this transformation is one
  983.      way.
  984.  
  985.      This utility is a part of the pstoepsi tool by Doug  Crabill
  986.      (dgc@cs.purdue.edu).
  987.  
  988. 2 Options
  989.      -bbonly
  990.           Only create a boundary box,  don't  fill  it  with  the
  991.           image.
  992.  
  993. 2 See_Also
  994.      pbm, pnmtops, psidtopgm
  995.  
  996. 2 Author
  997.      Copyright (C) 1988 Jef Poskanzer, modified by  Doug  Crabill
  998.      1992
  999.  
  1000. 1 pbmtoepson
  1001.      pbmtoepson - convert a portable bitmap  into  Epson  printer
  1002.      graphics
  1003.  
  1004. 2 Synopsis
  1005.      pbmtoepson [pbmfile]
  1006.  
  1007. 2 Description
  1008.      Reads a portable bitmap as input.  Produces a file of  Epson
  1009.      printer graphics as output.
  1010.  
  1011.      Note that there is no epsontopbm tool - this  transformation
  1012.      is one way.
  1013.  
  1014. 2 See_Also
  1015.      pbm
  1016.  
  1017. 2 Author
  1018.      Copyright      (C)      1991      by       John       Tiller
  1019.      (tiller@galois.msfc.nasa.gov) and Jef Poskanzer.
  1020.  
  1021. 1 pbmtog3
  1022.      pbmtog3 - convert a portable bitmap into a Group 3 fax file
  1023.  
  1024. 2 Synopsis
  1025.      pbmtog3 [pbmfile]
  1026.  
  1027. 2 Description
  1028.      Reads a portable bitmap as output.  Produces a Group  3  fax
  1029.      file as input.
  1030.  
  1031. REFERENCES
  1032.      The standard for Group 3 fax is defined in CCITT Recommenda-
  1033.      tion T.4.
  1034.  
  1035. 2 Bugs
  1036.      Probably.
  1037.  
  1038. 2 See_Also
  1039.      g3topbm, pbm
  1040.  
  1041. 2 Author
  1042.      Copyright (C) 1989 by Paul Haeberli <paul@manray.sgi.com>.
  1043.  
  1044. 1 pbmtogem
  1045.      pbmtogem - convert a portable bitmap into a GEM .img file
  1046.  
  1047. 2 Synopsis
  1048.      pbmtogem [pbmfile]
  1049.  
  1050. 2 Description
  1051.      Reads a portable bitmap as input.  Produces a GEM .img  file
  1052.      as output.
  1053.  
  1054. 2 Bugs
  1055.      It does not support compression of the data.
  1056.  
  1057. 2 See_Also
  1058.      gemtopbm, pbm
  1059.  
  1060. 2 Author
  1061.      Copyright (C) 1988 by David Beckemeyer (bdt!david)  and  Jef
  1062.      Poskanzer.
  1063.  
  1064. 1 pbmtogo
  1065.      pbmtogo - convert a portable bitmap into compressed  GraphOn
  1066.      graphics
  1067.  
  1068. 2 Synopsis
  1069.      pbmtogo [pbmfile]
  1070.  
  1071. 2 Description
  1072.      Reads a portable bitmap as input.   Produces  2D  compressed
  1073.      GraphOn  graphics as output.  Be sure to set up your GraphOn
  1074.      with the following modes: 8  bits  /  no  parity;  obeys  no
  1075.      XON/XOFF;  NULs  are  accepted.   These  are all on the Comm
  1076.      menu.  Also, remember to turn off tty post processing.  Note
  1077.      that there is no gotopbm tool.
  1078.  
  1079. 2 See_Also
  1080.      pbm
  1081.  
  1082. 2 Author
  1083.      Copyright (C) 1988, 1989 by Jef Poskanzer, Michael Haberler,
  1084.      and Bo Thide'.
  1085.  
  1086. 1 pbmtoicon
  1087.      pbmtoicon - convert a portable bitmap into a Sun icon
  1088.  
  1089. 2 Synopsis
  1090.      pbmtoicon [pbmfile]
  1091.  
  1092. 2 Description
  1093.      Reads a portable bitmap as input.  Produces a  Sun  icon  as
  1094.      output.
  1095.  
  1096. 2 See_Also
  1097.      icontopbm, pbm
  1098.  
  1099. 2 Author
  1100.      Copyright (C) 1988 by Jef Poskanzer.
  1101.  
  1102. 1 pbmtolj
  1103.      pbmtolj - convert a portable bitmap into HP LaserJet format
  1104.  
  1105. 2 Synopsis
  1106.      pbmtolj [-resolution N] [pbmfile]
  1107.  
  1108. 2 Description
  1109.      Reads a portable bitmap as input.  Produces HP LaserJet data
  1110.      as output.
  1111.  
  1112.      Note that there is no ljtopbm tool.
  1113.  
  1114. 2 Options
  1115.      -resolution
  1116.           Specifies the resolution of the output device, in  dpi.
  1117.           Typical  values  are 75, 100, 150, 300.  The default is
  1118.           75.
  1119.  
  1120.      All flags can be abbreviated to their shortest  unique  pre-
  1121.      fix.
  1122.  
  1123. 2 See_Also
  1124.      pbm
  1125.  
  1126. 2 Author
  1127.      Copyright (C) 1988 by Jef Poskanzer and Michael Haberler.
  1128.  
  1129. 1 pbmtoln03
  1130.      pbmtoln03 - convert protable bitmap to DEC LN03+ Sixel  out-
  1131.      put
  1132.  
  1133. 2 Synopsis
  1134.      pbmtoln03 [-rltbf] pbmfile
  1135.  
  1136. 2 Description
  1137.      Reads a portable bitmap as  input.   Produces  a  DEC  LN03+
  1138.      Sixel output file.
  1139.  
  1140. 2 Options
  1141.      -l nn
  1142.           Use "nn" as value for left margin (default 0).
  1143.  
  1144.      -r nn
  1145.           Use "nn" as value for right margin (default 2400).
  1146.  
  1147.      -t nn
  1148.           Use "nn" as value for top margin (default 0).
  1149.  
  1150.      -b nn
  1151.           Use "nn" as value for bottom margin (default 3400).
  1152.  
  1153.      -f nn
  1154.           Use "nn" as value for form length (default 3400).
  1155.  
  1156. 2 See_Also
  1157.      pbm
  1158.  
  1159. 2 Author
  1160.      Tim Cook, 26 Feb 1992
  1161.  
  1162. 1 pbmtolps
  1163.      pbmtolps - convert portable bitmap to PostScript
  1164.  
  1165. 2 Synopsis
  1166.      pbmtolps [ -dpi n ] [ pbmfile ]
  1167.  
  1168. 2 Description
  1169.      Reads a portable bitmap as input,  and  outputs  PostScript.
  1170.      The output Postscript uses lines instead of the image opera-
  1171.      tor to generate a (device dependent) picture which  will  be
  1172.      imaged much faster.
  1173.  
  1174.      The Postscript path length is constrained to  be  less  that
  1175.      1000  points  so  that  no  limits  are overrun on the Apple
  1176.      Laserwriter and (presumably) no other printers.
  1177.  
  1178. 2 See_Also
  1179.      pgmtops, ppmtops, pbm
  1180.  
  1181. 2 Author
  1182.      George Phillips <phillips@cs.ubc.ca>
  1183.  
  1184. 1 pbmtomacp
  1185.      pbmtomacp - convert a portable bitmap into a MacPaint file
  1186.  
  1187. 2 Synopsis
  1188.      pbmtomacp  [-l  left]  [-r  right]  [-b  bottom]  [-t   top]
  1189.      [pbmfile]
  1190.  
  1191. 2 Description
  1192.      Reads a portable bitmap  as  input.   If  no  input-file  is
  1193.      given,  standard input is assumed.  Produces a MacPaint file
  1194.      as output.
  1195.  
  1196.      The generated file is only the data fork of a picture.   You
  1197.      will  need  a program such as mcvert to generate a Macbinary
  1198.      or a BinHex file that contains the necessary information  to
  1199.      identify the file as a PNTG file to MacOS.
  1200.  
  1201. 2 Options
  1202.      Left, right, bottom & top let you define a square  into  the
  1203.      pbm  file,  that  must  be  converted.  Default is the whole
  1204.      file.  If the file is too large  for  a  MacPaint-file,  the
  1205.      bitmap is cut to fit from ( left, top ).
  1206.  
  1207. 2 Bugs
  1208.      The source code contains comments in a language  other  than
  1209.      English.
  1210.  
  1211. 2 See_Also
  1212.      ppmtopict, macptopbm, pbm, mcvert
  1213.  
  1214. 2 Author
  1215.      Copyright   (C)   1988   by    Douwe    van    der    Schaaf
  1216.      (...!mcvax!uvapsy!vdschaaf).
  1217.  
  1218. 1 pbmtomgr
  1219.      pbmtomgr - convert a portable bitmap into a MGR bitmap
  1220.  
  1221. 2 Synopsis
  1222.      pbmtomgr [pbmfile]
  1223.  
  1224. 2 Description
  1225.      Reads a portable bitmap as input.  Produces a MGR bitmap  as
  1226.      output.
  1227.  
  1228. 2 See_Also
  1229.      mgrtopbm, pbm
  1230.  
  1231. 2 Author
  1232.      Copyright (C) 1989 by Jef Poskanzer.
  1233.  
  1234. 1 pbmtopi3
  1235.      pbmtopi3 - convert a portable bitmap  into  an  Atari  Degas
  1236.      .pi3 file
  1237.  
  1238. 2 Synopsis
  1239.      pbmtopi3 [pbmfile]
  1240.  
  1241. 2 Description
  1242.      Reads a portable bitmap as input.  Produces an  Atari  Degas
  1243.      .pi3 file as output.
  1244.  
  1245. 2 See_Also
  1246.      pi3topbm, pbm, ppmtopi1, pi1toppm
  1247.  
  1248. 2 Author
  1249.      Copyright (C) 1988 by David Beckemeyer (bdt!david)  and  Jef
  1250.      Poskanzer.
  1251.  
  1252. 1 pbmtoplot
  1253.      pbmtoplot - convert a portable bitmap into  a  Unix  plot
  1254.      file
  1255.  
  1256. 2 Synopsis
  1257.      pbmtoplot [pbmfile]
  1258.  
  1259. 2 Description
  1260.      Reads a portable bitmap as  input.   Produces  a  Unix  plot
  1261.      file.
  1262.  
  1263.      Note that there is no plottopbm tool -  this  transformation
  1264.      is one-way.
  1265.  
  1266. 2 See_Also
  1267.      pbm, plot
  1268.  
  1269. 2 Author
  1270.      Copyright (C) 1990 by Arthur David Olson.
  1271.  
  1272. 1 pbmtoptx
  1273.      pbmtoptx - convert a portable bitmap into Printronix printer
  1274.      graphics
  1275.  
  1276. 2 Synopsis
  1277.      pbmtoptx [pbmfile]
  1278.  
  1279. 2 Description
  1280.      Reads a portable bitmap as input.  Produces a file of  Prin-
  1281.      tronix printer graphics as output.
  1282.  
  1283.      Note that there is no ptxtopbm tool - this transformation is
  1284.      one way.
  1285.  
  1286. 2 See_Also
  1287.      pbm
  1288.  
  1289. 2 Author
  1290.      Copyright (C) 1988 by Jef Poskanzer.
  1291.  
  1292. 1 pbmtox10bm
  1293.      pbmtox10bm - convert a portable bitmap into an X10 bitmap
  1294.  
  1295. 2 Synopsis
  1296.      pbmtox10bm [pbmfile]
  1297.  
  1298. 2 Description
  1299.      Reads a portable bitmap as input.  Produces an X10 bitmap as
  1300.      output.  This older format is maintained for compatibility.
  1301.  
  1302.      Note that there is no x10bmtopbm tool, because xbmtopbm  can
  1303.      read both X11 and X10 bitmaps.
  1304.  
  1305. 2 See_Also
  1306.      pbmtoxbm, xbmtopbm, pbm
  1307.  
  1308. 2 Author
  1309.      Copyright (C) 1988 by Jef Poskanzer.
  1310.  
  1311. 1 pbmtoxbm
  1312.      pbmtoxbm - convert a portable bitmap into an X11 bitmap
  1313.  
  1314. 2 Synopsis
  1315.      pbmtoxbm [pbmfile]
  1316.  
  1317. 2 Description
  1318.      Reads a portable bitmap as input.  Produces an X11 bitmap as
  1319.      output.
  1320.  
  1321. 2 See_Also
  1322.      pbmtox10bm, xbmtopbm, pbm
  1323.  
  1324. 2 Author
  1325.      Copyright (C) 1988 by Jef Poskanzer.
  1326.  
  1327. 1 pbmtoybm
  1328.      pgmtoybm - convert a  portable  bitmap  into  a  Bennet  Yee
  1329.      "face" file
  1330.  
  1331. 2 Synopsis
  1332.      pbmtoybm [pbmfile]
  1333.  
  1334. 2 Description
  1335.      Reads a portable bitmap as input.  Produces as output a file
  1336.      acceptable  to  the  face  and  xbm  programs  by Bennet Yee
  1337.      (bsy+@cs.cmu.edu).
  1338.  
  1339. 2 See_Also
  1340.      ybmtopbm, pbm, face, face, xbm
  1341.  
  1342. 2 Author
  1343.      Copyright (C) 1991 by Jamie Zawinski and Jef Poskanzer.
  1344.  
  1345. 1 pbmtozinc
  1346.      pbmtozinc - convert a portable bitmap into a Zinc bitmap
  1347.  
  1348. 2 Synopsis
  1349.      pbmtozinc [pbmfile]
  1350.  
  1351. 2 Description
  1352.      Reads a portable bitmap as input.  Produces a bitmap in  the
  1353.      format  used by the Zinc Interface Library (ZIL) Version 1.0
  1354.      as output.
  1355.  
  1356. 2 See_Also
  1357.      pbm
  1358.  
  1359. 2 Author
  1360.      Copyright   (C)   1988    by    James    Darrell    McCauley
  1361.      (jdm5548@diamond.tamu.edu) and Jef Poskanzer.
  1362.  
  1363. 1 pbmupc
  1364.      pbmupc - create a Universal Product Code bitmap
  1365.  
  1366. 2 Synopsis
  1367.      pbmupc [-s1|-s2] type manufac product
  1368.  
  1369. 2 Description
  1370.      Generates a Universal Product Code symbol.  The three  argu-
  1371.      ments  are:  a one digit product type, a five digit manufac-
  1372.      turer code, and a five digit product code.  For example,  "0
  1373.      72890 00011" is the code for Heineken.
  1374.  
  1375.      As presently configured, pbmupc produces a bitmap  230  bits
  1376.      wide and 175 bits high.  The size can be altered by changing
  1377.      the defines at the beginning of the program, or  by  running
  1378.      the output through pnmenlarge or pnmscale.
  1379.  
  1380. 2 Options
  1381.      The -s1 and -s2 flags select the style of UPC  to  generate.
  1382.      The default, -s1, looks more or less like this:
  1383.       ||||||||||||||||
  1384.       ||||||||||||||||
  1385.       ||||||||||||||||
  1386.       ||||||||||||||||
  1387.      0||12345||67890||5
  1388.      The other style, -s2, puts the product type digit higher up,
  1389.      and doesn't display the checksum digit:
  1390.       ||||||||||||||||
  1391.       ||||||||||||||||
  1392.      0||||||||||||||||
  1393.       ||||||||||||||||
  1394.       ||12345||67890||
  1395.  
  1396. 2 See_Also
  1397.      pbm
  1398.  
  1399. 2 Author
  1400.      Copyright (C) 1989 by Jef Poskanzer.
  1401.  
  1402. 1 pi3topbm
  1403.      pi3topbm - convert an Atari Degas .pi3 file into a  portable
  1404.      bitmap
  1405.  
  1406. 2 Synopsis
  1407.      pi3topbm [pi3file]
  1408.  
  1409. 2 Description
  1410.      Reads an Atari Degas .pi3 file as input.  Produces  a  port-
  1411.      able bitmap as output.
  1412.  
  1413. 2 See_Also
  1414.      pbmtopi3, pbm, pi1toppm, ppmtopi1
  1415.  
  1416. 2 Author
  1417.      Copyright (C)  1988  by  David  Beckemeyer  (bdt!david)  and
  1418.      Diomidis D. Spinellis.
  1419.  
  1420. 1 pktopbm
  1421.      pktopbm - convert packed  (PK)  format  font  into  portable
  1422.      bitmap(s)
  1423.  
  1424. 2 Synopsis
  1425.      pktopbm pkfile[.pk] [-c num] pbmfile ...
  1426.  
  1427. 2 Description
  1428.      Reads a packed (PK) font file as input, and  produces  port-
  1429.      able  bitmaps as output. If the filename "-" is used for any
  1430.      of the filenames, the standard  input  stream  (or  standard
  1431.      output where appropriate) will be used.
  1432.  
  1433. 2 Options
  1434.      -c num
  1435.           Sets the character number of the next bitmap written to
  1436.           num.
  1437.  
  1438. 2 See_Also
  1439.      pbmtopk, pbm
  1440.  
  1441. 2 Author
  1442.      Adapted  from  Tom  Rokicki's   pxtopk   by   Angus   Duggan
  1443.      <ajcd@uk.ac.ed.lfcs>.
  1444.  
  1445. 1 xbmtopbm
  1446.      xbmtopbm - convert an X11 or X10 bitmap into a portable bit-
  1447.      map
  1448.  
  1449. 2 Synopsis
  1450.      xbmtopbm [bitmapfile]
  1451.  
  1452. 2 Description
  1453.      Reads an X11 or X10 bitmap as input.   Produces  a  portable
  1454.      bitmap as output.
  1455.  
  1456. 2 See_Also
  1457.      pbmtoxbm, pbmtox10bm, pbm
  1458.  
  1459. 2 Author
  1460.      Copyright (C) 1988 by Jef Poskanzer.
  1461.  
  1462. 1 ybmtopbm
  1463.      ybmtopbm - convert a Bennet Yee "face" file into a  portable
  1464.      bitmap
  1465.  
  1466. 2 Synopsis
  1467.      ybmtopbm [facefile]
  1468.  
  1469. 2 Description
  1470.      Reads a file acceptable to the face and xbm programs by Ben-
  1471.      net Yee (bsy+@cs.cmu.edu).  Writes a portable bitmap as out-
  1472.      put.
  1473.  
  1474. 2 See_Also
  1475.      pbmtoybm, pbm, face, face, xbm
  1476.  
  1477. 2 Author
  1478.      Copyright (C) 1991 by Jamie Zawinski and Jef Poskanzer.
  1479.  
  1480. 1 pbmtopk
  1481.      pbmtopk - convert a portable bitmap into a packed (PK)  for-
  1482.      mat font
  1483.  
  1484. 2 Synopsis
  1485.      pbmtopk pkfile[.pk] tfmfile[.tfm] resolution [-s designsize]
  1486.      [-p num param...] [-C codingscheme] [-F family] [-f optfile]
  1487.      [-c num] [-W width] [-H height] [-D  depth]  [-I  ital]  [-h
  1488.      horiz] [-v vert] [-x xoff] [-y yoff] [pbmfile]...
  1489.  
  1490. 2 Description
  1491.      Reads portable bitmaps as input, and produces a packed  (PK)
  1492.      font  file  and  a TFM (TeX font metric) file as output. The
  1493.      resolution parameter indicates the resolution of  the  font,
  1494.      in dots per inch. If the filename "-" is used for any of the
  1495.      filenames, the standard input  stream  (or  standard  output
  1496.      where appropriate) will be used.
  1497.  
  1498. 2 Options
  1499.      -s designsize
  1500.           Sets the design size  of  the  font,  in  TeX's  points
  1501.           (72.27pt  to  the  inch). The default design size is 1.
  1502.           The TFM parameters are given as multiples of the design
  1503.           size.
  1504.  
  1505.      -p num param...
  1506.           Sets the first num font parameters for  the  font.  The
  1507.           first  seven  parameters are the slant, interword spac-
  1508.           ing, interword space  stretchability,  interword  space
  1509.           shrinkability,  x-height, quad width, and post-sentence
  1510.           extra space of the font. Math and symbol fonts may have
  1511.           more  parameters;  see The TeXbook for a list of these.
  1512.           Reasonable default values  are  chosen  for  parameters
  1513.           which are not specified.
  1514.  
  1515.      -C codingscheme
  1516.           Sets the coding scheme comment in the TFM file.
  1517.  
  1518.      -F family
  1519.           Sets the font family comment in the TFM file.
  1520.  
  1521.      -f optfile
  1522.           Reads the file optfile, which should contain a lines of
  1523.           the form:
  1524.  
  1525.              filename xoff yoff horiz vert width height depth ital
  1526.  
  1527.           The pbm files specified by the filename parameters  are
  1528.           inserted  consecutively  in the font with the specified
  1529.           attributes. If any of the attributes  are  omitted,  or
  1530.           replaced  with  "*", a default value will be calculated
  1531.           from the size of the bitmap. The settings  of  the  -W,
  1532.           -H,  -D, -I, -h, -v, -x, and -y options do not affected
  1533.           characters created in this way.  The  character  number
  1534.           can  be  changed by including a line starting with "=",
  1535.           followed by the new number.  Lines beginning  with  "%"
  1536.           or "#" are ignored.
  1537.  
  1538.      -c num
  1539.           Sets the character number of the  next  bitmap  encoun-
  1540.           tered to num.
  1541.  
  1542.      -W width
  1543.           Sets the TFM width of the next character to  width  (in
  1544.           design size multiples).
  1545.  
  1546.      -H height
  1547.           Sets the TFM height of the next character to height (in
  1548.           design size multiples).
  1549.  
  1550.      -D depth
  1551.           Sets the TFM depth of the next character to  depth  (in
  1552.           design size multiples).
  1553.  
  1554.      -I ital
  1555.           Sets the italic correction of  the  next  character  to
  1556.           ital (in design size multiples).
  1557.  
  1558.      -h horiz
  1559.           Sets the horizontal escapement of the next character to
  1560.           horiz (in pixels).
  1561.  
  1562.      -v vert
  1563.           Sets the vertical escapement of the next  character  to
  1564.           vert (in pixels).
  1565.  
  1566.      -x xoff
  1567.           Sets the horizontal offset of  the  next  character  to
  1568.           xoff (in pixels).
  1569.  
  1570.      -y yoff
  1571.           Sets the vertical offset of the next character to  yoff
  1572.           (in pixels, from the top row).
  1573.  
  1574. 2 See_Also
  1575.      pktopbm, pbm
  1576.  
  1577. 2 Author
  1578.      Adapted  from  Tom  Rokicki's   pxtopk   by   Angus   Duggan
  1579.      <ajcd@uk.ac.ed.lfcs>.
  1580.  
  1581. 1 libpbm              C LIBRARY FUNCTIONS              libpbm
  1582.      libpbm - functions to support portable bitmap programs
  1583.  
  1584. 2 Synopsis
  1585.      #include <pbm.h>
  1586.      cc ... libpbm.a
  1587.  
  1588.  
  1589. 2 Description - PACKAGE-WIDE ROUTINES
  1590.   KEYWORD MATCHING
  1591.      int pm_keymatch( char* str, char* keyword, int minchars )
  1592.  
  1593.      Does a case-insensitive match of str against  keyword.   str
  1594.      can be a leading sunstring of keyword, but at least minchars
  1595.      must be present.
  1596.  
  1597.   LOG BASE TWO
  1598.      int pm_maxvaltobits( int maxval )
  1599.      int pm_bitstomaxval( int bits )
  1600.  
  1601.      Convert between a maxval and  the  minimum  number  of  bits
  1602.      required to hold it.
  1603.  
  1604.   MESSAGES AND ERRORS
  1605.      void pm_message( char* fmt, ... )
  1606.  
  1607.      printf() style routine to write an informational message.
  1608.  
  1609.      void pm_error( char* fmt, ... )
  1610.  
  1611.      printf() style routine to write an error message and abort.
  1612.  
  1613.      void pm_usage( char* usage )
  1614.  
  1615.      Write a usage message.   The  string  should  indicate  what
  1616.      arguments are to be provided to the program.
  1617.  
  1618.   GENERIC FILE MANAGEMENT
  1619.      FILE* pm_openr( char* name )
  1620.  
  1621.      Open the given file  for  reading,  with  appropriate  error
  1622.      checking.   A  filename  of  "-"  is  taken as equivalent to
  1623.      stdin.
  1624.  
  1625.      FILE* pm_openw( char* name )
  1626.  
  1627.      Open the given file  for  writing,  with  appropriate  error
  1628.      checking.
  1629.  
  1630.      void pm_close( FILE* fp )
  1631.  
  1632.      Close the file descriptor, with appropriate error checking.
  1633.  
  1634.   ENDIAN I/O
  1635.      int pm_readbigshort( FILE* in, short* sP )
  1636.      int pm_writebigshort( FILE* out, short s )
  1637.      int pm_readbiglong( FILE* in, long* lP )
  1638.      int pm_writebiglong( FILE* out, long l )
  1639.      int pm_readlittleshort( FILE* in, short* sP )
  1640.      int pm_writelittleshort( FILE* out, short s )
  1641.      int pm_readlittlelong( FILE* in, long* lP )
  1642.      int pm_writelittlelong( FILE* out, long l )
  1643.  
  1644.      Routines to read and write short and  long  ints  in  either
  1645.      big- or little-endian byte order.
  1646.  
  1647. 2 Description - PBM-SPECIFIC ROUTINES
  1648.   TYPES AND CONSTANTS
  1649.      typedef ... bit;
  1650.      #define PBM_WHITE ...
  1651.      #define PBM_BLACK ...
  1652.  
  1653.      each bit should contain only  the  values  of  PBM_WHITE  or
  1654.      PBM_BLACK.
  1655.  
  1656.      #define PBM_FORMAT ...
  1657.      #define RPBM_FORMAT ...
  1658.      #define PBM_TYPE PBM_FORMAT
  1659.      #define PBM_FORMAT_TYPE(f) ...
  1660.  
  1661.      For distinguishing different file formats and types.
  1662.  
  1663.   INITIALIZATION
  1664.      void pbm_init( int* argcP, char* argv[] )
  1665.  
  1666.      All PBM programs must call this routine.
  1667.  
  1668.   MEMORY MANAGEMENT
  1669.      bit** pbm_allocarray( int cols, int rows )
  1670.  
  1671.      Allocate an array of bits.
  1672.  
  1673.      bit* pbm_allocrow( int cols )
  1674.  
  1675.      Allocate a row of the given number of bits.
  1676.  
  1677.      void pbm_freearray( bit** bits, int rows )
  1678.  
  1679.      Free the array allocated  with  pbm_allocarray()  containing
  1680.      the given number of rows.
  1681.  
  1682.      void pbm_freerow( bit* bitrow )
  1683.  
  1684.      Free a row of bits.
  1685.  
  1686.   READING FILES
  1687.      void pbm_readpbminit( FILE* fp, int* colsP, int* rowsP, int* formatP )
  1688.  
  1689.      Read the header from a PBM file, filling in the  rows,  cols
  1690.      and format variables.
  1691.  
  1692.      void pbm_readpbmrow( FILE* fp, bit* bitrow, int cols, int format )
  1693.  
  1694.      Read a row of bits into the bitrow array.  Format  and  cols
  1695.      were filled in by pbm_readpbminit().
  1696.  
  1697.      bit** pbm_readpbm( FILE* fp, int* colsP, int* rowsP )
  1698.  
  1699.      Read an entire bitmap file into memory, returning the  allo-
  1700.      cated  array  and  filling  in  the rows and cols variables.
  1701.      This function combines  pbm_readpbminit(),  pbm_allocarray()
  1702.      and pbm_readpbmrow().
  1703.  
  1704.      char* pm_read_unknown_size( FILE* fp, long* nread )
  1705.  
  1706.      Read an entire file or input stream of  unknown  size  to  a
  1707.      buffer.   Allocate memory more memory as needed. The calling
  1708.      routine has  to  free  the  allocated  buffer  with  free().
  1709.      pm_read_unknown_size()  returns  a  pointer to the allocated
  1710.      buffer. The nread argument returns the number of bytes read.
  1711.  
  1712.   WRITING FILES
  1713.      void pbm_writepbminit( FILE* fp, int cols, int rows, int forceplain )
  1714.  
  1715.      Write the header for a portable bitmap file.  The forceplain
  1716.      flag forces a plain-format file to be written, as opposed to
  1717.      a raw-format one.
  1718.  
  1719.      void pbm_writepbmrow( FILE* fp, bit* bitrow, int cols, int forceplain )
  1720.  
  1721.      Write a row from a portable bitmap.
  1722.  
  1723.      void pbm_writepbm( FILE* fp, bit** bits, int cols, int rows, int forceplain )
  1724.  
  1725.      Write the header and all data for a portable  bitmap.   This
  1726.      function combines pbm_writepbminit() and pbm_writepbmrow().
  1727.  
  1728. 2 See_Also
  1729.      libpgm, libppm, libpnm
  1730.  
  1731. 2 Author
  1732.      Copyright (C) 1989, 1991 by Tony Hansen and Jef Poskanzer.
  1733.  
  1734. 1 pbm
  1735.      pbm - portable bitmap file format
  1736.  
  1737. 2 Description
  1738.      The portable bitmap format is a  lowest  common  denominator
  1739.      monochrome  file format.  It was originally designed to make
  1740.      it reasonable to mail bitmaps  between  different  types  of
  1741.      machines  using  the  typical stupid network mailers we have
  1742.      today.  Now it serves as the common language of a large fam-
  1743.      ily of bitmap conversion filters.  The definition is as fol-
  1744.      lows:
  1745.  
  1746.      - A "magic number" for identifying the  file  type.   A  pbm
  1747.        file's magic number is the two characters "P1".
  1748.  
  1749.      - Whitespace (blanks, TABs, CRs, LFs).
  1750.  
  1751.      - A width, formatted as ASCII characters in decimal.
  1752.  
  1753.      - Whitespace.
  1754.  
  1755.      - A height, again in ASCII decimal.
  1756.  
  1757.      - Whitespace.
  1758.  
  1759.      - Width * height bits, each either '1' or '0',  starting  at
  1760.        the  top-left  corner  of the bitmap, proceeding in normal
  1761.        English reading order.
  1762.  
  1763.      - The character '1' means black, '0' means white.
  1764.  
  1765.      - Whitespace in the bits section is ignored.
  1766.  
  1767.      - Characters from a "#" to the next end-of-line are  ignored
  1768.        (comments).
  1769.  
  1770.      - No line should be longer than 70 characters.
  1771.  
  1772.      Here is an example of a small bitmap in this format:
  1773.      P1
  1774.      # feep.pbm
  1775.      24 7
  1776.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  1777.      0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  1778.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  1779.      0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  1780.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  1781.      0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  1782.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  1783.  
  1784.      Programs that read this format should be as lenient as  pos-
  1785.      sible, accepting anything that looks remotely like a bitmap.
  1786.      There is also a variant on the format, available by  setting
  1787.      the  RAWBITS  option  at compile time.  This variant is dif-
  1788.      ferent in the following ways:
  1789.  
  1790.      - The "magic number" is "P4" instead of "P1".
  1791.  
  1792.      - The bits are stored eight per byte, high bit first low bit
  1793.        last.
  1794.  
  1795.      - No whitespace is allowed in the bits section, and  only  a
  1796.        single  character  of  whitespace (typically a newline) is
  1797.        allowed after the height.
  1798.  
  1799.      - The files are eight times smaller and many times faster to
  1800.        read and write.
  1801.  
  1802. 2 See_Also
  1803.     atktopbm, brushtopbm,  cmuwmtopbm,  g3topbm,  gemtopbm, icontopbm,
  1804.     macptopbm,  mgrtopbm,  pi3topbm,   xbmtopbm,  ybmtopbm,  pbmto10x,
  1805.     pnmtoascii, pbmtoatk, pbmtobbnbg, pbmtocmuwm, pbmtoepson, pbmtog3,
  1806.     pbmtogem,  pbmtogo,  pbmtoicon,  pbmtolj,  pbmtomacp,    pbmtomgr,
  1807.     pbmtopi3,  pbmtoplot,  pbmtoptx,  pbmtox10bm,  pbmtoxbm, pbmtoybm,
  1808.     pbmtozinc,  pbmlife, pbmmake, pbmmask, pbmreduce, pbmtext, pbmupc,
  1809.     pnm, pgm, ppm
  1810.  
  1811. 2 Author
  1812.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  1813.  
  1814. 1 bioradtopgm
  1815.      bioradtopgm - convert a Biorad confocal file into a portable
  1816.      graymap
  1817.  
  1818. 2 Synopsis
  1819.      bioradtopgm [-image#] [imagedata]
  1820.  
  1821. 2 Description
  1822.      Reads a Biorad confocal file as input.  Produces a  portable
  1823.      graymap  as  output.  If the resulting image is upside down,
  1824.      run it through pnmflip -tb .
  1825.  
  1826. 2 Options
  1827.      -image#
  1828.           A Biorad image file may contain more  than  one  image.
  1829.           With  this flag, you can specify which image to extract
  1830.           (only one at a time). The first image in the  file  has
  1831.           number  zero.  If  no  image  number  is supplied, only
  1832.           information about the image  size  and  the  number  of
  1833.           images  in  the input is printed out. No output is pro-
  1834.           duced.
  1835.  
  1836. 2 Bugs
  1837.      A Biorad image may be in word format. If PbmPlus is not com-
  1838.      piled  with  the "BIGGRAYS" flag, word files can not be con-
  1839.      verted. See the Makefile.
  1840.  
  1841. 2 See_Also
  1842.      pgm, pnmflip
  1843.  
  1844. 2 Authors
  1845.      Copyright (C) 1993 by Oliver Trepte
  1846.  
  1847. 1 fitstopgm
  1848.      fitstopgm - convert a FITS file into a portable graymap
  1849.  
  1850. 2 Synopsis
  1851.      fitstopgm [-image N] [FITSfile]
  1852.  
  1853. 2 Description
  1854.      Reads a FITS file as input.  Produces a portable graymap  as
  1855.      output.   The results may need to be flipped top for bottom;
  1856.      if so, just pipe the output through pnmflip -tb.
  1857.  
  1858. 2 Options
  1859.      The -image option is for FITS files with  three  axes.   The
  1860.      assumption  is  that  the third axis is for multiple images,
  1861.      and this option lets you select which one you want.
  1862.  
  1863.      All flags can be abbreviated to their shortest  unique  pre-
  1864.      fix.
  1865.  
  1866. 2 References
  1867.      FITS stands for Flexible Image  Transport  System.   A  full
  1868.      description can be found in Astronomy & Astrophysics Supple-
  1869.      ment Series 44 (1981), page 363.
  1870.  
  1871. 2 See_Also
  1872.      pgmtofits, pgm, pnmflip
  1873.  
  1874. 2 Author
  1875.      Copyright (C) 1989 by Jef Poskanzer.
  1876.  
  1877. 1 fstopgm
  1878.      fstopgm - convert a Usenix FaceSaver(tm) file into  a  port-
  1879.      able graymap
  1880.  
  1881. 2 Synopsis
  1882.      fstopgm [fsfile]
  1883.  
  1884. 2 Description
  1885.      Reads a Usenix FaceSaver(tm)  file  as  input.   Produces  a
  1886.      portable graymap as output.
  1887.  
  1888.      FaceSaver(tm)  files  sometimes  have  rectangular   pixels.
  1889.      While  fstopgm  won't  re-scale  them into square pixels for
  1890.      you, it will give you the precise pnmscale command that will
  1891.      do  the job.  Because of this, reading a FaceSaver(tm) image
  1892.      is a two-step process.  First you do:
  1893.        fstopgm > /dev/null
  1894.      This will tell you whether you need to  use  pnmscale.  Then
  1895.      use one of the following pipelines:
  1896.        fstopgm | pgmnorm
  1897.        fstopgm | pnmscale -whatever | pgmnorm
  1898.      To go to PBM, you want something more like one of these:
  1899.        fstopgm | pnmenlarge 3 | pgmnorm | pgmtopbm
  1900.        fstopgm | pnmenlarge 3 | pnmscale <whatever> | pgmnorm | pgmtopbm
  1901.      You want to enlarge when going to a bitmap because otherwise
  1902.      you  lose information; but enlarging by more than 3 does not
  1903.      look good.
  1904.  
  1905.      FaceSaver is a registered trademark of  Metron  Computerware
  1906.      Ltd. of Oakland, CA.
  1907.  
  1908. 2 See_Also
  1909.      pgmtofs, pgm, pgmnorm, pnmenlarge,  pnmscale,
  1910.      pgmtopbm
  1911.  
  1912. 2 Author
  1913.      Copyright (C) 1989 by Jef Poskanzer.
  1914.  
  1915. 1 hipstopgm
  1916.      hipstopgm - convert a HIPS file into a portable graymap
  1917.  
  1918. 2 Synopsis
  1919.      hipstopgm [hipsfile]
  1920.  
  1921. 2 Description
  1922.      Reads a HIPS file as input.  Produces a portable graymap  as
  1923.      output.
  1924.  
  1925.      If the HIPS file contains more than one frame  in  sequence,
  1926.      hipstopgm will concatenate all the frames vertically.
  1927.  
  1928.      HIPS is a format developed at the Human Information Process-
  1929.      ing Laboratory, NYU.
  1930.  
  1931. 2 See_Also
  1932.      pgm
  1933.  
  1934. 2 Author
  1935.      Copyright (C) 1989 by Jef Poskanzer.
  1936.  
  1937. 1 lispmtopgm
  1938.      lispmtopgm - convert a Lisp Machine  bitmap  file  into  pgm
  1939.      format
  1940.  
  1941. 2 Synopsis
  1942.      lispmtopgm [lispmfile]
  1943.  
  1944. 2 Description
  1945.      Reads a Lisp Machine bitmap as input.  Produces  a  portable
  1946.      graymap as output.
  1947.  
  1948.      This is the file format written by  the  tv:write-bit-array-
  1949.      file function on TI Explorer and Symbolics lisp machines.
  1950.  
  1951.      Multi-plane bitmaps on lisp  machines  are  color;  but  the
  1952.      lispm  image file format does not include a color map, so we
  1953.      must treat it as a graymap instead.  This is unfortunate.
  1954.  
  1955. 2 See_Also
  1956.      pgmtolispm, pgm
  1957.  
  1958. 2 Bugs
  1959.      The Lispm bitmap file format is a bit quirky;   Usually  the
  1960.      image  in  the  file  has  its  width rounded up to the next
  1961.      higher multiple of 32, but not always.  If the width is  not
  1962.      a  multiple  of  32,  we  don't  deal  with it properly, but
  1963.      because of the Lispm microcode, such arrays are probably not
  1964.      image data anyway.
  1965.  
  1966.      Also, the lispm code for saving bitmaps has a bug,  in  that
  1967.      if  you  are writing a bitmap which is not mod32 across, the
  1968.      file may be up to 7 bits too short!  They round down instead
  1969.      of up, and we don't handle this bug gracefully.
  1970.  
  1971.      No color.
  1972.  
  1973. 2 Author
  1974.      Copyright (C) 1991 by Jamie Zawinski and Jef Poskanzer.
  1975.  
  1976. 1 pbmtopgm
  1977.      pbmtopgm - convert portable bitmap to  portable  graymap  by
  1978.      averaging areas
  1979.  
  1980. 2 Synopsis
  1981.      pbmtopgm <width> <height> [pbmfile]
  1982.  
  1983. 2 Description
  1984.      Reads a portable bitmap as input. Outputs a portable graymap
  1985.      created  by  averaging  the number of pixels within a sample
  1986.      area of width by height around each point. Pbmtopgm is simi-
  1987.      lar  to a special case of ppmconvol. A ppmsmooth step may be
  1988.      needed after pbmtopgm.
  1989.  
  1990.      Pbmtopgm has the effect of anti-aliasing bitmaps which  con-
  1991.      tain distinct line features.
  1992.  
  1993. 2 See_Also
  1994.      pbm
  1995.  
  1996. 2 Author
  1997.      Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef
  1998.      Poskanzer.
  1999.  
  2000.      Permission  to  use,  copy,  modify,  and  distribute   this
  2001.      software  and  its documentation for any purpose and without
  2002.      fee is hereby granted, provided  that  the  above  copyright
  2003.      notice  appear  in  all  copies and that both that copyright
  2004.      notice and this permission notice appear in supporting docu-
  2005.      mentation.   This  software  is  provided  "as  is"  without
  2006.      express or implied warranty.
  2007.  
  2008. 2 Notes
  2009.      Pbmtopgm works best with odd sample width and heights.
  2010.  
  2011. 1 pgmbentley
  2012.      pgmbentley - Bentleyize a portable graymap
  2013.  
  2014. 2 Synopsis
  2015.      pgmbentley [pgmfile]
  2016.  
  2017. 2 Description
  2018.      Reads a portable graymap as  input.   Performs  The  Bentley
  2019.      Effect, and writes a portable graymap as output.
  2020.  
  2021.      The Bentley Effect is described in "Beyond  Photography"  by
  2022.      Holzmann,  chapter  4,  photo  4.   It's a vertical smearing
  2023.      based on brightness.
  2024.  
  2025. 2 See_Also
  2026.      pgmoil, ppmrelief, pgm
  2027.  
  2028. 2 Author
  2029.      Copyright (C) 1990 by Wilson Bent (whb@hoh-2.att.com)
  2030.  
  2031. 1 pgmenhance
  2032.      pgmenhance - edge-enhance a portable graymap
  2033.  
  2034. 2 Synopsis
  2035.      pgmenhance [-N] [pgmfile]
  2036.  
  2037. 2 Description
  2038.      Reads a portable graymap as input.  Enhances the edges,  and
  2039.      writes a portable graymap as output.
  2040.  
  2041.      The  edge  enhancing  technique  is  taken  from  Philip  R.
  2042.      Thompson's "xim" program, which in turn took it from section
  2043.      6 of "Digital Halftones by Dot Diffusion", D. E. Knuth,  ACM
  2044.      Transaction  on  Graphics Vol. 6, No. 4, October 1987, which
  2045.      in turn got it from two 1976 papers by J. F. Jarvis et. al.
  2046.  
  2047. 2 Options
  2048.      The optional -N flag should be a digit from 1 to  9.   1  is
  2049.      the  lowest  level  of  enhancement,  9  is the highest, The
  2050.      default is 9.
  2051.  
  2052. 2 See_Also
  2053.      pgmedge, pgm, pbm
  2054.  
  2055. 2 Author
  2056.      Copyright (C) 1989 by Jef Poskanzer.
  2057.  
  2058. 1 pgmhist
  2059.      pgmhist - print a histogram of  the  values  in  a  portable
  2060.      graymap
  2061.  
  2062. 2 Synopsis
  2063.      pgmhist [pgmfile]
  2064.  
  2065. 2 Description
  2066.      Reads a portable graymap as input.  Prints  a  histogram  of
  2067.      the gray values.
  2068.  
  2069. 2 See_Also
  2070.      pgmnorm, pgm, ppmhist
  2071.  
  2072. 2 Author
  2073.      Copyright (C) 1989 by Jef Poskanzer.
  2074.  
  2075. 1 pgmnoise
  2076.      pgmnoise - create a graymap made up of white noise
  2077.  
  2078. 2 Synopsis
  2079.      pgmnoise width height
  2080.  
  2081. 2 Description
  2082.      Creates a portable graymap that is made up of random  pixels
  2083.      with gray values in the range of 0 to PGM_MAXMAXVAL (depends
  2084.      on the compilation, either 255 or 65535). The graymap has  a
  2085.      size of width * height pixels.
  2086.  
  2087. 2 See_Also
  2088.      pgm(5)
  2089.  
  2090. 2 Author
  2091.      Copyright (C) 1993 by Frank Neumann
  2092.  
  2093. 1 pgmnorm
  2094.      pgmnorm - normalize the contrast in a portable graymap
  2095.  
  2096. 2 Synopsis
  2097.      pgmnorm [-bpercent N | -bvalue N] [-wpercent N | -wvalue  N]
  2098.      [pgmfile]
  2099.  
  2100. 2 Description
  2101.      Reads a portable graymap as input.  Normalizes the  contrast
  2102.      by  forcing the lightest pixels to white, the darkest pixels
  2103.      to black, and linearly rescaling the ones  in  between;  and
  2104.      produces a portable graymap as output.
  2105.  
  2106. 2 Options
  2107.      By default, the darkest 2 percent of all pixels  are  mapped
  2108.      to  black,  and  the lightest 1 percent are mapped to white.
  2109.      You can override these percentages by  using  the  -bpercent
  2110.      and  -wpercent  flags,  or  you  can specify the exact pixel
  2111.      values to be mapped by using the -bvalue and -wvalue  flags.
  2112.      Appropriate  numbers  for  the  flags can be gotten from the
  2113.      pgmhist tool.  If you just want  to  enhance  the  contrast,
  2114.      then choose values at elbows in the histogram; e.g. if value
  2115.      29 represents 3% of the image but value 30  represents  20%,
  2116.      choose  30  for  bvalue.   If you want to lighten the image,
  2117.      then set bvalue to 0 and just fiddle with wvalue; similarly,
  2118.      to  darken  the  image,  set  wvalue to maxval and play with
  2119.      bvalue.
  2120.  
  2121.      All flags can be abbreviated to their shortest  unique  pre-
  2122.      fix.
  2123.  
  2124. 2 See_Also
  2125.      pgmhist, pgm
  2126.  
  2127. 2 Author
  2128.      Partially based on the fbnorm filter  in  Michael  Mauldin's
  2129.      "Fuzzy Pixmap" package.
  2130.  
  2131.      Copyright (C) 1989 by Jef Poskanzer.
  2132.  
  2133. 1 pgmoil
  2134.      pgmoil - turn a portable graymap into an oil painting
  2135.  
  2136. 2 Synopsis
  2137.      pgmoil [-n N] [pgmfile]
  2138.  
  2139. 2 Description
  2140.      Reads a portable graymap as input.  Does an "oil  transfer",
  2141.      and writes a portable graymap as output.
  2142.  
  2143.      The oil transfer is described  in  "Beyond  Photography"  by
  2144.      Holzmann,  chapter  4,  photo  7.   It's a sort of localized
  2145.      smearing.
  2146.  
  2147. 2 Options
  2148.      The optional -n flag controls the size of the area  smeared.
  2149.      The default value is 3.
  2150.  
  2151. 2 Bugs
  2152.      Takes a long time to run.
  2153.  
  2154. 2 See_Also
  2155.      pgmbentley, ppmrelief, pgm
  2156.  
  2157. 2 Author
  2158.      Copyright (C) 1990 by Wilson Bent (whb@hoh-2.att.com)
  2159.  
  2160. 1 pgmramp
  2161.      pgmramp - generate a grayscale ramp
  2162.  
  2163. 2 Synopsis
  2164.      pgmramp -lr|-tb | -rectangle|-ellipse width height
  2165.  
  2166. 2 Description
  2167.      Generates a graymap  of  the  specified  size  containing  a
  2168.      black-to-white ramp.  These ramps are useful for multiplying
  2169.      with other images, using the pnmarith tool.
  2170.  
  2171. 2 Options
  2172.      -lr  A left to right ramp.
  2173.  
  2174.      -tb  A top to bottom ramp.
  2175.  
  2176.      -rectangle
  2177.           A rectangular ramp.
  2178.  
  2179.      -ellipse
  2180.           An elliptical ramp.
  2181.  
  2182.      All flags can be abbreviated to their shortest  unique  pre-
  2183.      fix.
  2184.  
  2185. 2 See_Also
  2186.      pnmarith, pgm
  2187.  
  2188. 2 Author
  2189.      Copyright (C) 1989 by Jef Poskanzer.
  2190.  
  2191. 1 pgmtofits
  2192.      pgmtofits - convert a portable graymap into FITS format
  2193.  
  2194. 2 Synopsis
  2195.      pgmtofits [pgmfile]
  2196.  
  2197. 2 Description
  2198.      Reads a portable graymap as input.  Produces a FITS file  as
  2199.      output.
  2200.  
  2201.      FITS stands for Flexible Image  Transport  System.   A  full
  2202.      description can be found in Astronomy & Astrophysics Supple-
  2203.      ment Series 44 (1981), page 363.
  2204.  
  2205. 2 See_Also
  2206.      fitstopgm, pgm
  2207.  
  2208. 2 Author
  2209.      Copyright (C) 1989 by Wilson H. Bent (whb@hoh-2.att.com).
  2210.  
  2211. 1 pgmtofs
  2212.      pgmtofs - convert portable graymap to  Usenix  FaceSaver(tm)
  2213.      format
  2214.  
  2215. 2 Synopsis
  2216.      pgmtofs [pgmfile]
  2217.  
  2218. 2 Description
  2219.      Reads  a  portable  graymap  as  input.    Produces   Usenix
  2220.      FaceSaver(tm) format as output.
  2221.  
  2222.      FaceSaver is a registered trademark of  Metron  Computerware
  2223.      Ltd. of Oakland, CA.
  2224.  
  2225. 2 See_Also
  2226.      fstopgm, pgm
  2227.  
  2228. 2 Author
  2229.      Copyright (C) 1991 by Jef Poskanzer.
  2230.  
  2231. 1 pgmtolispm
  2232.      pgmtolispm - convert a portable graymap  into  Lisp  Machine
  2233.      format
  2234.  
  2235. 2 Synopsis
  2236.      pgmtolispm [pgmfile]
  2237.  
  2238. 2 Description
  2239.      Reads a portable graymap as input.  Produces a Lisp  Machine
  2240.      bitmap as output.
  2241.  
  2242.      This is the file format read by  the  tv:read-bit-array-file
  2243.      function on TI Explorer and Symbolics lisp machines.
  2244.  
  2245.      Given a pgm (instead of a pbm) a multi-plane image  will  be
  2246.      output.  This is probably not useful unless you have a color
  2247.      lisp machine.
  2248.  
  2249.      Multi-plane bitmaps on lisp  machines  are  color;  but  the
  2250.      lispm  image file format does not include a color map, so we
  2251.      must treat it as a graymap instead.  This is unfortunate.
  2252.  
  2253. 2 See_Also
  2254.      lispmtopgm, pgm
  2255.  
  2256. 2 Bugs
  2257.      Output width is always rounded up to the nearest multiple of
  2258.      32;  this might not always be what you want, but it probably
  2259.      is (arrays which are not modulo 32 cannot be passed  to  the
  2260.      Lispm  BITBLT  function, and thus cannot easily be displayed
  2261.      on the screen).
  2262.  
  2263.      No color.
  2264.  
  2265. 2 Author
  2266.      Copyright (C) 1991 by Jamie Zawinski and Jef Poskanzer.
  2267.  
  2268. 1 pgmtopbm
  2269.      pgmtopbm - convert a portable graymap into a portable bitmap
  2270.  
  2271. 2 Synopsis
  2272.      pgmtopbm [-floyd|-fs|-threshold  |-dither8|-d8|-cluster3  |-
  2273.      c3|-cluster4|-c4 |-cluster8|-c8] [-value val] [pgmfile]
  2274.  
  2275. 2 Description
  2276.      Reads a portable graymap as input.  Produces a portable bit-
  2277.      map as output.
  2278.  
  2279.      Note that there is no pbmtopgm converter,  because  any  pgm
  2280.      program can read pbm files automagically.
  2281.  
  2282. 2 Options
  2283.      The default quantization method  is  boustrophedonic  Floyd-
  2284.      Steinberg  error  diffusion (-floyd or -fs).  Also available
  2285.      are simple thresholding (-threshold); Bayer's ordered dither
  2286.      (-dither8) with a 16x16 matrix; and three different sizes of
  2287.      45-degree  clustered-dot  dither  (-cluster3,  -cluster4,  -
  2288.      cluster8).
  2289.  
  2290.      Floyd-Steinberg will almost always  give  the  best  looking
  2291.      results;  however, looking good is not always what you want.
  2292.      For instance, thresholding can be used in  a  pipeline  with
  2293.      the  pnmconvol tool, for tasks like edge and peak detection.
  2294.      And clustered-dot dithering gives a  newspaper-ish  look,  a
  2295.      useful special effect.
  2296.  
  2297.      The -value flag alters the  thresholding  value  for  Floyd-
  2298.      Steinberg  and  simple  thresholding.   It  should be a real
  2299.      number between 0 and 1.   Above  0.5  means  darker  images;
  2300.      below 0.5 means lighter.
  2301.  
  2302.      All flags can be abbreviated to their shortest  unique  pre-
  2303.      fix.
  2304.  
  2305. 2 References
  2306.      The only reference you need for this stuff is "Digital Half-
  2307.      toning" by Robert Ulichney, MIT Press, ISBN 0-262-21009-6.
  2308.  
  2309. 2 See_Also
  2310.      pbmreduce, pgm, pbm, pnmconvol
  2311.  
  2312. 2 Author
  2313.      Copyright (C) 1989 by Jef Poskanzer.
  2314.  
  2315. 1 psidtopgm
  2316.      psidtopgm - convert PostScript "image" data into a  portable
  2317.      graymap
  2318.  
  2319. 2 Synopsis
  2320.      psidtopgm width height bits/sample [imagedata]
  2321.  
  2322. 2 Description
  2323.      Reads the "image" data from  a  PostScript  file  as  input.
  2324.      Produces a portable graymap as output.
  2325.  
  2326.      This is a very simple and limited program, and is here  only
  2327.      because  so  many  people  have asked for it.  To use it you
  2328.      have to manually extract the readhexstring data portion from
  2329.      your  PostScript  file, and then give the width, height, and
  2330.      bits/sample on the command line.  Before you  attempt  this,
  2331.      you  should  at  least  read  the description of the "image"
  2332.      operator in the PostScript Language Reference Manual.
  2333.  
  2334.      It would probably not be too hard to  write  a  script  that
  2335.      uses  this  filter  to read a specific variety of PostScript
  2336.      image, but the variation is too great  to  make  a  general-
  2337.      purpose  reader.   Unless,  of  course,  you want to write a
  2338.      full-fledged PostScript interpreter...
  2339.  
  2340. 2 See_Also
  2341.      pnmtops, pgm
  2342.  
  2343. 2 Author
  2344.      Copyright (C) 1989 by Jef Poskanzer.
  2345.  
  2346. 1 spottopgm
  2347.      spottopgm - convert SPOT satellite images to Portable  Grey-
  2348.      map format
  2349.  
  2350. 2 Synopis
  2351.      spottopgm [-1|2|3]  [Firstcol  Firstline  Lastcol  Lastline]
  2352.      inputfile
  2353.  
  2354. 2 Options
  2355.      -1|2|3  Extract the given colour from the  SPOT  image.  The
  2356.              colours  are  infra-red,  visible  light  and ultra-
  2357.              violet, although I don't know which  corresponds  to
  2358.              which  number.  If the image is in colour, this will
  2359.              be announced on standard error. The  default  colour
  2360.              is 1.
  2361.  
  2362.      Firstcol Firstline Lastcol Lastline
  2363.              Extract the specified rectangle from the SPOT image.
  2364.              Most  SPOT  images  are  3000 lines long and 3000 or
  2365.              more columns wide.  Unfortunately  the  SPOT  format
  2366.              only  gives  the width and not the length. The width
  2367.              is printed on standard error. The default  rectangle
  2368.              is the width of the input image by 3000 lines.
  2369.  
  2370. 2 Description
  2371.      Spottopgm converts the named inputfile into Portable Greymap
  2372.      format,  defaulting  to  the  first color and the whole SPOT
  2373.      image unless specified by the options.
  2374.  
  2375. 2 INSTALLATION
  2376.      You  must  edit  the  source  program  and   either   define
  2377.      BIGNDIAN  or  LITTLENDIAN,  and  fix  the  typedefs  for
  2378.      uint32, uint16 and uint8 appropriately.
  2379.  
  2380. 2 Bugs
  2381.      Currently spottopgm doesn't  determine  the  length  of  the
  2382.      input  file;  this  would  involve two passes over the input
  2383.      file. It defaults to 3000 lines instead.
  2384.  
  2385.      Spottopgm could extract a three-color  image  (ppm),  but  I
  2386.      didn't feel like making the program more complicated than it
  2387.      is now.  Besides,  there  is  no  one-to-one  correspondence
  2388.      between  red,  green, blue and infra-red, visible and ultra-
  2389.      violet.
  2390.  
  2391.      I've only had a limited number of SPOT images to play  with,
  2392.      and  therefore wouldn't guarantee that this will work on any
  2393.      other images.
  2394.  
  2395. 2 Author
  2396.      Warren Toomey  wkt@csadfa.cs.adfa.oz.au
  2397.  
  2398. 1 pgmcrater
  2399.      pgmcrater - create cratered terrain by fractal forgery
  2400.  
  2401. 2 Synopsis
  2402.      pgmcrater [-number n] [-height|-ysize s] [-width|-xsize s]
  2403.                [-gamma g]
  2404.  
  2405. 2 Description
  2406.      pgmcrater creates a portable graymap which  mimics  cratered
  2407.      terrain.  The graymap is created by simulating the impact of
  2408.      a given number of craters with  random  position  and  size,
  2409.      then  rendering  the resulting terrain elevations based on a
  2410.      light source shining from one side of the screen.  The  size
  2411.      distribution  of  the  craters is based on a power law which
  2412.      results in many more small craters  than  large  ones.   The
  2413.      number  of  craters of a given size varies as the reciprocal
  2414.      of the area as described on pages 31 and 32 of  Peitgen  and
  2415.      Saupe[1];  cratered  bodies in the Solar System are observed
  2416.      to obey this  relationship.   The  formula  used  to  obtain
  2417.      crater  radii  governed by this law from a uniformly distri-
  2418.      buted pseudorandom sequence was developed by Rudy Rucker.
  2419.  
  2420.      High resolution images with large numbers of  craters  often
  2421.      benefit  from  being piped through pnmsmooth.  The averaging
  2422.      performed by this process eliminates some of the jagged pix-
  2423.      els  and  lends  a  mellow  ``telescopic image'' feel to the
  2424.      overall picture.
  2425.  
  2426. 2 Options
  2427.      -number n Causes n craters to be generated.  If  no  -number
  2428.                specification is given, 50000 craters will be gen-
  2429.                erated.  Don't expect to see them all!  For  every
  2430.                large  crater  there are many, many more tiny ones
  2431.                which tend simply to erode the landscape.  In gen-
  2432.                eral,  the more craters you specify the more real-
  2433.                istic the result; ideally you want the entire ter-
  2434.                rain  to  have  been extensively turned over again
  2435.                and again by cratering.   High  resolution  images
  2436.                containing  five  to ten million craters are stun-
  2437.                ning but take quite a while to create.
  2438.  
  2439.      -height height
  2440.                Sets the height of the generated image  to  height
  2441.                pixels.  The default height is 256 pixels.
  2442.  
  2443.      -width width
  2444.                Sets the width of the  generated  image  to  width
  2445.                pixels.  The default width is 256 pixels.
  2446.  
  2447.      -xsize width
  2448.                Sets the width of the  generated  image  to  width
  2449.                pixels.  The default width is 256 pixels.
  2450.  
  2451.  
  2452.      -ysize height
  2453.                Sets the height of the generated image  to  height
  2454.                pixels.  The default height is 256 pixels.
  2455.  
  2456.      -gamma factor
  2457.                The specified factor is used to gamma correct  the
  2458.                graymap   in  the  same  manner  as  performed  by
  2459.                pnmgamma.  The default value is 1.0, which results
  2460.                in  a medium contrast image.  Values larger than 1
  2461.                lighten  the  image  and  reduce  contrast,  while
  2462.                values  less  than  1 darken the image, increasing
  2463.                contrast.
  2464.  
  2465.      All flags can be abbreviated to their shortest  unique  pre-
  2466.      fix.
  2467.  
  2468. 2 Bugs
  2469.      The -gamma option  isn't  really  necessary  since  you  can
  2470.      achieve  the same effect by piping the output from pgmcrater
  2471.      through pnmgamma.  However, pgmcrater performs  an  internal
  2472.      gamma  map  anyway in the process of rendering the elevation
  2473.      array into a graymap, so there's no additional  overhead  in
  2474.      allowing a user-specified gamma.
  2475.  
  2476.      Real craters  have  two  distinct  morphologies.   pgmcrater
  2477.      simulates  only  small  craters,  which are hemispherical in
  2478.      shape (regardless of the incidence angle  of  the  impacting
  2479.      body,  as long as the velocity is sufficiently high).  Large
  2480.      craters, such as Copernicus and Tycho on the  Moon,  have  a
  2481.      ``walled plain'' shape with a cross-section more like:
  2482.                 /\                            /\
  2483.           _____/  \____________/\____________/  \_____
  2484.      Larger craters should really use this profile, including the
  2485.      central  peak,  and totally obliterate the pre-existing ter-
  2486.      rain.
  2487.  
  2488. 2 See_Also
  2489.      pgm, pnmgamma, pnmsmooth
  2490.  
  2491.      [1]  Peitgen, H.-O., and Saupe,  D.  eds.,  The  Science  Of
  2492.           Fractal Images, New York: Springer Verlag, 1988.
  2493.  
  2494. 2 Author
  2495.           John Walker
  2496.           Autodesk SA
  2497.           Avenue des Champs-Montants 14b
  2498.           CH-2074 MARIN
  2499.           Suisse/Schweiz/Svizzera/Svizra/Switzerland
  2500.           Usenet:  kelvin@Autodesk.com
  2501.           Fax:     038/33 88 15
  2502.           Voice:   038/33 76 33
  2503.  
  2504.      software  and  its documentation for any purpose and without
  2505.      fee is hereby granted, without any  conditions  or  restric-
  2506.      tions.   This software is provided ``as is'' without express
  2507.      or implied warranty.
  2508.  
  2509.      PLUGWARE! If you like this kind of stuff, you may also enjoy
  2510.      ``James Gleick's Chaos--The Software'' for MS-DOS, available
  2511.      for $59.95 from your local software store or  directly  from
  2512.      Autodesk,  Inc.,  Attn:  Science Series, 2320 Marinship Way,
  2513.      Sausalito, CA 94965, USA.  Telephone: (800)  688-2344  toll-
  2514.      free  or,  outside  the  U.S. (415) 332-2344 Ext 4886.  Fax:
  2515.      (415) 289-4718.  ``Chaos--The  Software''  includes  a  more
  2516.      comprehensive   fractal   forgery  generator  which  creates
  2517.      three-dimensional landscapes as well as clouds and  planets,
  2518.      plus five more modules which explore other aspects of Chaos.
  2519.      The user guide of more than 200 pages includes an  introduc-
  2520.      tion  by  James  Gleick  and  detailed  explanations by Rudy
  2521.      Rucker of the mathematics and algorithms used by  each  pro-
  2522.      gram.
  2523.  
  2524.  
  2525. 1 pgmedge
  2526.      pgmedge - edge-detect a portable graymap
  2527.  
  2528. 2 Synopsis
  2529.      pgmedge [pgmfile]
  2530.  
  2531. 2 Description
  2532.      Reads a portable graymap as input.  Outlines the edges,  and
  2533.      writes  a  portable  graymap  as  output.  Piping the result
  2534.      through pgmtopbm -threshold and playing with  the  threshold
  2535.      value will give a bitmap of the edges.
  2536.  
  2537.      The edge detection technique used is to take the Pythagorean
  2538.      sum  of  two  Sobel gradient operators at 90 degrees to each
  2539.      other.  For more details see "Digital Image  Processing"  by
  2540.      Gonzalez and Wintz, chapter 7.
  2541.  
  2542. 2 See_Also
  2543.      pgmenhance, pgmtopbm, pgm, pbm
  2544.  
  2545. 2 Author
  2546.      Copyright (C) 1991 by Jef Poskanzer.
  2547.  
  2548. 1 pgmtexture
  2549.      pgmtexture - calculate textural features on a portable gray-
  2550.      map
  2551.  
  2552. 2 Synopsis
  2553.      pgmtexture [-d d] [pgmfile]
  2554.  
  2555. 2 Description
  2556.      Reads a portable  graymap  as  input.   Calculates  textural
  2557.      features  based on spatial dependence matrices at 0, 45, 90,
  2558.      and 135 degrees for a distance d (default  =  1).   Textural
  2559.      features include:
  2560.  
  2561.           (1) Angular Second Moment,
  2562.           (2) Contrast,
  2563.           (3) Correlation,
  2564.           (4) Variance,
  2565.           (5) Inverse Difference Moment,
  2566.           (6) Sum Average,
  2567.           (7) Sum Variance,
  2568.           (8) Sum Entropy,
  2569.           (9) Entropy,
  2570.           (10) Difference Variance,
  2571.           (11) Difference Entropy,
  2572.           (12, 13) Information Measures of Correlation, and
  2573.           (14) Maximal Correlation Coefficient.
  2574.  
  2575.      Algorithm taken from:
  2576.      Haralick, R.M., K. Shanmugam, and I.  Dinstein.  1973.  Tex-
  2577.      tural  features  for image classification. IEEE Transactions
  2578.      on Systems, Man, and Cybertinetics, SMC-3(6):610-621.
  2579.  
  2580. 2 Bugs
  2581.      The program can run incredibly slow for large images (larger
  2582.      than  64  x  64)  and command line options are limited.  The
  2583.      method for finding (14) the maximal correlation coefficient,
  2584.      which  requires  finding  the second largest eigenvalue of a
  2585.      matrix Q, does not always converge.
  2586.  
  2587. 2 References
  2588.      IEEE Transactions on Systems, Man, and  Cybertinetics,  SMC-
  2589.      3(6):610-621.
  2590.  
  2591. 2 See_Also
  2592.      pgm, pnmcut
  2593.  
  2594. 2 Author
  2595.      Copyright (C) 1991 by Texas Agricultural Experiment Station,
  2596.      employer for hire of James Darrell McCauley.
  2597.  
  2598. 1 rawtopgm
  2599.      rawtopgm - convert raw grayscale bytes into a portable gray-
  2600.      map
  2601.  
  2602. 2 Synopsis
  2603.      rawtopgm  [-headerskip  N]  [-rowskip  N]   [-tb|-topbottom]
  2604.      [width height] [imagedata]
  2605.  
  2606. 2 Description
  2607.      Reads raw grayscale bytes as  input.   Produces  a  portable
  2608.      graymap  as output.  The input file is just grayscale bytes.
  2609.      If you don't specify the width and  height  on  the  command
  2610.      line,  the  program will check the size of the image and try
  2611.      to make a quadratic image of it. It is an error to supply  a
  2612.      non  quadratic  image  without  specifying width and height.
  2613.      The maxval is assumed to be 255.
  2614.  
  2615. 2 Options
  2616.      -headerskip
  2617.           If the file has a header, you can use this flag to skip
  2618.           over it.
  2619.  
  2620.      -rowskip
  2621.           If there is padding at the ends of the  rows,  you  can
  2622.           skip  it  with  this  flag.  Note that rowskip can be a
  2623.           real number.  Amazingly, I once had an image with 0.376
  2624.           bytes of padding per row.  This turned out to be due to
  2625.           a file-transfer problem, but I was still able  to  read
  2626.           the image.
  2627.  
  2628.      -tb -topbottom
  2629.           Flips the image upside down.  The first pixel in a  pgm
  2630.           file  is  in  the  lower left corner of the image.  For
  2631.           conversion from images with  the  first  pixel  in  the
  2632.           upper  left  corner  (e.g.  the  Molecular Dynamics and
  2633.           Leica confocal formats) this  flips  the  image  right.
  2634.           This is equivalent to rawtopgm [file] | pnmflip -tb .
  2635.  
  2636. 2 Bugs
  2637.      If you don't specify the image width and height, the program
  2638.      will try to read the entire image to a memory buffer. If you
  2639.      get a message that states that you are out of memory, try to
  2640.      specify  the width and height on the command line. Also, the
  2641.      -tb option consumes much memory.
  2642.  
  2643. 2 See_Also
  2644.      pgm, rawtoppm, pnmflip
  2645.  
  2646. 2 Authors
  2647.      Copyright (C) 1989 by Jef Poskanzer.
  2648.      Modified June 1993 by Oliver Trepte, oliver@fysik4.kth.se
  2649.  
  2650. 1 pnmarith              
  2651.      pnmarith - perform arithmetic on two portable anymaps
  2652.  
  2653. 2 Synopsis
  2654.      pnmarith -add|-subtract|-multiply| pnmfile1 pnmfile2
  2655.  
  2656. 2 Description
  2657.      Reads two portable anymaps as input.  Performs the specified
  2658.      arithmetic operation, and produces a portable anymap as out-
  2659.      put.  The two input anymaps  must  be  the  same  width  and
  2660.      height.
  2661.  
  2662.      The arithmetic is performed between corresponding pixels  in
  2663.      the  two anymaps, as if maxval was 1.0, black was 0.0, and a
  2664.      linear scale in  between.   Results  that  fall  outside  of
  2665.      [0..1) are truncated.
  2666.  
  2667.      The operator -difference calculates the  absolute  value  of
  2668.      pnmarith  -subtract pnmfile1 pnmfile2, i.e. no truncation is
  2669.      done.
  2670.  
  2671.      All flags can be abbreviated to their shortest  unique  pre-
  2672.      fix.
  2673.  
  2674. 2 See_Also
  2675.      pbmmask, pnmpaste, pnminvert, pnm
  2676.  
  2677. 2 Author
  2678.      Copyright (C) 1989, 1991 by Jef Poskanzer.  Lightly modified
  2679.      by Marcel Wijkstra <wijkstra@fwi.uva.nl>
  2680.  
  2681. 1 pnmcat                
  2682.      pnmcat - concatenate portable anymaps
  2683.  
  2684. 2 Synopsis
  2685.      pnmcat   [-white|-black]   -leftright|-lr   [-jtop|-jbottom]
  2686.      pnmfile pnmfile ...
  2687.      pnmcat   [-white|-black]   -topbottom|-tb   [-jleft|-jright]
  2688.      pnmfile pnmfile ...
  2689.  
  2690. 2 Description
  2691.      Reads portable anymaps as input.  Concatenates  them  either
  2692.      left  to  right  or  top  to bottom, and produces a portable
  2693.      anymap as output.
  2694.  
  2695. 2 Options
  2696.      If the anymaps are not all the same height  (left-right)  or
  2697.      width  (top-bottom),  the  smaller ones have to be justified
  2698.      with the largest.  By default, they get  centered,  but  you
  2699.      can specify one side or the other with one of the -j* flags.
  2700.      So, -topbottom -jleft would stack the anymaps on top of each
  2701.      other, flush with the left edge.
  2702.  
  2703.      The -white and -black flags specify what  color  to  use  to
  2704.      fill  in  the extra space when doing this justification.  If
  2705.      neither is specified, the program makes a guess.
  2706.  
  2707.      All flags can be abbreviated to their shortest  unique  pre-
  2708.      fix.
  2709.  
  2710. 2 See_Also
  2711.      pnm
  2712.  
  2713. 2 Author
  2714.      Copyright (C) 1989 by Jef Poskanzer.
  2715.  
  2716. 1 pnmcomp
  2717.      pnmcomp - composite two portable anymap files together
  2718.  
  2719. 2 Synopsis
  2720.      pnmcomp [-invert] [-xoffN] [-yoffN] [-alphapgmfile]  overlay
  2721.      [pnm-input] [pnm-output]
  2722.  
  2723. 2 Description
  2724.      Reads in a portable any map image and put a overlay upon it,
  2725.      with  optional alpha mask.  The -alpha pgmfile allows you to
  2726.      also add an alpha mask file to the compositing process,  the
  2727.      range  of  max  and  min can be swapped by using the -invert
  2728.      option.  The -xoff and  -yoff  arguments  can  be  negative,
  2729.      allowing  you to shift the overlay off the top corner of the
  2730.      screen.
  2731.  
  2732. 2 See_Also
  2733.      pnm
  2734.  
  2735. 2 Author
  2736.      Copyright (C) 1992 by David Koblas (koblas@mips.com).
  2737.  
  2738. 1 pnmconvol             
  2739.      pnmconvol - general MxN convolution on a portable anymap
  2740.  
  2741. 2 Synopsis
  2742.      pnmconvol convolutionfile [pnmfile]
  2743.  
  2744. 2 Description
  2745.      Reads two portable anymaps as input.  Convolves  the  second
  2746.      using the first, and writes a portable anymap as output.
  2747.  
  2748.      Convolution means replacing each pixel with a weighted aver-
  2749.      age of the nearby pixels.  The weights and the area to aver-
  2750.      age are determined by the convolution matrix.  The  unsigned
  2751.      numbers  in  the convolution file are offset by -maxval/2 to
  2752.      make signed numbers, and  then  normalized,  so  the  actual
  2753.      values in the convolution file are only relative.
  2754.  
  2755.      Here is a sample convolution file; it does a simple  average
  2756.      of  the  nine  immediate  neighbors, resulting in a smoothed
  2757.      image:
  2758.          P2
  2759.          3 3
  2760.          18
  2761.          10 10 10
  2762.          10 10 10
  2763.          10 10 10
  2764.  
  2765.      To see how this works, do the above-mentioned offset:  10  -
  2766.      18/2 gives 1.  The possible range of values is from 0 to 18,
  2767.      and after the offset that's -9 to 9.  The normalization step
  2768.      makes  the  range  -1  to  1,  and  the  values  get  scaled
  2769.      correspondingly so they become 1/9 - exactly what you  want.
  2770.      The equivalent matrix for 5x5 smoothing would have maxval 50
  2771.      and be filled with 26.
  2772.  
  2773.      The convolution file will usually be a graymap, so that  the
  2774.      same convolution gets applied to each color component.  How-
  2775.      ever, if you want to use a pixmap and do a different  convo-
  2776.      lution to different colors, you can certainly do that.
  2777.  
  2778. 2 See_Also
  2779.      pnmsmooth, pnm
  2780.  
  2781. 2 Author
  2782.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  2783.  
  2784. 1 pnmcrop               
  2785.      pnmcrop - crop a portable anymap
  2786.  
  2787. 2 Synopsis
  2788.      pnmcrop [-white|-black] [pnmfile]
  2789.  
  2790. 2 Description
  2791.      Reads a portable anymap as input.  Removes  edges  that  are
  2792.      the background color, and produces a portable anymap as out-
  2793.      put.
  2794.  
  2795. 2 Options
  2796.      By default, it makes a guess as to what the background color
  2797.      is.  You can override the default with the -white and -black
  2798.      flags.
  2799.  
  2800.      All flags can be abbreviated to their shortest  unique  pre-
  2801.      fix.
  2802.  
  2803. 2 See_Also
  2804.      pnmcut, pnm
  2805.  
  2806. 2 Author
  2807.      Copyright (C) 1989 by Jef Poskanzer.
  2808.  
  2809. 1 pnmcut                
  2810.      pnmcut - cut a rectangle out of a portable anymap
  2811.  
  2812. 2 Synopsis
  2813.      pnmcut x y width height [pnmfile]
  2814.  
  2815. 2 Description
  2816.      Reads a portable anymap as input.   Extracts  the  specified
  2817.      rectangle,  and produces a portable anymap as output.  The x
  2818.      and y can be negative, in which case  they  are  interpreted
  2819.      relative  to  the  right  and  bottom of the anymap, respec-
  2820.      tively.
  2821.  
  2822. 2 See_Also
  2823.      pnm
  2824.  
  2825. 2 Author
  2826.      Copyright (C) 1989 by Jef Poskanzer.
  2827.  
  2828. 1 pnmdepth              
  2829.      pnmdepth - change the maxval in a portable anymap
  2830.  
  2831. 2 Synopsis
  2832.      pnmdepth newmaxval [pnmfile]
  2833.  
  2834. 2 Description
  2835.      Reads a portable anymap as  input.   Scales  all  the  pixel
  2836.      values, and writes out the image with the new maxval.  Scal-
  2837.      ing the colors down to a smaller maxval will result in  some
  2838.      loss of information.
  2839.  
  2840.      Be careful of off-by-one errors when choosing the  new  max-
  2841.      val.   For instance, if you want the color values to be five
  2842.      bits wide, use a maxval of 31, not 32.
  2843.  
  2844. 2 See_Also
  2845.      pnm, ppmquant, ppmdither
  2846.  
  2847. 2 Author
  2848.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  2849.  
  2850. 1 pnmenlarge            
  2851.      pnmenlarge - read a portable anymap and enlarge it N times
  2852.  
  2853. 2 Synopsis
  2854.      pnmenlarge N [pnmfile]
  2855.  
  2856. 2 Description
  2857.      Reads a portable anymap as input.  Replicates its  pixels  N
  2858.      times, and produces a portable anymap as output.
  2859.  
  2860.      pnmenlarge can only enlarge by integer factors.  The  slower
  2861.      but more general pnmscale can enlarge or reduce by arbitrary
  2862.      factors, and pbmreduce can reduce by  integer  factors,  but
  2863.      only for bitmaps.
  2864.  
  2865.      If you enlarge by a factor of 3 or more, you should probably
  2866.      add  a  pnmsmooth  step; otherwise, you can see the original
  2867.      pixels in the resulting image.
  2868.  
  2869. 2 See_Also
  2870.      pbmreduce, pnmscale, pnmsmooth, pnm
  2871.  
  2872. 2 Author
  2873.      Copyright (C) 1989 by Jef Poskanzer.
  2874.  
  2875. 1 pnmfile               
  2876.      pnmfile - describe a portable anymap
  2877.  
  2878. 2 Synopsis
  2879.      pnmfile [pnmfile] ...
  2880.  
  2881. 2 Description
  2882.      Reads one or more portable anymaps  as  input.   Writes  out
  2883.      short  descriptions  of  the image type, size, etc.  This is
  2884.      mostly for use in shell scripts, so the format is  not  par-
  2885.      ticularly pretty.
  2886.  
  2887. 2 See_Also
  2888.      pnm, file
  2889.  
  2890. 2 Author
  2891.      Copyright (C) 1991 by Jef Poskanzer.
  2892.  
  2893. 1 pnmflip               
  2894.      pnmflip - perform one or more flip operations on a  portable
  2895.      anymap
  2896.  
  2897. 2 Synopsis
  2898.      pnmflip [-leftright|-lr]  [-topbottom|-tb]  [-transpose|-xy]
  2899.      [-rotate90|-r90|-ccw    ]    [-rotate270|-r270|-cw    ]   [-
  2900.      rotate180|-r180] [pnmfile]
  2901.  
  2902. 2 Description
  2903.      Reads a portable anymap as input.  Performs one or more flip
  2904.      operations,  in  the order specified, and writes out a port-
  2905.      able anymap.
  2906.  
  2907. 2 Options
  2908.      The  flip  operations  available  are:  left  for  right  (-
  2909.      leftright  or  -lr); top for bottom (-topbottom or -tb); and
  2910.      transposition (-transpose or -xy).  In addition, some canned
  2911.      concatenations   are   available:   -rotate90   or  -ccw  is
  2912.      equivalent to -transpose -topbottom; -rotate270  or  -cw  is
  2913.      equivalent  to  -transpose  -leftright;  and  -rotate180  is
  2914.      equivalent to -leftright -topbottom.
  2915.  
  2916.      All flags can be abbreviated to their shortest  unique  pre-
  2917.      fix.
  2918.  
  2919. 2 See_Also
  2920.      pnmrotate, pnm
  2921.  
  2922. 2 Author
  2923.      Copyright (C) 1989 by Jef Poskanzer.
  2924.  
  2925. 1 pnminvert             
  2926.      pnminvert - invert a portable anymap
  2927.  
  2928. 2 Synopsis
  2929.      pnminvert [pnmfile]
  2930.  
  2931. 2 Description
  2932.      Reads a portable anymap as  input.   Inverts  it  black  for
  2933.      white and produces a portable anymap as output.
  2934.  
  2935. 2 See_Also
  2936.      pnm
  2937.  
  2938. 2 Author
  2939.      Copyright (C) 1989 by Jef Poskanzer.
  2940.  
  2941. 1 pnmnoraw              
  2942.      pnmnoraw - force a portable anymap into plain format
  2943.  
  2944. 2 Synopsis
  2945.      pnmnoraw [pnmfile]
  2946.  
  2947. 2 Description
  2948.      Reads a portable anymap as input.  Writes it  out  in  plain
  2949.      (non-raw)  format.   This  is  fairly useless if you haven't
  2950.      defined the PBMPLUSAWBITS compile-time option.
  2951.  
  2952. 2 See_Also
  2953.      pnm
  2954.  
  2955. 2 Author
  2956.      Copyright (C) 1991 by Jef Poskanzer.
  2957.  
  2958. 1 pnmpad
  2959.      pnmpad - add borders to portable anymap
  2960.  
  2961. 2 Synopsis
  2962.      pnmpad [-white|-black] [-l#] [-r#] [-t#] [-b#] [pnmfile]
  2963.  
  2964. 2 Description
  2965.      Reads a portable anymap as input. Outputs a portable  anymap
  2966.      with extra borders of the sizes specified. The colour of the
  2967.      borders can be set to black or white (default black).
  2968.  
  2969.  
  2970. 2 See_Also
  2971.      pbmmake, pnmpaste, pbm
  2972.  
  2973. 2 Author
  2974.      Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef
  2975.      Poskanzer.
  2976.  
  2977.      Permission  to  use,  copy,  modify,  and  distribute   this
  2978.      software  and  its documentation for any purpose and without
  2979.      fee is hereby granted, provided  that  the  above  copyright
  2980.      notice  appear  in  all  copies and that both that copyright
  2981.      notice and this permission notice appear in supporting docu-
  2982.      mentation.   This  software  is  provided  "as  is"  without
  2983.      express or implied warranty.
  2984.  
  2985. 1 pnmpaste              
  2986.      pnmpaste - paste a rectangle into a portable anymap
  2987.  
  2988. 2 Synopsis
  2989.      pnmpaste   [-replace|-or|-and   |-xor]   frompnmfile   x   y
  2990.      [intopnmfile]
  2991.  
  2992. 2 Description
  2993.      Reads two portable anymaps  as  input.   Inserts  the  first
  2994.      anymap  into  the second at the specified location, and pro-
  2995.      duces a portable anymap the same size as the second as  out-
  2996.      put.  If the second anymap is not specified, it is read from
  2997.      stdin.  The x and y can be negative, in which case they  are
  2998.      interpreted  relative to the right and bottom of the anymap,
  2999.      respectively.
  3000.  
  3001.      This tool is most useful in combination  with  pnmcut.   For
  3002.      instance,  if  you  want  to edit a small segment of a large
  3003.      image, and your image editor cannot edit  the  large  image,
  3004.      you  can cut out the segment you are interested in, edit it,
  3005.      and then paste it back in.
  3006.  
  3007.      Another useful companion tool is pbmmask.
  3008.  
  3009.      The optional flag specifies the operation to use when  doing
  3010.      the  paste.   The  default  is -replace.  The other, logical
  3011.      operations are only allowed if both input  images  are  bit-
  3012.      maps.  These operations act as if white is TRUE and black is
  3013.      FALSE.
  3014.  
  3015.      All flags can be abbreviated to their shortest  unique  pre-
  3016.      fix.
  3017.  
  3018. 2 See_Also
  3019.      pnmcut, pnminvert, pnmarith, pnm, pbmmask
  3020.  
  3021. 2 Author
  3022.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3023.  
  3024. 1 pnmscale              
  3025.      pnmscale - scale a portable anymap
  3026.  
  3027. 2 Synopsis
  3028.      pnmscale s [pnmfile]
  3029.      pnmscale -xsize|-width|-ysize| -height s [pnmfile]
  3030.      pnmscale -xscale|-yscale s [pnmfile]
  3031.      pnmscale -xscale|-xsize|-width  s  -yscale|-ysize|-height  s
  3032.      [pnmfile]
  3033.      pnmscale -xysize x y [pnmfile]
  3034.  
  3035. 2 Description
  3036.      Reads a portable anymap as input.  Scales it by  the  speci-
  3037.      fied  factor  or  factors  and produces a portable anymap as
  3038.      output.  If the input file is in color, the output  will  be
  3039.      too,  otherwise  it will be grayscale.  You can both enlarge
  3040.      (scale factor > 1) and reduce (scale factor < 1).
  3041.  
  3042.      You can specify one dimension as a pixel size, and the other
  3043.      dimension will be scaled correspondingly.
  3044.  
  3045.      You can specify one dimension as  a  scale,  and  the  other
  3046.      dimension will not be scaled.
  3047.  
  3048.      You can specify different sizes or scales for each axis.
  3049.  
  3050.      Or, you can use the special -xysize  flag,  which  fits  the
  3051.      image  into  the  specified size without changing the aspect
  3052.      ratio.
  3053.  
  3054.      All flags can be abbreviated to their shortest  unique  pre-
  3055.      fix.
  3056.  
  3057.      If you enlarge by a factor of 3 or more, you should probably
  3058.      add  a  pnmsmooth  step; otherwise, you can see the original
  3059.      pixels in the resulting image.
  3060.  
  3061. 2 See_Also
  3062.      pbmreduce, pnmenlarge, pnmsmooth, pnm
  3063.  
  3064. 2 Author
  3065.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3066.  
  3067. 1 pnmtile               
  3068.      pnmtile - replicate a portable anymap into a specified size
  3069.  
  3070. 2 Synopsis
  3071.      pnmtile width height [pnmfile]
  3072.  
  3073. 2 Description
  3074.      Reads a portable anymap as input.  Replicates it until it is
  3075.      the  specified  size, and produces a portable anymap as out-
  3076.      put.
  3077.  
  3078. 2 See_Also
  3079.      pnm
  3080.  
  3081. 2 Author
  3082.      Copyright (C) 1989 by Jef Poskanzer.
  3083.  
  3084. 1 pnmtoddif
  3085.      pnmtoddif - Convert a portable anymap to DDIF format
  3086.  
  3087. 2 Synopis
  3088.      pnmtoddif pnmtoddif [-resolution x y] [pnmfile [ddiffile]]
  3089.  
  3090. 2 Description
  3091.      pnmtoddif takes a portable anymap from  standard  input  and
  3092.      converts it into a DDIF image file on standard output or the
  3093.      specified DDIF file.
  3094.  
  3095.      pbm format (bitmap) data is written as 1 bit DDIF, pgm  for-
  3096.      mat data (greyscale) as 8 bit greyscale DDIF, and ppm format
  3097.      data is written as 8,8,8 bit  color  DDIF.  All  DDIF  image
  3098.      files  are written as uncompressed. The data plane organiza-
  3099.      tion is interleaved by pixel.
  3100.  
  3101.      In addition to the number of pixels in the width and  height
  3102.      dimension, DDIF images also carry information about the size
  3103.      that the image should have, that is, the physical space that
  3104.      a  pixel occupies. PBMPLUS images do not carry this informa-
  3105.      tion, hence it has to be externally supplied.   The  default
  3106.      of  78  dpi  has  the  beneficial  property of not causing a
  3107.      resize on most Digital Equipment Corporation color monitors.
  3108.  
  3109. 2 Options
  3110.      resolution
  3111.           The horizontal and vertical resolution  of  the  output
  3112.           image in dots per inch. Defaults to 78 dpi.
  3113.  
  3114.      pnmfile        The filename for the image file in  pnm  for-
  3115.                     mat.   If  this argument is omitted, input is
  3116.                     read from stdin.
  3117.  
  3118.      ddiffile       The filename for the image file to be created
  3119.                     in DDIF format.  If this argument is omitted,
  3120.                     the ddiffile is written to  standard  output.
  3121.                     It  can  only  specified if a pnmfile is also
  3122.                     specified.
  3123.  
  3124. 2 Author
  3125.      Burkhard Neidecker-Lutz
  3126.      Digital Equipment Corporation, CEC Karlsruhe
  3127.      neideck@nestvx.enet.dec.com
  3128.  
  3129. 1 pnmtops               
  3130.      pnmtops - convert portable anymap to PostScript
  3131.  
  3132. 2 Synopsis
  3133.      pnmtops [-scale s] [-turn|-noturn]  [-rle|-runlength]  [-dpi
  3134.      n] [-width n] [-height n] [pnmfile]
  3135.  
  3136. 2 Description
  3137.      Reads a portable anymap  as  input.   Produces  Encapsulated
  3138.      PostScript as output.
  3139.  
  3140.      If the input file is in color (PPM), a color PostScript file
  3141.      gets  written.   Some  PostScript  interpreters can't handle
  3142.      color PostScript.  If you have one of these you will need to
  3143.      run your image through ppmtopgm first.
  3144.  
  3145.      Note that there is no pstopnm tool - this transformation  is
  3146.      one-way,  because  a  pstopnm  tool  would be a full-fledged
  3147.      PostScript interpreter, which is beyond the  scope  of  this
  3148.      package.   However,  see  the psidtopgm tool, which can read
  3149.      grayscale non-runlength PostScript  image  data.   Also,  if
  3150.      you're willing to install the fairly large GhostScript pack-
  3151.      age, it comes with a pstoppm script.
  3152.  
  3153. 2 Options
  3154.      The -scale flag controls  the  scale  of  the  result.   The
  3155.      default  scale  is 1, which on a 300 dpi printer such as the
  3156.      Apple LaserWriter makes the output look about the same  size
  3157.      as  the  input would if it was displayed on a typical 72 dpi
  3158.      screen.  To get one PNM pixel per 300 dpi printer pixel, use
  3159.      "-scale 0.25".
  3160.  
  3161.      The -turn and -noturn flags control whether the  image  gets
  3162.      turned  90  degrees.  Normally, if an image is wider than it
  3163.      is tall, it gets turned  automatically  to  better  fit  the
  3164.      page.   If the -turn flag is specified, it will be turned no
  3165.      matter what its shape; and if the -noturn flag is specified,
  3166.      it will not be turned no matter what its shape.
  3167.  
  3168.      The -rle or -runlength flag  specifies  run-length  compres-
  3169.      sion.   This  may  save  time if the host-to-printer link is
  3170.      slow; but normally the printer's processing time  dominates,
  3171.      so -rle makes things slower.
  3172.  
  3173.      The -dpi flag lets you specify the dots  per  inch  of  your
  3174.      output   device.    The  default  is  300  dpi.   In  theory
  3175.      PostScript is device-independent and you don't have to worry
  3176.      about  this,  but  in practice its raster rendering can have
  3177.      unsightly bands if the device pixels and  the  image  pixels
  3178.      aren't in sync.
  3179.  
  3180.      The -width and -height flags let you specify the size of the
  3181.      page.  The default is 8.5 inches by 11 inches.
  3182.  
  3183.      All flags can be abbreviated to their shortest  unique  pre-
  3184.      fix.
  3185.  
  3186. 2 See_Also
  3187.      pnm, psidtopgm
  3188.  
  3189. 2 Author
  3190.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3191.  
  3192. 1 pnmtorast             
  3193.      pnmtorast - convert a portable pixmap into a Sun rasterfile
  3194.  
  3195. 2 Synopsis
  3196.      pnmtorast [-standard|-rle] [pnmfile]
  3197.  
  3198. 2 Description
  3199.      Reads a portable pixmap as input.  Produces a Sun rasterfile
  3200.      as output.
  3201.  
  3202.      Color values in Sun rasterfiles  are  eight  bits  wide,  so
  3203.      pnmtorast  will  automatically scale colors to have a maxval
  3204.      of 255.  An extra pnmdepth step is not necessary.
  3205.  
  3206. 2 Options
  3207.      The -standard flag forces the result to  be  in  RT_STANDARD
  3208.      form;  the -rle flag, RT_BYTE_ENCODED, which is smaller but,
  3209.      well, less standard.  The default is -rle.
  3210.  
  3211.      All flags can be abbreviated to their shortest  unique  pre-
  3212.      fix.
  3213.  
  3214. 2 See_Also
  3215.      rasttopnm, pnm
  3216.  
  3217. 2 Author
  3218.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3219.  
  3220. 1 pnmtoxwd              
  3221.      pnmtoxwd - convert a portable anymap into an X11 window dump
  3222.  
  3223. 2 Synopsis
  3224.      pnmtoxwd [-pseudodepth n] [-directcolor] [pnmfile]
  3225.  
  3226. 2 Description
  3227.      Reads a portable anymap as input.  Produces  an  X11  window
  3228.      dump as output.  This window dump can be displayed using the
  3229.      xwud tool.
  3230.  
  3231.      Normally, pnmtoxwd produces a StaticGray dump file  for  pbm
  3232.      and  pgm  files.  For ppm, it writes a PseudoColor dump file
  3233.      if  there  are  up  to  256  colors  in  the  input,  and  a
  3234.      DirectColor  dump file otherwise.  The -directcolor flag can
  3235.      be used to force a DirectColor dump.  And  the  -pseudodepth
  3236.      flag  can  be  used to change the depth of PseudoColor dumps
  3237.      from the default of 8 bits / 256 colors.
  3238.  
  3239. 2 See_Also
  3240.      xwdtopnm, pnm, xwud
  3241.  
  3242. 2 Author
  3243.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3244.  
  3245. 1 rasttopnm             
  3246.      rasttopnm - convert a Sun rasterfile into a portable anymap
  3247.  
  3248. 2 Synopsis
  3249.      rasttopnm [rastfile]
  3250.  
  3251. 2 Description
  3252.      Reads a Sun rasterfile as input.  Produces a portable anymap
  3253.      as output.  The type of the output file depends on the input
  3254.      file - if it's black & white, a pbm file is written, else if
  3255.      it's  grayscale  a  pgm  file, else a ppm file.  The program
  3256.      tells you which type it is writing.
  3257.  
  3258. 2 See_Also
  3259.      pnmtorast, pnm
  3260.  
  3261. 2 Author
  3262.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3263.  
  3264. 1 xwdtopnm              
  3265.      xwdtopnm - convert a X11 or X10  window  dump  file  into  a
  3266.      portable anymap
  3267.  
  3268. 2 Synopsis
  3269.      xwdtopnm [xwdfile]
  3270.  
  3271. 2 Description
  3272.      Reads a X11 or X10 window dump file as  input.   Produces  a
  3273.      portable  anymap  as  output.   The  type of the output file
  3274.      depends on the input file - if it's black  &  white,  a  pbm
  3275.      file  is  written, else if it's grayscale a pgm file, else a
  3276.      ppm file.  The program tells you which type it is writing.
  3277.  
  3278.      Using this  program,  you  can  convert  anything  on  an  X
  3279.      workstation's  screen into an anymap.  Just display whatever
  3280.      you're interested in, do an xwd, run  it  through  xwdtopnm,
  3281.      and then use pnmcut to select the part you want.
  3282.  
  3283. 2 Bugs
  3284.      I haven't tested this tool with very many configurations, so
  3285.      there  are  probably  bugs.   Please let me know if you find
  3286.      any.
  3287.  
  3288. 2 See_Also
  3289.      pnmtoxwd, pnm, xwd
  3290.  
  3291. 2 Author
  3292.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3293.  
  3294. 1 zeisstopnm            
  3295.      zeisstopnm - convert a Zeiss confocal file into  a  portable
  3296.      anymap
  3297.  
  3298. 2 Synopsis
  3299.      zeisstopnm [-pgm | -ppm] [zeissfile]
  3300.  
  3301. 2 Description
  3302.      Reads a Zeiss confocal file as input.  Produces  a  portable
  3303.      anymap  as  output.   The type of the output file depends on
  3304.      the input file - if it's grayscale a pgm file,  else  a  ppm
  3305.      file  will be produced.  The program tells you which type it
  3306.      is writing.
  3307.  
  3308. 2 Options
  3309.      -pgm Force the output to be a pgm file.
  3310.  
  3311.      -ppm Force the output to be a ppm file.
  3312.  
  3313. 2 See_Also
  3314.      pnm
  3315.  
  3316. 2 Author
  3317.      Copyright (C) 1993 by Oliver Trepte
  3318.  
  3319. 1 pnmgamma              
  3320.      pnmgamma - perform gamma correction on a portable anymap
  3321.  
  3322. 2 Synopsis
  3323.      pnmgamma value [pnmfile]
  3324.      pnmgamma redvalue greenvalue bluevalue [pnmfile]
  3325.  
  3326. 2 Description
  3327.      Reads a portable anymap as input.   Performs  gamma  correc-
  3328.      tion, and produces a portable anymap as output.
  3329.  
  3330.      The arguments specify what gamma value(s) to use.   A  value
  3331.      of 1.0 leaves the image alone, less than one darkens it, and
  3332.      greater than one lightens it.
  3333.  
  3334. 2 See_Also
  3335.      pnm
  3336.  
  3337. 2 Author
  3338.      Copyright (C) 1991 by Bill Davidson and Jef Poskanzer.
  3339.  
  3340. 1 pnmhistmap
  3341.      pnmhistmap - draw a histogram for a PGM or PPM file
  3342.  
  3343. 2 Synopsis
  3344.      pnmhistmap [-black] [-white] [-max N] [-verbose] [pnmfile]
  3345.  
  3346. 2 Description
  3347.      Reads a portable anymap  as  input,  although  bitmap  (PBM)
  3348.      input  produces  an error message and no image.  Produces an
  3349.      image showing a histogram of the color (or gray)  values  in
  3350.      the  input.  A graymap (PGM) input produces a bitmap output.
  3351.      A pixmap (PPM) input produces pixmap output with three over-
  3352.      laid  histograms:  a  red one for the red input, a green one
  3353.      for the green input, and a blue one for the blue input.  The
  3354.      output is fixed in size: 256 pixels wide by 200 pixels high.
  3355.  
  3356. 2 Options
  3357.      -black
  3358.           Ignores the count of black pixels when scaling the his-
  3359.           togram.
  3360.  
  3361.      -white
  3362.           Ignores the count of white pixels when scaling the his-
  3363.           togram.
  3364.  
  3365.      The -black and -white options, which can be used  seperately
  3366.      or  together,  are useful for images with a large percentage
  3367.      of pixels whose value is zero or 255, which  can  cause  the
  3368.      remaining  histogram  data to become unreadbaly small.  Note
  3369.      that, for pixmap inputs, these options apply to all  colors;
  3370.      if,  for example, the input has a large number of bright-red
  3371.      areas, you will probably want to use the -white option.
  3372.  
  3373.      -max N
  3374.           Force the scaling of the histogram  to  use  N  as  the
  3375.           largest-count  value.  This is useful for inputs with a
  3376.           large percentage of single-color pixels which  are  not
  3377.           black or white.
  3378.  
  3379.      -verbose
  3380.           Report the progress of making the histogram,  including
  3381.           the largest-count value used to scale the output.
  3382.  
  3383.      All flags can be abbreviated to their shortest  unique  pre-
  3384.      fix.
  3385.  
  3386. 2 Bugs
  3387.      Assumes maxval is always 255.  Images with a smaller  maxval
  3388.      will  only  use the lower-value side of the histogram.  This
  3389.      can be overcome either by piping the input through "pnmdepth
  3390.      255"  or  by cutting and scaling the lower-value side of the
  3391.      histogram.  Neither is a particularly elegant solution.
  3392.      Should allow the output size to be specified.
  3393.  
  3394. 2 See_Also
  3395.      pgmhist(1), ppmhist(1), pgm(5), ppm(5)
  3396.  
  3397. 2 Author
  3398.      Wilson H. Bent. Jr. (whb@usc.edu).
  3399.  
  3400. 1 pnmnlfilt             
  3401.      pnmnlfilt - non-linear filters:  smooth,  alpha  trim  mean,
  3402.      optimal estimation smoothing, edge enhancement.
  3403.  
  3404. 2 Synopsis
  3405.      pnmnlfilt alpha radius [pnmfile]
  3406.  
  3407. 2 Description
  3408.      This is something of a swiss army knife  filter.  It  has  3
  3409.      distinct  operating modes. In all of the modes each pixel in
  3410.      the image is examined and processed according to it and  its
  3411.      surrounding pixels values. Rather than using the 9 pixels in
  3412.      a 3x3 block, 7 hexagonal area samples are taken, the size of
  3413.      the  hexagons  being  controlled  by the radius parameter. A
  3414.      radius value of 0.3333 means that the 7 hexagons exactly fit
  3415.      into  the  center  pixel  (ie.   there  will be no filtering
  3416.      effect). A radius value of 1.0 means  that  the  7  hexagons
  3417.      exactly fit a 3x3 pixel array.
  3418.  
  3419.         Alpha trimmed mean filter.    (0.0 <= alpha
  3420.      The value of the center pixel will be replaced by  the  mean
  3421.      of the 7 hexagon values, but the 7 values are sorted by size
  3422.      and the top and bottom alpha portion of the 7  are  excluded
  3423.      from  the  mean.   This  implies  that an alpha value of 0.0
  3424.      gives the same sort of output as a normal  convolution  (ie.
  3425.      averaging  or smoothing filter), where radius will determine
  3426.      the "strength" of the filter. A good value to start from for
  3427.      subtle  filtering  is  alpha = 0.0, radius = 0.55 For a more
  3428.      blatant effect, try alpha 0.0 and radius 1.0
  3429.  
  3430.      An alpha value of 0.5 will cause the median value of  the  7
  3431.      hexagons  to be used to replace the center pixel value. This
  3432.      sort of filter is good for eliminating "pop" or single pixel
  3433.      noise  from  an  image  without  spreading  the noise out or
  3434.      smudging features on the image. Judicious use of the  radius
  3435.      parameter  will fine tune the filtering. Intermediate values
  3436.      of alpha give effects somewhere between smoothing and  "pop"
  3437.      noise  reduction.  For  subtle  filtering  try starting with
  3438.      values of alpha = 0.4, radius =  0.6   For  a  more  blatant
  3439.      effect try alpha = 0.5, radius = 1.0
  3440.  
  3441.         Optimal estimation smoothing. (1.0 <= alpha
  3442.      This type of filter applies a  smoothing  filter  adaptively
  3443.      over  the  image.   For  each pixel the variance of the sur-
  3444.      rounding hexagon values is calculated,  and  the  amount  of
  3445.      smoothing  is made inversely proportional to it. The idea is
  3446.      that if the variance is small then it is due to noise in the
  3447.      image,  while  if  the  variance  is large, it is because of
  3448.      "wanted" image features. As usual the radius parameter  con-
  3449.      trols  the  effective  radius,  but it probably advisable to
  3450.      leave the radius between 0.8 and 1.0 for the variance calcu-
  3451.      lation to be meaningful.  The alpha parameter sets the noise
  3452.      threshold, over which less smoothing  will  be  done.   This
  3453.      means  that  small values of alpha will give the most subtle
  3454.      filtering effect, while large values will tend to smooth all
  3455.      parts of the image. You could start with values like alpha =
  3456.      1.2, radius = 1.0 and try increasing or decreasing the alpha
  3457.      parameter  to get the desired effect. This type of filter is
  3458.      best for filtering out dithering noise in  both  bitmap  and
  3459.      color images.
  3460.  
  3461.         Edge enhancement. (-0.1 >= alpha >=
  3462.      This is the opposite type of filter to the smoothing filter.
  3463.      It  enhances  edges. The alpha parameter controls the amount
  3464.      of edge enhancement, from subtle (-0.1) to  blatant  (-0.9).
  3465.      The radius parameter controls the effective radius as usual,
  3466.      but useful values are between 0.5 and 0.9. Try starting with
  3467.      values of alpha = 0.3, radius = 0.8
  3468.  
  3469.         Combination use.
  3470.      The various modes of pnmnlfilt can be  used  one  after  the
  3471.      other  to  get  the  desired  result. For instance to turn a
  3472.      monochrome dithered image into a grayscale image  you  could
  3473.      try one or two passes of the smoothing filter, followed by a
  3474.      pass of the optimal estimation filter, then some subtle edge
  3475.      enhancement. Note that using edge enhancement is only likely
  3476.      to be useful after one  of  the  non-linear  filters  (alpha
  3477.      trimmed mean or optimal estimation filter), as edge enhance-
  3478.      ment is the direct opposite of smoothing.
  3479.  
  3480.      For reducing color quantization noise in images (ie. turning
  3481.      .gif  files  back into 24 bit files) you could try a pass of
  3482.      the optimal estimation filter (alpha  1.2,  radius  1.0),  a
  3483.      pass of the median filter (alpha 0.5, radius 0.55), and pos-
  3484.      sibly a pass of the edge enhancement filter.  Several passes
  3485.      of the optimal estimation filter with declining alpha values
  3486.      are more effective than a single pass  with  a  large  alpha
  3487.      value.   As  usual,  there  is  a tradeoff between filtering
  3488.      effectiveness  and  loosing   detail.   Experimentation   is
  3489.      encouraged.
  3490.  
  3491. 2 References
  3492.      The alpha-trimmed mean filter is based on the description in
  3493.      IEEE  CG&A  May  1990  Page 23 by Mark E. Lee and Richard A.
  3494.      Redner, and has been  enhanced  to  allow  continuous  alpha
  3495.      adjustment.
  3496.  
  3497.      The optimal estimation filter is taken from an article "Con-
  3498.      verting  Dithered  Images  Back  to  Gray  Scale"  by  Allen
  3499.      Stenger, Dr Dobb's Journal, November 1992, and this  article
  3500.      references "Digital Image Enhancement and Noise Filtering by
  3501.      Use of Local Statistics", Jong-Sen Lee, IEEE Transactions on
  3502.      Pattern Analysis and Machine Intelligence, March 1980.
  3503.      The edge enhancement details are from  pgmenhance,  which
  3504.      is  taken  from Philip R. Thompson's "xim" program, which in
  3505.      turn took it from section 6 of  "Digital  Halftones  by  Dot
  3506.      Diffusion", D. E. Knuth, ACM Transaction on Graphics Vol. 6,
  3507.      No. 4, October 1987, which in turn  got  it  from  two  1976
  3508.      papers by J. F. Jarvis et. al.
  3509.  
  3510. 2 See_Also
  3511.      pgmenhance, pnmconvol, pnm
  3512.  
  3513. 2 Bugs
  3514.      Integers and tables may overflow if PPM_MAXMAXVAL is greater
  3515.      than 255.
  3516.  
  3517. 2 Author
  3518.      Graeme W. Gill    graeme@labtam.oz.au
  3519.  
  3520. 1 pnmrotate             
  3521.      pnmrotate - rotate a portable anymap by some angle
  3522.  
  3523. 2 Synopsis
  3524.      pnmrotate [-noantialias] angle [pnmfile]
  3525.  
  3526. 2 Description
  3527.      Reads a portable anymap as input.  Rotates it by the  speci-
  3528.      fied angle and produces a portable anymap as output.  If the
  3529.      input file is in color, the output will be too, otherwise it
  3530.      will  be  grayscale.   The  angle  is  in  degrees (floating
  3531.      point), measured counter-clockwise.  It can be negative, but
  3532.      it  should  be  between  -90  and  90.   Also, for rotations
  3533.      greater than 45 degrees you may get better  results  if  you
  3534.      first use pnmflip to do a 90 degree rotation and then pnmro-
  3535.      tate less than 45 degrees back the other direction
  3536.  
  3537.      The rotation algorithm is Alan Paeth's  three-shear  method.
  3538.      Each  shear is implemented by looping over the source pixels
  3539.      and distributing fractions to each of the  destination  pix-
  3540.      els.   This has an "anti-aliasing" effect - it avoids jagged
  3541.      edges and similar artifacts.  However, it  also  means  that
  3542.      the  original  colors  or gray levels in the image are modi-
  3543.      fied.  If you need to keep precisely the same set of colors,
  3544.      you  can  use the -noantialias flag.  This does the shearing
  3545.      by moving pixels without changing their values.  If you want
  3546.      anti-aliasing  and  don't care about the precise colors, but
  3547.      still need a limited *number* of colors,  you  can  run  the
  3548.      result through ppmquant.
  3549.  
  3550.      All flags can be abbreviated to their shortest  unique  pre-
  3551.      fix.
  3552.  
  3553. 2 References
  3554.      "A Fast Algorithm  for  General  Raster  Rotation"  by  Alan
  3555.      Paeth, Graphics Interface '86, pp. 77-81.
  3556.  
  3557. 2 See_Also
  3558.      pnmshear, pnmflip, pnm, ppmquant
  3559.  
  3560. 2 Author
  3561.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3562.  
  3563. 1 pnmshear              
  3564.      pnmshear - shear a portable anymap by some angle
  3565.  
  3566. 2 Synopsis
  3567.      pnmshear [-noantialias] angle [pnmfile]
  3568.  
  3569. 2 Description
  3570.      Reads a portable anymap as input.  Shears it by  the  speci-
  3571.      fied angle and produces a portable anymap as output.  If the
  3572.      input file is in color, the output will be too, otherwise it
  3573.      will  be  grayscale.   The  angle  is  in  degrees (floating
  3574.      point), and measures this:
  3575.          +-------+  +-------+
  3576.          |       |  |\       \
  3577.          |  OLD  |  | \  NEW  \
  3578.          |       |  |an\       \
  3579.          +-------+  |gle+-------+
  3580.      If the angle is negative, it shears the other way:
  3581.          +-------+  |-an+-------+
  3582.          |       |  |gl/       /
  3583.          |  OLD  |  |e/  NEW  /
  3584.          |       |  |/       /
  3585.          +-------+  +-------+
  3586.      The angle should not get too close to  90  or  -90,  or  the
  3587.      resulting anymap will be unreasonably wide.
  3588.  
  3589.      The shearing is implemented by looping over the source  pix-
  3590.      els  and  distributing  fractions to each of the destination
  3591.      pixels.  This has an  "anti-aliasing"  effect  -  it  avoids
  3592.      jagged  edges and similar artifacts.  However, it also means
  3593.      that the original colors or gray levels  in  the  image  are
  3594.      modified.   If  you  need  to keep precisely the same set of
  3595.      colors, you can use the -noantialias flag.   This  does  the
  3596.      shearing by moving pixels without changing their values.  If
  3597.      you want anti-aliasing and  don't  care  about  the  precise
  3598.      colors, but still need a limited *number* of colors, you can
  3599.      run the result through ppmquant.
  3600.  
  3601.      All flags can be abbreviated to their shortest  unique  pre-
  3602.      fix.
  3603.  
  3604. 2 See_Also
  3605.      pnmrotate, pnmflip, pnm, ppmquant
  3606.  
  3607. 2 Author
  3608.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3609.  
  3610. 1 tifftopnm             
  3611.      tifftopnm - convert a TIFF file into a portable anymap
  3612.  
  3613. 2 Synopsis
  3614.      tifftopnm [-headerdump] tifffile
  3615.  
  3616. 2 Description
  3617.      Reads a TIFF file as input.  Produces a portable  anymap  as
  3618.      output.   The  type  of the output file depends on the input
  3619.      file - if it's black & white, a pbm file is written, else if
  3620.      it's  grayscale  a  pgm  file, else a ppm file.  The program
  3621.      tells you which type it is writing.
  3622.  
  3623. 2 Options
  3624.      -headerdump
  3625.           Dump TIFF file information to stderr.  This information
  3626.           may  be  useful in debugging TIFF file conversion prob-
  3627.           lems.
  3628.  
  3629.      All flags can be abbreviated to their shortest  unique  pre-
  3630.      fix.
  3631.  
  3632. 2 See_Also
  3633.      pnmtotiff, pnm
  3634.  
  3635. 2 Bugs
  3636.      This program is not self-contained.   To  use  it  you  must
  3637.      fetch  the TIFF Software package listed in the OTHER.SYSTEMS
  3638.      file and configure PBMPLUS to use  libtiff.   See  PBMPLUS's
  3639.      Makefile for details on this configuration.
  3640.  
  3641. 2 Author
  3642.      Derived by Jef Poskanzer from tif2ras.c, which is  Copyright
  3643.      (c)  1990  by  Sun  Microsystems,  Inc.   Author: Patrick J.
  3644.      Naughton (naughton@wind.sun.com).
  3645.  
  3646. 1 pnmtotiff             
  3647.      pnmtotiff - convert a a portable anymap into a TIFF file
  3648.  
  3649. 2 Synopsis
  3650.      pnmtotiff [-none|-packbits| -lzw|-g3|-g4] [-2d]  [-fill]  [-
  3651.      predictor n] [-msb2lsb|-lsb2msb] [-rowsperstrip n] [pnmfile]
  3652.  
  3653. 2 Description
  3654.      Reads a portable anymap as input.  Produces a TIFF  file  as
  3655.      output.
  3656.  
  3657. 2 Options
  3658.      By default, pnmtotiff creates a TIFF file with LZW  compres-
  3659.      sion.   This  is  your  best bet most of the time.  However,
  3660.      some TIFF readers can't deal with it.  If you  want  to  try
  3661.      another  compression  scheme or tweak some of the other even
  3662.      more obscure output options, there are a number of flags  to
  3663.      play with.
  3664.  
  3665.      The -none, -packbits, -lzw, -g3, and -g4 options are used to
  3666.      override  the default and set the compression scheme used in
  3667.      creating the output file.  The CCITT Group  3  and  Group  4
  3668.      compression  algorithms  can only be used with bilevel data.
  3669.      The -2d and -fill options are meaningful only with  Group  3
  3670.      compression:  -2d  requests  2-dimensional encoding, while -
  3671.      fill requests that each encoded scanline be zero-filled to a
  3672.      byte boundry.  The -predictor option is only meaningful with
  3673.      LZW compression: a predictor value of 2 causes each scanline
  3674.      of  the  output  image  to  undergo  horizontal differencing
  3675.      before it is encoded; a value of 1 forces each  scanline  to
  3676.      be  encoded  without  differencing.   By  default, pnmtotiff
  3677.      creates a TIFF file  with  msb-to-lsb  fill  order.   The  -
  3678.      msb2lsb  and  -lsb2msb  options  are  used  to  override the
  3679.      default and set the fill order used in  creating  the  file.
  3680.      The  -rowsperstrip  option  can be used to set the number of
  3681.      rows (scanlines) in each strip of data in the  output  file.
  3682.      By default, the output file has the number of rows per strip
  3683.      set to a value that will ensure each strip is no more than 8
  3684.      kilobytes long.
  3685.  
  3686. 2 Bugs
  3687.      This program is not self-contained.   To  use  it  you  must
  3688.      fetch  the TIFF Software package listed in the OTHER.SYSTEMS
  3689.      file and configure PBMPLUS to use  libtiff.   See  PBMPLUS's
  3690.      Makefile for details on this configuration.
  3691.  
  3692. 2 See_Also
  3693.      tifftopnm, pnm
  3694.  
  3695. 2 Author
  3696.      Derived by Jef Poskanzer from ras2tiff.c, which is Copyright
  3697.      (c)  1990  by  Sun  Microsystems,  Inc.   Author: Patrick J.
  3698.      Naughton (naughton@wind.sun.com).
  3699.  
  3700. 1 libpnm
  3701.      libpnm - functions to support portable anymap programs
  3702.  
  3703. 2 Synopsis
  3704.      #include <pnm.h>
  3705.      cc ... libpnm.a libppm.a libpgm.a libpbm.a
  3706.  
  3707.  
  3708. 2 Description
  3709.   TYPES AND CONSTANTS
  3710.      typedef ... xel;
  3711.      typedef ... xelval;
  3712.      #define PNM_MAXMAXVAL ...
  3713.      extern xelval pnm_pbmmaxval;
  3714.  
  3715.      Each xel contains three xelvals, each of which  should  con-
  3716.      tain   only   the   values   between  0  and  PNM_MAXMAXVAL.
  3717.      pnm_pbmmaxval is the maxval used when a PNM program reads  a
  3718.      PBM  file.   Normally it is 1; however, for some programs, a
  3719.      larger value gives better results.
  3720.  
  3721.   XEL MANIPULATIONS
  3722.      xelval PNM_GET1( xel x )
  3723.  
  3724.      This macro extracts a single value from  an  xel,  when  you
  3725.      know  it's  from  a  PBM  or PGM file.  When it's from a PPM
  3726.      file, use PPM_GETR(), PPM_GETG(), and PPM_GETB().
  3727.  
  3728.      void PNM_ASSIGN1( xel x, xelval v )
  3729.  
  3730.      This macro assigns a single value to an xel, when  you  know
  3731.      it's from a PBM or PGM file.  When it's from a PPM file, use
  3732.      PPM_ASSIGN().
  3733.  
  3734.      int PNM_EQUAL( xel x, xel y )
  3735.  
  3736.      This macro checks two xels for equality.
  3737.  
  3738.      int PNM_FORMAT_TYPE( int format )
  3739.  
  3740.      For distinguishing different file types.
  3741.  
  3742.   INITIALIZATION
  3743.      void pnm_init( int* argcP, char* argv[] )
  3744.  
  3745.      All PNM programs must call this routine.
  3746.  
  3747.   MEMORY MANAGEMENT
  3748.      xel** pnm_allocarray( int cols, int rows )
  3749.  
  3750.      Allocate an array of xels.
  3751.      xel* pnm_allocrow( int cols )
  3752.  
  3753.      Allocate a row of the given number of xels.
  3754.  
  3755.      void pnm_freearray( xel** xels, int rows )
  3756.  
  3757.      Free the array allocated  with  pnmllocarray()  containing
  3758.      the given number of rows.
  3759.  
  3760.      void pnm_freerow( xel* xelrow )
  3761.  
  3762.      Free a row of xels.
  3763.  
  3764.   READING FILES
  3765.      void pnm_readpnminit( FILE* fp, int* colsP, int* rowsP, xelval* maxvalP, int* formatP )
  3766.  
  3767.      Read the header from a PNM file, filling in the rows,  cols,
  3768.      maxval and format variables.
  3769.  
  3770.      void pnm_readpnmrow( FILE* fp, xel* xelrow, int cols, xelval maxval, int format )
  3771.  
  3772.      Read a row of xels into the xelrow array.  Format, cols, and
  3773.      maxval were filled in by pnm_readpnminit().
  3774.  
  3775.      xel** pnm_readpnm( FILE* fp, int* colsP, int* rowsP, xelval* maxvalP, int* formatP )
  3776.  
  3777.      Read an entire anymap file into memory, returning the  allo-
  3778.      cated  array and filling in the rows, cols, maxval, and for-
  3779.      mat variables.  This  function  combines  pnm_readpnminit(),
  3780.      pnm_allocarray()    and    pnm_readpnmrow().    Unlike   the
  3781.      equivalent functions in PBM, PGM, and PPM,  it  returns  the
  3782.      format so you can tell what type the file is.
  3783.  
  3784.   WRITING FILES
  3785.      void pnm_writepnminit( FILE* fp, int cols, int rows, xelval maxval, int format, int forceplain )
  3786.  
  3787.      Write the header for a portable  anymap  file.   Unlike  the
  3788.      equivalent  functions  in  PBM,  PGM,  and  PPM, you have to
  3789.      specify the output  type.   The  forceplain  flag  forces  a
  3790.      plain-format  file to be written, as opposed to a raw-format
  3791.      one.
  3792.  
  3793.      void pnm_writepnmrow( FILE* fp, xel* xelrow, int cols, xelval maxval, int format, int forceplain )
  3794.  
  3795.      Write a row from a portable anymap.
  3796.  
  3797.      void pnm_writepnm( FILE* fp, xel** xels, int cols, int rows, xelval maxval, int format, int forceplain )
  3798.  
  3799.      Write the header and all data for a portable  anymap.   This
  3800.      function combines pnm_writepnminit() and pnm_writepnmrow().
  3801.  
  3802.   FORMAT PROMOTION
  3803.      void pnm_promoteformatrow( xel* xelrow, int cols, xelval maxval, int format, xelval newmaxval, int newformat )
  3804.  
  3805.      Promote a row of xels from one maxval and format  to  a  new
  3806.      set.   Used  when  combining  multiple  anymaps of different
  3807.      types - just take the max of the maxvals and the max of  the
  3808.      formats, and promote them all to that.
  3809.  
  3810.      void pnm_promoteformat( xel** xels, int cols, int rows, xelval maxval, int format, xelval newmaxval, int newformat )
  3811.  
  3812.      Promote an entire anymap.
  3813.  
  3814.   XEL MANIPULATION
  3815.      xel pnm_whitexel( xelval maxval, int format )
  3816.      xel pnm_blackxel( xelval maxval, int format )
  3817.  
  3818.      Return a white or black xel for the given maxval and format.
  3819.  
  3820.      void pnm_invertxel( xel* x, xelval maxval, int format )
  3821.  
  3822.      Invert an xel.
  3823.  
  3824.      xel pnm_backgroundxelrow( xel* xelrow, int cols, xelval maxval, int format )
  3825.  
  3826.      Figure out an appropriate background xel based on this row.
  3827.  
  3828.      xel pnm_backgroundxel( xel** xels, int cols, int rows, xelval maxval, int format )
  3829.  
  3830.      Figure out a background xel based on an entire anymap.  This
  3831.      can do a slightly better job than pnm_backgroundxelrow().
  3832.  
  3833. 2 See_Also
  3834.      pbm, pgm, ppm
  3835.  
  3836. 2 Author
  3837.      Copyright (C) 1989, 1991 by Tony Hansen and Jef Poskanzer.
  3838.  
  3839. 1 pnm
  3840.      pnm - portable anymap file format
  3841.  
  3842. 2 Description
  3843.      The pnm programs operate on portable bitmaps, graymaps,  and
  3844.      pixmaps,  produced by the pbm, pgm, and ppm segments.  There
  3845.      is no file format associated with pnm itself.
  3846.  
  3847. 2 See_Also
  3848.     anytopnm,    rasttopnm,  tifftopnm,  xwdtopnm,  pnmtops,  pnmtorast,
  3849.     pnmtotiff, pnmtoxwd, pnmar- ith, pnmcat, pnmconvol, pnmcrop, pnmcut,
  3850.     pnmdepth,  pnmenlarge,    pnmfile,    pnmflip,  pnmgamma,  pnmindex,
  3851.     pnminvert,  pnmmargin,  pnmnoraw,   pnmpaste,  pnmrotate,  pnmscale,
  3852.     pnmshear, pnmsmooth, pnmtile, ppm, pgm, pbm
  3853.  
  3854. 2 Author
  3855.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  3856. 1 bmptoppm
  3857.      bmptoppm - convert a BMP file into a portable pixmap
  3858.  
  3859. 2 Synopsis
  3860.      bmptoppm [bmpfile]
  3861.  
  3862. 2 Description
  3863.      Reads a Microsoft Windows or OS/2 BMP file as  input.   Pro-
  3864.      duces a portable pixmap as output.
  3865.  
  3866. 2 See_Also
  3867.      ppmtobmp, ppm
  3868.  
  3869. 2 Author
  3870.      Copyright (C) 1992 by David W. Sanderson.
  3871.  
  3872. 1 gouldtoppm
  3873.      gouldtoppm - convert Gould scanner file into a portable pix-
  3874.      map
  3875.  
  3876. 2 Synopsis
  3877.      gouldtoppm [gouldfile]
  3878.  
  3879. 2 Description
  3880.      Reads a file produced by the Gould scanner as  input.   Pro-
  3881.      duces a portable pixmap as output.
  3882.  
  3883. 2 See_Also
  3884.      ppm
  3885.  
  3886. 2 Author
  3887.      Copyright(C) 1990 by Stephen Paul Lesniewski
  3888.  
  3889. 1 ilbmtoppm
  3890.      ilbmtoppm - convert an ILBM file into a portable pixmap
  3891.  
  3892. 2 Synopsis
  3893.      ilbmtoppm [-verbose] [ILBMfile]
  3894.  
  3895. 2 Description
  3896.      Reads an IFF ILBM file as input.  Produces a portable pixmap
  3897.      as output.  Supported ILBM types are:
  3898.  
  3899.      Normal ILBMs with 1-16 planes.
  3900.  
  3901.      Amiga Extra-Halfbrite (EHB)
  3902.  
  3903.      Amiga Hold-and-modify (HAM) with 3-16 planes.
  3904.  
  3905.      24 bit.
  3906.  
  3907.      Color map (BMHD + CMAP chunk only, nPlanes = 0).
  3908.  
  3909.      Unofficial direct color.
  3910.           1-16 planes for each color component.
  3911.  
  3912.      Chunks used:
  3913.           BMHD, CMAP, CAMG (only HAM  &  EHB  flags  used),  BODY
  3914.           unofficial DCOL chunk to identify direct color ILBM
  3915.  
  3916.      Chunks ignored:
  3917.           GRAB, DEST, SPRT, CRNG, CCRT, CLUT, DPPV, DRNG, EPSF
  3918.  
  3919.      Other chunks (ignored but displayed in verbose mode):
  3920.           NAME, AUTH, (c), ANNO, DPI
  3921.  
  3922.      Unknown chunks are skipped.
  3923.  
  3924. 2 Options
  3925.      -verbose
  3926.           Give some informaton about the ILBM file.
  3927.  
  3928. 2 Bugs
  3929.      Probably.
  3930.  
  3931. 2 References
  3932.      Amiga ROM Kernel Reference Manual - Devices (3rd Ed.)
  3933.      Addison Wesley, ISBN 0-201-56775-X
  3934.  
  3935. 2 See_Also
  3936.      ppm(5), ppmtoilbm(1)
  3937.  
  3938. 2 Authors
  3939.      Copyright (C) 1989 by Jef Poskanzer.
  3940.      Modified June 1993 by Ingo Wilken
  3941.      (Ingo.Wilken@informatik.uni-oldenburg.de)
  3942.  
  3943. 1 imgtoppm
  3944.      imgtoppm - convert an Img-whatnot file into a portable  pix-
  3945.      map
  3946.  
  3947. 2 Synopsis
  3948.      imgtoppm [imgfile]
  3949.  
  3950. 2 Description
  3951.      Reads an Img-whatnot file as  input.   Produces  a  portable
  3952.      pixmap  as output.  The Img-whatnot toolkit is available for
  3953.      FTP on venera.isi.edu, along with numerous  images  in  this
  3954.      format.
  3955.  
  3956. 2 See_Also
  3957.      ppm
  3958.  
  3959. 2 Author
  3960.      Based on a simple conversion program posted to comp.graphics
  3961.      by Ed Falk.
  3962.  
  3963.      Copyright (C) 1989 by Jef Poskanzer.
  3964.  
  3965. 1 mtvtoppm
  3966.      mtvtoppm - convert output from the MTV or  PRT  ray  tracers
  3967.      into a portable pixmap
  3968.  
  3969. 2 Synopsis
  3970.      mtvtoppm [mtvfile]
  3971.  
  3972. 2 Description
  3973.      Reads an input  file  from  Mark  VanDeWettering's  MTV  ray
  3974.      tracer.  Produces a portable pixmap as output.
  3975.  
  3976.      The PRT raytracer also produces this format.
  3977.  
  3978. 2 See_Also
  3979.      ppm
  3980.  
  3981. 2 Author
  3982.      Copyright (C) 1989 by Jef Poskanzer.
  3983.  
  3984. 1 pcxtoppm
  3985.      pcxtoppm - convert a PCX file into a portable pixmap
  3986.  
  3987. 2 Synopsis
  3988.      pcxtoppm [pcxfile]
  3989.  
  3990. 2 Description
  3991.      Reads a PCX file as input.  Produces a  portable  pixmap  as
  3992.      output.
  3993.  
  3994. 2 See_Also
  3995.      ppmtopcx, ppm
  3996.  
  3997. 2 Author
  3998.      Copyright (C) 1990 by Michael Davidson.
  3999.  
  4000. 1 pgmtoppm
  4001.      pgmtoppm - colorize a portable graymap into a portable  pix-
  4002.      map
  4003.  
  4004. 2 Synopsis
  4005.      pgmtoppm colorspec [pgmfile]
  4006.      pgmtoppm colorspec1-colorspec2 [pgmfile]
  4007.      pgmtoppm -map mapfile [pgmfile]
  4008.  
  4009. 2 Description
  4010.      Reads a portable graymap as input.  Colorizes it  by  multi-
  4011.      plying the the gray values by specified color or colors, and
  4012.      produces a portable pixmap as output.
  4013.  
  4014.      If only one color is specified, black in the pgm file  stays
  4015.      black  and  white  in  the pgm file turns into the specified
  4016.      color in the ppm file.  If two colors (separated by a  dash)
  4017.      are specified, then black gets mapped to the first color and
  4018.      white gets mapped to the second.
  4019.  
  4020.      The color can be specified in five ways:
  4021.  
  4022.      o    A name, assuming that a pointer to an  X11-style  color
  4023.           names file was compiled in.
  4024.  
  4025.      o    An X11-style hexadecimal specifier: rgb:r/g/b, where  r
  4026.           g and b are each 1- to 4-digit hexadecimal numbers.
  4027.  
  4028.      o    An X11-style decimal specifier: rgbi:r/g/b, where  r  g
  4029.           and b are floating point numbers between 0 and 1.
  4030.  
  4031.      o    For backwards compatibility, an  old-X11-style  hexade-
  4032.           cimal    number:    #rgb,   #rrggbb,   #rrrgggbbb,   or
  4033.           #rrrrggggbbbb.
  4034.  
  4035.      o    For  backwards  compatibility,  a  triplet  of  numbers
  4036.           separated  by commas: r,g,b, where r g and b are float-
  4037.           ing point numbers between 0 and  1.   (This  style  was
  4038.           added before MIT came up with the similar rgbi style.)
  4039.  
  4040.      Also, the -map flag lets you specify an entire  colormap  to
  4041.      be  used.   The  mapfile  is  just a ppm file; it can be any
  4042.      shape, all that matters is the colors in it and their order.
  4043.      In  this case, black gets mapped into the first color in the
  4044.      map file, and white gets mapped to the last.
  4045.  
  4046. 2 See_Also
  4047.      rgb3toppm, ppmtopgm, ppmtorgb3, ppm, pgm
  4048.  
  4049. 2 Author
  4050.      Copyright (C) 1991 by Jef Poskanzer.
  4051.  
  4052. 1 pi1toppm
  4053.      pi1toppm - convert an Atari Degas .pi1 into a portable  pix-
  4054.      map
  4055.  
  4056. 2 Synopsis
  4057.      pi1toppm [pi1file]
  4058.  
  4059. 2 Description
  4060.      Reads an Atari Degas .pi1 file as input.  Produces  a  port-
  4061.      able pixmap as output.
  4062.  
  4063. 2 See_Also
  4064.      ppmtopi1, ppm, pi3topbm, pbmtopi3
  4065.  
  4066. 2 Author
  4067.      Copyright (C) 1991 by Steve Belczyk (seb3@gte.com)  and  Jef
  4068.      Poskanzer.
  4069.  
  4070. 1 picttoppm
  4071.      picttoppm - convert a Macintosh PICT file  into  a  portable
  4072.      pixmap
  4073.  
  4074. 2 Synopsis
  4075.      picttoppm [-verbose] [-fullres] [-noheader] [pictfile]
  4076.  
  4077. 2 Description
  4078.      Reads a PICT file (version 1 or 2) and  outputs  a  portable
  4079.      pixmap.   Useful  as  the first step in converting a scanned
  4080.      image to something that can be displayed on Unix.
  4081.  
  4082. 2 Options
  4083.      -fullres
  4084.           Force any images in the PICT file to be output with  at
  4085.           least  their full resolution.  A PICT file may indicate
  4086.           that a contained image is to be scaled down before out-
  4087.           put.   This  option forces images to retain their sizes
  4088.           and prevent information loss.
  4089.  
  4090.      -noheader
  4091.           Do not skip the 512 byte header that is present on  all
  4092.           PICT  files.   This  is  useful when you have PICT data
  4093.           that was not stored in the data fork of a PICT file.
  4094.  
  4095.      -verbose
  4096.           Turns on verbose mode which prints a a whole  bunch  of
  4097.           information  that  only  picttoppm  hackers really care
  4098.           about.
  4099.  
  4100. 2 Bugs
  4101.      The PICT file format is a general drawing format.  picttoppm
  4102.      only  supports a small subset of its operations but is still
  4103.      very useful for files produced  by  scanning  software.   In
  4104.      particular,  text  added to a scanned image will be silently
  4105.      ignored.
  4106.  
  4107. 2 See_Also
  4108.      Inside Macintosh volume 5, ppmtopict, ppm
  4109.  
  4110. 2 Author
  4111.      Copyright 1989 George Phillips
  4112.  
  4113. 1 pjtoppm
  4114.      pjtoppm - convert an HP PaintJet file to a portable pixmap
  4115.  
  4116. 2 Synopsis
  4117.      pjtoppm [paintjet]
  4118.  
  4119. 2 Description
  4120.      Reads an HP PaintJet file as input and converts  it  into  a
  4121.      portable  pixmap.  This was a quick hack to save some trees,
  4122.      and it only handles a small subset of the paintjet commands.
  4123.      In  particular,  it will only handle enough commands to con-
  4124.      vert most raster image files.
  4125.  
  4126. REFERENCES
  4127.      HP PaintJet XL Color Graphics Printer User's Guide
  4128.  
  4129. 2 See_Also
  4130.      ppmtopj
  4131.  
  4132. 2 Author
  4133.      Copyright (C) 1991 by Christos Zoulas.
  4134.  
  4135. 1 ppm3d
  4136.      ppm3d - convert two  portable  pixmap  into  a  red/blue  3d
  4137.      glasses pixmap
  4138.  
  4139. 2 Synopsis
  4140.      ppm3d leftppmfile rightppmfile [horizontal offset]
  4141.  
  4142. 2 Description
  4143.      Reads two portable pixmaps as input.   Produces  a  portable
  4144.      pixmap   as   output,   with   the   images  overlapping  by
  4145.      horizontal offset
  4146.  
  4147.      pixels in blue/red format.
  4148.  
  4149.      horizontal offset defaults to 30 pixels.   Pixmaps  MUST  be
  4150.      the same size.
  4151.  
  4152. 2 See_Also
  4153.      ppm(5)
  4154.  
  4155. 2 Author
  4156.      Copyright (C) 1993 by David K. Drum.
  4157.  
  4158. 1 ppmbrighten
  4159.      ppmbrighten - change an images Saturation and Value from  an
  4160.      HSV map
  4161.  
  4162. 2 Synopsis
  4163.      ppmbrighten  [-n]  [-s  <+-  saturation>]  [-v  <+-  value>]
  4164.      <ppmfile>
  4165.  
  4166. 2 Description
  4167.      Reads a portable pixmap as input.  Converts the  image  from
  4168.      RGB  space  to HSV space and changes the Value by <+- value>
  4169.      as a percentage.  Likewise with  the  Saturation.   Doubling
  4170.      the Value would involve
  4171.  
  4172.      ppmbrighten -v 100
  4173.  
  4174.      to add 100 percent to the Value.
  4175.  
  4176.      The 'n' option normalizes the Value to exist between 0 and 1
  4177.      (normalized).
  4178.  
  4179. 2 See_Also
  4180.      pgmnorm, ppm
  4181.  
  4182. 2 Notes
  4183.      This program does not change the number of colors.
  4184.  
  4185. 2 Author
  4186.      Copyright (C) 1990 by Brian Moffet Copyright (C) 1989 by Jef
  4187.      Poskanzer.
  4188.  
  4189.      Permission  to  use,  copy,  modify,  and  distribute   this
  4190.      software  and  its documentation for any purpose and without
  4191.      fee is hereby granted, provided  that  the  above  copyright
  4192.      notice  appear  in  all  copies and that both that copyright
  4193.      notice and this permission notice appear in supporting docu-
  4194.      mentation.   This  software  is  provided  "as  is"  without
  4195.      express or implied warranty.
  4196.  
  4197. 1 ppmchange
  4198.      ppmchange -  change  all  pixels  of  one  color  to another in a
  4199.      portable pixmap
  4200.  
  4201. 2 Synopsis
  4202.      ppmchange colorspec1 colorspec2 [ppmfile]
  4203.  
  4204. 2 Description
  4205.      Reads  a portable  pixmap  as  input.    Changes  all  pixels  of
  4206.      colorspec1 to colorspec2, leaving all others unchanged.
  4207.  
  4208.      The color can be specified in five ways:
  4209.  
  4210.      o    A name, assuming that a pointer to an  X11-style  color
  4211.           names file was compiled in.
  4212.  
  4213.      o    An X11-style hexadecimal specifier: rgb:r/g/b, where  r
  4214.           g and b are each 1- to 4-digit hexadecimal numbers.
  4215.  
  4216.      o    An X11-style decimal specifier: rgbi:r/g/b, where  r  g
  4217.           and b are floating point numbers between 0 and 1.
  4218.  
  4219.      o    For backwards compatibility, an  old-X11-style  hexade-
  4220.           cimal    number:    #rgb,   #rrggbb,   #rrrgggbbb,   or
  4221.           #rrrrggggbbbb.
  4222.  
  4223.      o    For  backwards  compatibility,  a  triplet  of  numbers
  4224.           separated  by commas: r,g,b, where r g and b are float-
  4225.           ing point numbers between 0 and  1.   (This  style  was
  4226.           added before MIT came up with the similar rgbi style.)
  4227.  
  4228. 2 See_Also
  4229.      pgmtoppm(1), ppm(5)
  4230.  
  4231. 2 Author
  4232.      Wilson H. Bent. Jr. (whb@usc.edu)
  4233.  
  4234. 1 ppmdim
  4235.      ppmdim - dim a portable pixmap down to total blackness
  4236.  
  4237. 2 Synopsis
  4238.      ppmdim dimfactor [ppmfile]
  4239.  
  4240. 2 Description
  4241.      Reads a portable pixmap as input.    Diminishes its brightness by
  4242.      the specified dimfactor down to total blackness.    The dimfactor
  4243.      may be in the range from 0.0 (total  blackness, deep night, nada,
  4244.      null, nothing) to 1.0 (original picture's brightness).
  4245.  
  4246.      As pnmgamma does not do the brightness correction in  the  way  I
  4247.      wanted it, this small program was written.
  4248.  
  4249.      ppmdim is similar to ppmbrighten , but not exactly the same.
  4250.  
  4251. 2 See_Also
  4252.      ppm(5), ppmflash(1), pnmgamma(1), ppmbrighten(1)
  4253.  
  4254. 2 Author
  4255.      Copyright (C) 1993 by Frank Neumann
  4256.  
  4257. 1 ppmdist
  4258.      ppmdist -  simplistic grayscale assignment for machine generated,
  4259.      color images
  4260.  
  4261. 2 Synopsis
  4262.      ppmdist [-intensity|-frequency] [ppmfile]
  4263.  
  4264. 2 Description
  4265.      Reads a portable pixmap  as  input,  performs  a  simplistic
  4266.      grayscale assignment intended for use with grayscale or bit-
  4267.      map printers.
  4268.  
  4269.      Often conversion from ppm to pgm will yield  an  image  with
  4270.      contrast  too low for good printer output.  The program max-
  4271.      imizes contrast between the gray levels output.
  4272.  
  4273.      A ppm input of n colors is read, and a pgm of n gray  levels
  4274.      is  written.   The  gray  levels  take on the values 0..n-1,
  4275.      while maxval takes on n-1.
  4276.  
  4277.      The mapping from color to stepped grayscale can be performed
  4278.      in  order of input pixel intensity, or input pixel frequency
  4279.      (number of repetitions).
  4280.  
  4281. 2 Options
  4282.      Helpful only for images with a very small number of  colors.
  4283.      Perhaps should have been an option to ppmtopgm.
  4284.  
  4285. 2 See_Also
  4286.      ppmtopgm, ppmhist, ppm
  4287.  
  4288. 2 Author
  4289.      Copyright (C) 1993 by Dan Stromberg.
  4290.  
  4291. 1 ppmdither
  4292.      ppmdither - ordered dither for color images
  4293.  
  4294. 2 Synopsis
  4295.      ppmdither [-dim dimension] [-red shades] [-green shades]  [-
  4296.      blue shades] [ppmfile]
  4297.  
  4298. 2 Description
  4299.      Reads a portable pixmap as input, and applies  dithering  to
  4300.      it to reduce the number of colors used down to the specified
  4301.      number of shades for each primary.  The  default  number  of
  4302.      shades is red=5, green=9, blue=5, for a total of 225 colors.
  4303.      To convert the image to a binary  rgb  format  suitable  for
  4304.      color  printers,  use  -red 2 -green 2 -blue 2.  The maximum
  4305.      number of colors that can be used is 256 and can be computed
  4306.      as the product of the number of red, green and blue shades.
  4307.  
  4308. 2 Options
  4309.      -dim dimension
  4310.                    The size of the dithering matrix.  Must  be  a
  4311.                    power of 2.
  4312.  
  4313.      -red shades   The number of red shades to be  used;  minimum
  4314.                    of 2.
  4315.  
  4316.      -green shades The number of green shades to be used; minimum
  4317.                    of 2.
  4318.  
  4319.      -blue shades  The number of blue shades to be used;  minimum
  4320.                    of 2.
  4321.  
  4322. 2 See_Also
  4323.      pnmdepth, ppmquant, ppm
  4324.  
  4325. 2 Author
  4326.      Copyright (C) 1991 by Christos Zoulas.
  4327.  
  4328. 1 ppmflash
  4329.      ppmflash - brighten a picture up to complete white-out
  4330.  
  4331. 2 Synopsis
  4332.      ppmflash flashfactor [ppmfile]
  4333.  
  4334. 2 Description
  4335.      Reads  a portable pixmap as input.  Increases its  brightness  by
  4336.      the  specified  flashfactor  up to a total white-out image.   The
  4337.      flashfactor  may  be  in  the  range from 0.0 (original picture's
  4338.      brightness) to 1.0 (full white-out, The Second After).
  4339.  
  4340.      As pnmgamma  does  not  do the brightness correction in the way I
  4341.      wanted it, this small program was written.
  4342.  
  4343.      This program is similar to ppmbrighten, but not exactly the same.
  4344.  
  4345. 2 See_Also
  4346.      ppm(5), ppmdim(1), pnmgamma(1), ppmbrighten(1)
  4347.  
  4348. 2 Author
  4349.      Copyright (C) 1993 by Frank Neumann
  4350.  
  4351. 1 ppmhist
  4352.      ppmhist - print a histogram of a portable pixmap
  4353.  
  4354. 2 Synopsis
  4355.      ppmhist [ppmfile]
  4356.  
  4357. 2 Description
  4358.      Reads a portable pixmap as input.  Generates a histogram  of
  4359.      the colors in the pixmap.
  4360.  
  4361. 2 See_Also
  4362.      ppm, pgmhist
  4363.  
  4364. 2 Author
  4365.      Copyright (C) 1989 by Jef Poskanzer.
  4366.  
  4367. 1 ppmmake
  4368.      ppmmake - create a pixmap of a specified size and color
  4369.  
  4370. 2 Synopsis
  4371.      ppmmake color width height
  4372.  
  4373. 2 Description
  4374.      Produces a portable pixmap of the  specified  color,  width,
  4375.      and height.
  4376.  
  4377.      The color can be specified in five ways:
  4378.  
  4379.      o    A name, assuming that a pointer to an  X11-style  color
  4380.           names file was compiled in.
  4381.  
  4382.      o    An X11-style hexadecimal specifier: rgb:r/g/b, where  r
  4383.           g and b are each 1- to 4-digit hexadecimal numbers.
  4384.  
  4385.      o    An X11-style decimal specifier: rgbi:r/g/b, where  r  g
  4386.           and b are floating point numbers between 0 and 1.
  4387.  
  4388.      o    For backwards compatibility, an  old-X11-style  hexade-
  4389.           cimal    number:    #rgb,   #rrggbb,   #rrrgggbbb,   or
  4390.           #rrrrggggbbbb.
  4391.  
  4392.      o    For  backwards  compatibility,  a  triplet  of  numbers
  4393.           separated  by commas: r,g,b, where r g and b are float-
  4394.           ing point numbers between 0 and  1.   (This  style  was
  4395.           added before MIT came up with the similar rgbi style.)
  4396.  
  4397. 2 See_Also
  4398.      ppm, pbmmake
  4399.  
  4400. 2 Author
  4401.      Copyright (C) 1991 by Jef Poskanzer.
  4402.  
  4403. 1 ppmmix
  4404.      ppmmix - blend together two portable pixmaps
  4405.  
  4406. 2 Synopsis
  4407.      ppmmix fadefactor ppmfile1 ppmfile2
  4408.  
  4409. 2 Description
  4410.      Reads two portable pixmaps  as  input.  Mixes them together using
  4411.      the specified fade factor.   The  fade factor may be in the range
  4412.      from 0.0 (only ppmfile1's image data)  to  1.0  (only  ppmfile2's
  4413.      image data).  Anything in between gains  a  smooth  blend between
  4414.      the two images.
  4415.  
  4416.      The two pixmaps must have the same size.
  4417.  
  4418. 2 See_Also
  4419.      ppm(5)
  4420.  
  4421. 2 Author
  4422.      Copyright (C) 1993 by Frank Neumann
  4423.  
  4424. 1 ppmquant
  4425.      ppmquant - quantize the colors in  a  portable  pixmap  down to a
  4426.      specified number
  4427.  
  4428. 2 Synopsis
  4429.      ppmquant [-floyd|-fs] ncolors [ppmfile]
  4430.      ppmquant [-floyd|-fs] -map mapfile [ppmfile]
  4431.  
  4432. 2 Description
  4433.      Reads a portable pixmap as input.  Chooses ncolors colors to
  4434.      best  represent  the  image, maps the existing colors to the
  4435.      new ones, and writes a portable pixmap as output.
  4436.  
  4437.      The quantization method is Heckbert's "median cut".
  4438.  
  4439.      Alternately, you can skip the color-choosing step by  speci-
  4440.      fying  your  own set of colors with the -map flag.  The map-
  4441.      file is just a ppm file; it  can  be  any  shape,  all  that
  4442.      matters is the colors in it.  For instance, to quantize down
  4443.      to the 8-color IBM TTL color set, you might use:
  4444.          P3
  4445.          8 1
  4446.          255
  4447.            0   0   0
  4448.          255   0   0
  4449.            0 255   0
  4450.            0   0 255
  4451.          255 255   0
  4452.          255   0 255
  4453.            0 255 255
  4454.          255 255 255
  4455.      If you want to quantize one pixmap  to  use  the  colors  in
  4456.      another  one,  just  use the second one as the mapfile.  You
  4457.      don't have to reduce it down  to  only  one  pixel  of  each
  4458.      color, just use it as is.
  4459.  
  4460.      The -floyd/-fs flag enables a Floyd-Steinberg  error  diffu-
  4461.      sion  step.   Floyd-Steinberg gives vastly better results on
  4462.      images where the  unmodified  quantization  has  banding  or
  4463.      other  artifacts, especially when going to a small number of
  4464.      colors such as the above IBM set.   However,  it  does  take
  4465.      substantially more CPU time, so the default is off.
  4466.  
  4467.      All flags can be abbreviated to their shortest  unique  pre-
  4468.      fix.
  4469.  
  4470. 2 References
  4471.      "Color Image Quantization for Frame Buffer Display" by  Paul
  4472.      Heckbert, SIGGRAPH '82 Proceedings, page 297.
  4473.  
  4474. 2 See_Also
  4475.      ppmquantall, pnmdepth, ppmdither, ppm
  4476.  
  4477. 2 Author
  4478.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  4479.  
  4480. 1 ppmrelief
  4481.      ppmrelief - run a Laplacian relief filter on a portable pixmap
  4482.  
  4483. 2 Synopsis
  4484.      ppmrelief [ppmfile]
  4485.  
  4486. 2 Description
  4487.      Reads a portable pixmap as input.  Does a  Laplacian  relief
  4488.      filter, and writes a portable pixmap as output.
  4489.  
  4490.      The Laplacian relief filter is described in "Beyond  Photog-
  4491.      raphy"  by  Holzmann,  equation  3.19.  It's a sort of edge-
  4492.      detection.
  4493.  
  4494. 2 See_Also
  4495.      pgmbentley, pgmoil, ppm
  4496.  
  4497. 2 Author
  4498.      Copyright (C) 1990 by Wilson Bent (whb@hoh-2.att.com)
  4499.  
  4500. 1 ppmshift
  4501.      ppmshift - shift lines of  a  portable  pixmap left or right by a
  4502.      random amount
  4503.  
  4504. 2 Synopsis
  4505.      ppmshift shift [ppmfile]
  4506.  
  4507. 2 Description
  4508.      Reads a portable pixmap as input.  Shifts every row of image data
  4509.      to the left or right by a certain  amount.  The 'shift' parameter
  4510.      determines by how many pixels a row is to be shifted at most.
  4511.  
  4512.      Another one of those effects I intended to use  for  MPEG  tests.
  4513.      Unfortunately,  this  program will not help me here - it  creates
  4514.      too  random patterns to be used for animations.  Still, it  might
  4515.      give interesting results on still images.
  4516.  
  4517. 2 Example
  4518.      Check  this  out:    Save your  favourite  model's  picture  from
  4519.      something like alt.binaries.pictures.supermodels (ok, or from any
  4520.      other  picture source), convert it to ppm, and  process  it  e.g.
  4521.      like this, assuming the picture is 800x600 pixels:
  4522.      
  4523.        # take the upper half, and leave it like it is
  4524.        pnmcut 0 0 800 300 cs.ppm >upper.ppm
  4525.  
  4526.        # take the lower half, flip it upside down,  dim it and distort
  4527.          it a little
  4528.        pnmcut 0 300 800 300 cs.ppm | pnmflip -tb | ppmdim 0.7 |
  4529.           ppmshift 10 >lower.ppm
  4530.  
  4531.        # and concatenate the two pieces
  4532.        pnmcat -tb upper.ppm lower.ppm >newpic.ppm  The  resulting
  4533.      picture  looks  like the image being reflected on a water surface
  4534.      with slight ripples.
  4535.  
  4536. 2 See_Also
  4537.      ppm(5), pnmcut(1), pnmflip(1), ppmdim(1), pnmcat(1)
  4538.  
  4539. 2 Author
  4540.      Copyright (C) 1993 by Frank Neumann
  4541.  
  4542. 1 ppmspread
  4543.      ppmspread - displace  a  portable  pixmap's  pixels by  a  random
  4544.      amount
  4545.  
  4546. 2 Synopsis
  4547.      ppmspread amount [ppmfile]
  4548.  
  4549. 2 Description
  4550.      Reads a portable pixmap as input.  Moves every pixel around a bit
  4551.      relative to its original position.  amount determines by how many
  4552.      pixels a pixel is to be moved around at most.
  4553.  
  4554.      Pictures processed with this  filter  will  seem  to  be somewhat
  4555.      dissolved or unfocussed (although they  appear  more  coarse than
  4556.      images processed by something like pnmconvol ).
  4557.  
  4558. 2 See_Also
  4559.      ppm(5), pnmconvol(1)
  4560.  
  4561. 2 Author
  4562.      Copyright (C) 1993 by Frank Neumann
  4563.  
  4564. 1 ppmtoacad
  4565.      ppmtoacad - convert portable pixmap to AutoCAD database or slide
  4566.  
  4567. 2 Synopsis
  4568.      ppmtoacad [-dxb] [-poly] [-background colour] [-white] [-
  4569.                aspect ratio] [-8] [ppmfile]
  4570.  
  4571. 2 Description
  4572.      Reads a portable pixmap as input.  Produces an AutoCAD(Reg.)
  4573.      slide  file or binary database import (.dxb) file as output.
  4574.      If no ppmfile is specified,  input  is  read  from  standard
  4575.      input.
  4576.  
  4577. 2 Options
  4578.      -dxb An AutoCAD binary database import (.dxb) file is  writ-
  4579.           ten.   This  file  is  read with the DXBIN command and,
  4580.           once loaded, becomes part of  the  AutoCAD  geometrical
  4581.           database  and  can  be viewed and edited like any other
  4582.           object.  Each sequence of identical  pixels  becomes  a
  4583.           separate  object  in  the  database; this can result in
  4584.           very large AutoCAD drawing files.  However, if you want
  4585.           to trace over a bitmap, it lets you zoom and pan around
  4586.           the bitmap as you wish.
  4587.  
  4588.      -poly
  4589.           If the -dxb option is  not  specified,  the  output  of
  4590.           ppmtoacad  is an AutoCAD slide file.  Normally each row
  4591.           of pixels is represented by an AutoCAD line entity.  If
  4592.           -poly  is  selected,  the pixels are rendered as filled
  4593.           polygons.  If the slide is viewed  on  a  display  with
  4594.           higher  resolution  than  the  source pixmap, this will
  4595.           cause the pixels to  expand  instead  of  appearing  as
  4596.           discrete  lines  against  the screen background colour.
  4597.           Regrettably, this  representation  yields  slide  files
  4598.           which  occupy  more  disc  space  and  take  longer  to
  4599.           display.
  4600.  
  4601.      -background colour
  4602.           Most AutoCAD display drivers can be configured  to  use
  4603.           any  available  colour  as the screen background.  Some
  4604.           users perfer a black screen background,  others  white,
  4605.           while splinter groups advocate burnt ocher, tawny puce,
  4606.           and shocking grey.   Discarding  pixels  whose  closest
  4607.           AutoCAD  colour  representation  is  equal to the back-
  4608.           ground colour can substantially reduce the size of  the
  4609.           AutoCAD  database  or  slide file needed to represent a
  4610.           bitmap.  If no -background  colour  is  specified,  the
  4611.           screen  background  colour is assumed to be black.  Any
  4612.           AutoCAD colour number may be specified  as  the  screen
  4613.           background;  colour  numbers are assumed to specify the
  4614.           hues  defined  in  the  standard  AutoCAD  256   colour
  4615.           palette.
  4616.  
  4617.      -white
  4618.           Since many AutoCAD users choose a  white  screen  back-
  4619.           ground, this option is provided as a short-cut.  Speci-
  4620.           fying -white is identical in effect to -background 7.
  4621.  
  4622.      -aspect ratio
  4623.           If the source pixmap had non-square pixels,  the  ratio
  4624.           of  the pixel width to pixel height should be specified
  4625.           as ratio.  The resulting slide or  .dxb  file  will  be
  4626.           corrected  so that pixels on the AutoCAD screen will be
  4627.           square.  For example, to correct an image  made  for  a
  4628.           320x200 VGA/MCGA screen, specify -aspect 0.8333.
  4629.  
  4630.      -8   Restricts the colours in the output file to the  8  RGB
  4631.           shades.
  4632.  
  4633.      All flags can be abbreviated to their shortest  unique  pre-
  4634.      fix.
  4635.  
  4636. 2 Bugs
  4637.      AutoCAD has a fixed  palette  of  256  colours,  distributed
  4638.      along  the  hue,  lightness,  and  saturation axes.  Pixmaps
  4639.      which contain many nearly-identical colours, or colours  not
  4640.      closely  approximated  by  AutoCAD's  palette, may be poorly
  4641.      rendered.
  4642.  
  4643.      ppmtoacad works best if the  system  displaying  its  output
  4644.      supports the full 256 colour AutoCAD palette.  Monochrome, 8
  4645.      colour, and 16 colour configurations will produce less  than
  4646.      optimal results.
  4647.  
  4648.      When creating a .dxb file or a slide  file  with  the  -poly
  4649.      option, ppmtoacad finds both vertical and horizontal runs of
  4650.      identical pixels  and  consolidates  them  into  rectangular
  4651.      regions  to  reduce  the  size  of the output file.  This is
  4652.      effective for images with large areas of constant colour but
  4653.      it's no substitute for true raster to vector conversion.  In
  4654.      particular, thin diagonal lines are not optimised at all  by
  4655.      this process.
  4656.  
  4657.      Output files can be huge.
  4658.  
  4659. 2 See_Also
  4660.      AutoCAD Reference Manual: Slide File Format and Binary Draw-
  4661.      ing Interchange (DXB) Files, ppm
  4662.  
  4663. 2 Author
  4664.           John Walker
  4665.           Autodesk SA
  4666.           Avenue des Champs-Montants 14b
  4667.           CH-2074 MARIN
  4668.           Suisse/Schweiz/Svizzera/Svizra/Switzerland
  4669.           Usenet:  kelvin@Autodesk.com
  4670.           Fax:     038/33 88 15
  4671.           Voice:   038/33 76 33
  4672.  
  4673.      Permission  to  use,  copy,  modify,  and  distribute   this
  4674.      software  and  its documentation for any purpose and without
  4675.      fee is hereby granted, without any  conditions  or  restric-
  4676.      tions.   This software is provided ``as is'' without express
  4677.      or implied warranty.
  4678.  
  4679.      AutoCAD and Autodesk are registered trademarks of  Autodesk,
  4680.      Inc.
  4681.  
  4682. 1 ppmtobmp
  4683.      ppmtobmp - convert a portable pixmap into a BMP file
  4684.  
  4685. 2 Synopsis
  4686.      ppmtobmp [-windows] [-os2] [ppmfile]
  4687.  
  4688. 2 Description
  4689.      Reads a portable pixmap as input.  Produces a Microsoft Win-
  4690.      dows or OS/2 BMP file as output.
  4691.  
  4692. 2 Options
  4693.      -windows
  4694.           Tells the program to produce a  Microsoft  Windows  BMP
  4695.           file.
  4696.  
  4697.      -os2 Tells the program to produce an OS/2 BMP  file.   (This
  4698.           is the default.)
  4699.  
  4700.      All flags can be abbreviated to their shortest  unique  pre-
  4701.      fix.
  4702.  
  4703. 2 See_Also
  4704.      bmptoppm, ppm
  4705.  
  4706. 2 Author
  4707.      Copyright (C) 1992 by David W. Sanderson.
  4708.  
  4709. 1 ppmtogif
  4710.      ppmtogif - convert a portable pixmap into a GIF file
  4711.  
  4712. 2 Synopsis
  4713.      ppmtogif [-interlace] [-sort] [-map mapfile ] [ppmfile]
  4714.  
  4715. 2 Description
  4716.      Reads a portable pixmap as input.  Produces a  GIF  file  as
  4717.      output.
  4718.  
  4719. 2 Options
  4720.      -interlace
  4721.           Tells the program to produce an interlaced GIF file.
  4722.  
  4723.      -sort
  4724.           Produces a GIF file with a sorted color map.
  4725.  
  4726.      -map mapfile
  4727.  
  4728.           Uses the colors found in  the  mapfile  to  create  the
  4729.           colormap  in  the  GIF file, instead of the colors from
  4730.           ppmfile. The mapfile can be  any  ppm  file;  all  that
  4731.           matters  is  the colors in it. If the colors in ppmfile
  4732.           do not match those in mapfile , they are matched  to  a
  4733.           "best match". A (much) better result can be obtained by
  4734.           using the following filter in advance:
  4735.  
  4736.           ppmquant -floyd -map mapfile
  4737.  
  4738.      All flags can be abbreviated to their shortest  unique  pre-
  4739.      fix.
  4740.  
  4741. 2 See_Also
  4742.      giftopnm, ppmquant, ppm
  4743.  
  4744. 2 Author
  4745.      Based      on      GIFENCOD      by       David       Rowley
  4746.      <mgardi@watdcsu.waterloo.edu>.  Lempel-Ziv compression based
  4747.      on "compress".
  4748.  
  4749.      Copyright (C) 1989 by Jef Poskanzer.
  4750.  
  4751. 1 ppmtoicr
  4752.      ppmtoicr - convert a portable pixmap into NCSA ICR format
  4753.  
  4754. 2 Synopsis
  4755.      ppmtoicr  [-windowname  name]  [-expand  expand]   [-display
  4756.      display] [-rle] [ppmfile]
  4757.  
  4758. 2 Description
  4759.      Reads a portable pixmap file as  input.   Produces  an  NCSA
  4760.      Telnet  Interactive Color Raster graphic file as output.  If
  4761.      ppmfile is not supplied, ppmtoicr will  read  from  standard
  4762.      input.
  4763.  
  4764.      Interactive Color Raster (ICR) is a protocol for  displaying
  4765.      raster  graphics  on  workstation  screens.  The protocol is
  4766.      implemented in NCSA Telnet for the  Macintosh  version  2.3.
  4767.      The  ICR  protocol  shares  characteristics of the Tektronix
  4768.      graphics terminal emulation protocol.  For  example,  escape
  4769.      sequences are used to control the display.
  4770.  
  4771.      ppmtoicr will output the appropriate sequences to  create  a
  4772.      window  of  the  dimensions  of  the  input pixmap, create a
  4773.      colormap of up to 256 colors on the display, then  load  the
  4774.      picture data into the window.
  4775.  
  4776.      Note that there is no icrtoppm tool - this transformation is
  4777.      one way.
  4778.  
  4779. 2 Options
  4780.      -windownamename
  4781.                    Output will be displayed in name  (Default  is
  4782.                    to use ppmfile or "untitled" if standard input
  4783.                    is read.)
  4784.  
  4785.      -expandexpand Output will be expanded on display  by  factor
  4786.                    expand  (For  example, a value of 2 will cause
  4787.                    four pixels to be displayed  for  every  input
  4788.                    pixel.)
  4789.  
  4790.      -displaydisplay
  4791.                    Output will be displayed  on  screen  numbered
  4792.                    display
  4793.  
  4794.      -rle          Use run-length  encoded  format  for  display.
  4795.                    (This  will  nearly always result in a quicker
  4796.                    display, but may skew the colormap.)
  4797.  
  4798. 2 Examples
  4799.      To display a ppm file using the protocol:
  4800.          ppmtoicr ppmfile
  4801.      This will create a window named ppmfile on the display  with
  4802.      the  correct  dimensions  for ppmfile, create and download a
  4803.      colormap of up to 256 colors, and download the picture  into
  4804.      the window. The same effect may be achieved by the following
  4805.      sequence:
  4806.          ppmtoicr ppmfile > filename
  4807.          cat filename
  4808.      To display a GIF file using the protocol in a window  titled
  4809.      after  the  input file, zoom the displayed image by a factor
  4810.      of 2, and run-length encode the data:
  4811.          giftopnm giffile | ppmtoicr -w giffile -r -e 2
  4812.  
  4813. 2 Bugs
  4814.      The protocol uses frequent fflush calls to speed up display.
  4815.      If  the output is saved to a file for later display via cat,
  4816.      drawing will be much slower. In either case, increasing  the
  4817.      Blocksize  limit  on  the display will speed up transmission
  4818.      substantially.
  4819.  
  4820. 2 See_Also
  4821.      ppm
  4822.  
  4823.      NCSA Telnet for the Macintosh,  University  of  Illinois  at
  4824.      Urbana-Champaign (1989)
  4825.  
  4826. 2 Author
  4827.      Copyright     (C)      1990      by      Kanthan      Pillay
  4828.      (svpillay@Princeton.EDU), Princeton University Computing and
  4829.      Information Technology.
  4830.  
  4831. 1 ppmtoilbm
  4832.      ppmtoilbm - convert a portable pixmap into an ILBM file
  4833.  
  4834. 2 Synopsis
  4835.      ppmtoilbm [-maxplanes|-mp  N]  [-fixplanes|-fp  N]  [-ham6|-
  4836.      ham8]   [-dcbits|-dcplanesrg   [-normal|-hamif|-hamforce   -
  4837.      dcif|-dcforce|-cmaponly] [-ecs|-aga] [-mapppmfile] [ppmfile]
  4838.  
  4839. 2 Description
  4840.      Reads a portable pixmap as input.  Produces an ILBM file  as
  4841.      output.  Supported ILBM types are:
  4842.  
  4843.      Normal ILBMs with 1-16 planes.
  4844.  
  4845.      Amiga Hold-and-modify (HAM) with 3-16 planes.
  4846.  
  4847.      24 bit.
  4848.  
  4849.      Color map (BMHD + CMAP chunk only, nPlanes = 0).
  4850.  
  4851.      Unofficial direct color.
  4852.           1-16 planes for each color component.
  4853.  
  4854.      Chunks written:
  4855.           BMHD, CMAP, CAMG (only for HAM), BODY (not for colormap
  4856.           files) unofficial DCOL chunk for direct color ILBM
  4857.  
  4858. 2 Options
  4859.      Options marked with (*) can be prefixed with  a  "no",  e.g.
  4860.      "-nohamif". All options can be abbreviated to their shortest
  4861.      unique prefix.
  4862.  
  4863.      -maxplanes | -mp n
  4864.           (default 5, minimum 1, maximum 16)  Maximum  planes  to
  4865.           write  in  a  normal  ILBM.  If the pixmap does not fit
  4866.           into <n> planes, ppmtoilbm writes a HAM file (if -hamif
  4867.           is  used),  a 24bit file (if -24if is used) or a direct
  4868.           color file (if -dcif is used) or aborts with an error.
  4869.  
  4870.      -fixplanes | -fp n
  4871.           (min 1, max 16) If a normal ILBM is  written,  it  will
  4872.           have exactly <n> planes.
  4873.  
  4874.      -hambits | -hamplanes n
  4875.           (default 6, min 3, max 16) Select number of planes  for
  4876.           HAM picture.  The current Amiga hardware supports 6 and
  4877.           8 planes, so for now you should only use this values.
  4878.  
  4879.      -normal (default)
  4880.           Turns  off   -hamif/-24if/-dcif,   -hamforce/-24force/-
  4881.           dcforce and -cmaponly.
  4882.  
  4883.      -hamif (*)
  4884.  
  4885.      -24if (*)
  4886.  
  4887.      -dcif (*)
  4888.           Write a HAM/24bit/direct color file if the pixmap  does
  4889.           not fit into <maxplanes> planes.
  4890.  
  4891.      -hamforce (*)
  4892.  
  4893.      -24force (*)
  4894.  
  4895.      -dcforce (*)
  4896.           Write a HAM/24bit/direct color file.
  4897.  
  4898.      -dcbits | -dcplanes r g b
  4899.           (default 5, min 1, max 16).  Select number of bits  for
  4900.           red, green & blue in a direct color ILBM.
  4901.  
  4902.      -ecs (default)
  4903.           Shortcut for: -hamplanes 6 -maxplanes 5
  4904.  
  4905.      -aga
  4906.  
  4907.      Shortcut for: -hamplanes 8 -maxplanes 8
  4908.  
  4909.      -ham6
  4910.  
  4911.      Shortcut for: -hamplanes 6 -hamforce
  4912.  
  4913.      -ham8
  4914.           Shortcut for: -hamplanes 8 -hamforce
  4915.  
  4916.      -map ppmfile
  4917.           Write a normal ILBM using the colors  in  <ppmfile>  as
  4918.           the  colormap.  The  colormap  file also determines the
  4919.           number of planes, a -maxplanes or -fixplanes option  is
  4920.           ignored.
  4921.  
  4922.      -cmaponly
  4923.           Write a colormap file: only BMHD and  CMAP  chunks,  no
  4924.           BODY chunk, nPlanes = 0.
  4925.  
  4926. 2 Bugs
  4927.      Needs a real colormap selection algorithm for HAM  pictures,
  4928.      instead of using a grayscale colormap.
  4929.  
  4930. 2 References
  4931.      Amiga ROM Kernel Reference Manual - Devices (3rd Ed.)
  4932.      Addison Wesley, ISBN 0-201-56775-X
  4933.  
  4934. 2 See_Also
  4935.      ppm(5), ilbmtoppm(1)
  4936.  
  4937. 2 Authors
  4938.      Copyright (C) 1989 by Jef Poskanzer.
  4939.      Modified August 1993 by Ingo Wilken
  4940.     (Ingo.Wilken@informatik.uni-oldenburg.de)
  4941.  
  4942. 1 ppmtomitsu
  4943.      ppmtomitsu - convert a portable pixmap to a Mitsubishi S340-10 file
  4944.  
  4945. 2 Synopsis
  4946.      ppmtomitsu [-sharpness val] [-enlarge val] [-media string]
  4947.                 [-copy val] [-dpi300] [-tiny] [ppmfile]
  4948.  
  4949. 2 Description
  4950.      Reads a portable pixmap as input and  converts  it  into  a  format
  4951.      suitable  to  be printed by a Mitsubishi S340-10  printer,  or  any
  4952.      other Mitsubishi color sublimation printer.
  4953.  
  4954.      The  Mitsubishi  S340-10  Color  Sublimation printer supports 24bit
  4955.      color.  Images of the available sizes take so long to transfer that
  4956.      there is a  fast  method,  employing a lookuptable, that ppmtomitsu
  4957.      will use if there  is  a  maximum  of  256  colors  in  the pixmap.
  4958.      ppmtomitsu will try to position  your  image  to  the center of the
  4959.      paper, and will rotate your image  for  you if xsize is larger than
  4960.      ysize.  If your image is larger  than  the media allows, ppmtomitsu
  4961.      will quit with an error message.  (We  decided  that the media were
  4962.      too expensive to have careless users produce misprints.) Once  data
  4963.      transmission  has started, the job can't be stopped in a  sane  way
  4964.      without resetting the  printer.    The  printer understands putting
  4965.      together images in the printers memory;  ppmtomitsu doesn't utilize
  4966.      this as pnmcat etc provide  the same functionality and let you view
  4967.      the  result  on-screen, too.  The  S340-10  is  the  lowest  common
  4968.      denominator  printer;  for higher resolution printers  there's  the
  4969.      dpi300 option.  The other printers also support  higher  values for
  4970.      enlarge eg., but I don't think that's essential enough to warrant a
  4971.      change in the program.
  4972.  
  4973.      -sharpness 1-4
  4974.           'sharpness' designation.    Default  is  to  use  the  current
  4975.           sharpness.
  4976.  
  4977.      -enlarge 1-3
  4978.           Enlarge by a factor; Default is 1 (no enlarge)
  4979.  
  4980.      -media A, A4, AS, A4S
  4981.           Designate the media  you're  using.    Default is 1184 x 1350,
  4982.           which will fit on any media.  A  is  1216 x 1350, A4 is 1184 x
  4983.           1452, AS is 1216 x 1650 and A4S is 1184 x 1754.    A  warning:
  4984.           If you specify a  different  media  than the printer currently
  4985.           has, the printer will wait until  you put in the correct media
  4986.           or switch it off.
  4987.  
  4988.      -copy 1-9
  4989.           The number of copies to produce. Default is 1.
  4990.  
  4991.      -dpi300
  4992.           Double the number of allowed pixels for  a S3600-30 Printer in
  4993.           S340-10 compatibility mode.  (The S3600-30 has 300 dpi).
  4994.  
  4995.      -tiny
  4996.           Memory-safing, but always slow.  The printer will get the data
  4997.           line-by-line in 24bit.  It's probably a good idea to  use this
  4998.           if your machine starts paging a lot without this option.
  4999.  
  5000. 2 References
  5001.      Mitsubishi Sublimation Full Color Printer S340-10 Specifications of
  5002.      Parallel Interface LSP-F0232F
  5003.  
  5004. 2 See_Also
  5005.      ppmquant(1), pnmscale(1), ppm(5)
  5006.  
  5007. 2 Bugs
  5008.      We didn't find any - yet.  (Besides, they're called features anyway
  5009.      :-) If you should find one, my email-adress is below.
  5010.  
  5011. 2 Author
  5012.      Copyright (C) 1992, 93  by  S.Petra  Zeidler,  MPIfR Bonn, Germany.
  5013.      (spz@specklec.mpifr-bonn.mpg.de)
  5014.  
  5015. 1 ppmtopcx
  5016.      ppmtopcx - convert a portable pixmap into a PCX file
  5017.  
  5018. 2 Synopsis
  5019.      ppmtopcx [ppmfile]
  5020.  
  5021. 2 Description
  5022.      Reads a portable pixmap as input.  Produces a  PCX  file  as
  5023.      output.
  5024.  
  5025. 2 See_Also
  5026.      pcxtoppm, ppm
  5027.  
  5028. 2 Author
  5029.      Copyright (C) 1990 by Michael Davidson.
  5030.  
  5031. 1 ppmtopgm
  5032.      ppmtopgm - convert a portable pixmap into a portable graymap
  5033.  
  5034. 2 Synopsis
  5035.      ppmtopgm [ppmfile]
  5036.  
  5037. 2 Description
  5038.      Reads a portable pixmap as input.  Produces a portable gray-
  5039.      map  as  output.   The quantization formula used is .299 r +
  5040.      .587 g + .114 b.
  5041.  
  5042.      Note that although there is a pgmtoppm program,  it  is  not
  5043.      necessary  for  simple  conversions from pgm to ppm, because
  5044.      any ppm program can read pgm (and pbm ) files automagically.
  5045.      pgmtoppm  is for colorizing a pgm file.  Also, see ppmtorgb3
  5046.      for a different way of converting color to gray.
  5047.  
  5048. 2 QUOTE
  5049.      Cold-hearted orb that rules the night
  5050.      Removes the colors from our sight
  5051.      Red is gray, and yellow white
  5052.      But we decide which is right
  5053.      And which is a quantization error.
  5054.  
  5055. 2 See_Also
  5056.      pgmtoppm, ppmtorgb3, rgb3toppm, ppm, pgm
  5057.  
  5058. 2 Author
  5059.      Copyright (C) 1989 by Jef Poskanzer.
  5060.  
  5061. 1 ppmtopi1
  5062.      ppmtopi1 - convert a portable pixmap  into  an  Atari  Degas
  5063.      .pi1 file
  5064.  
  5065. 2 Synopsis
  5066.      ppmtopi1 [ppmfile]
  5067.  
  5068. 2 Description
  5069.      Reads a portable pixmap as input.  Produces an  Atari  Degas
  5070.      .pi1 file as output.
  5071.  
  5072. 2 See_Also
  5073.      pi1toppm, ppm, pbmtopi3, pi3topbm
  5074.  
  5075. 2 Author
  5076.      Copyright (C) 1991 by Steve Belczyk (seb3@gte.com)  and  Jef
  5077.      Poskanzer.
  5078.  
  5079. 1 ppmtopict
  5080.      ppmtopict - convert a portable pixmap into a Macintosh  PICT
  5081.      file
  5082.  
  5083. 2 Synopsis
  5084.      ppmtopict [ppmfile]
  5085.  
  5086. 2 Description
  5087.      Reads a portable pixmap as input.  Produces a Macintosh PICT
  5088.      file as output.
  5089.  
  5090.      The generated file is only the data fork of a picture.   You
  5091.      will  need  a program such as mcvert to generate a Macbinary
  5092.      or a BinHex file that contains the necessary information  to
  5093.      identify the file as a PICT file to MacOS.
  5094.  
  5095.      Even though PICT supports 2 and 4 bits per pixel,  ppmtopict
  5096.      always generates an 8 bits per pixel file.
  5097.  
  5098. 2 Bugs
  5099.      The picture size field is only correct if the output is to a
  5100.      file  since  writing  into this field requires seeking back-
  5101.      wards on a file.  However the PICT  documentation  seems  to
  5102.      suggest  that  this field is not critical anyway since it is
  5103.      only the lower 16 bits of the picture size.
  5104.  
  5105. 2 See_Also
  5106.      picttoppm, ppm, mcvert
  5107.  
  5108. 2 Author
  5109.      Copyright (C) 1990 by Ken Yap <ken@cs.rocester.edu>.
  5110.  
  5111. 1 ppmtopj
  5112.      ppmtopj - convert a portable pixmap to an HP PaintJet file
  5113.  
  5114. 2 Synopsis
  5115.      ppmtopj  [-gamma  val]  [-xpos  val]  [-ypos   val]   [-back
  5116.      dark|lite]         [-rle]         [-center]         [-render
  5117.      none|snap|bw|dither|diffuse|monodither|monodiffuse|clusterdither|monoclusterdither]
  5118.      [ppmfile]
  5119.  
  5120. 2 Description
  5121.      Reads a portable pixmap as input and converts it into a for-
  5122.      mat suitable to be printed by an HP PaintJet printer.
  5123.  
  5124.      For best results, the input file should be  in  8-color  RGB
  5125.      form;  i.e. it should have only the 8 binary combinations of
  5126.      full-on and full-off primaries.  You could get this by send-
  5127.      ing  the  input  file  through ppmquant -map with a map file
  5128.      such as:
  5129.          P3
  5130.          8 1
  5131.          255
  5132.          0 0 0      255 0 0    0 255 0    0 0 255
  5133.          255 255 0  255 0 255  0 255 255  255 255 255
  5134.      Or else you could use use ppmdither -red 2 -green 2 -blue
  5135.  
  5136. 2 Options
  5137.      -rle          Run length encode the image.  (This can result
  5138.                    in larger images)
  5139.  
  5140.      -back         Enhance the foreground by  indicating  if  the
  5141.                    background  is  light  or dark compated to the
  5142.                    foreground.
  5143.  
  5144.      -render alg   Use an internal rendering  algorithm  (default
  5145.                    dither).
  5146.  
  5147.      -gamma int    Gamma correct  the  image  using  the  integet
  5148.                    parameter as a gamma (default 0).
  5149.  
  5150.      -center       Center the image to an 8.5 by 11 page
  5151.  
  5152.      -xpos pos     Move by pos pixels in the x direction.
  5153.  
  5154.      -ypos pos     Move by pos pixels in the y direction.
  5155.  
  5156. 2 References
  5157.      HP PaintJet XL Color Graphics Printer User's Guide
  5158.  
  5159. 2 See_Also
  5160.      pnmdepth, ppmquant, ppmdither, ppm
  5161.  
  5162. 2 Bugs
  5163.      Most of the options have not  been  tested  because  of  the
  5164.      price of the paper.
  5165.  
  5166. 2 Author
  5167.      Copyright (C) 1991 by Christos Zoulas.
  5168.  
  5169. 1 ppmtopuzz
  5170.      ppmtopuzz - convert a portable pixmap into an  X11  "puzzle"
  5171.      file
  5172.  
  5173. 2 Synopsis
  5174.      ppmtopuzz [ppmfile]
  5175.  
  5176. 2 Description
  5177.      Reads a portable pixmap as input.  Produces an X11  "puzzle"
  5178.      file  as output.  A "puzzle" file is for use with the puzzle
  5179.      program included with the  X11  distribution  -  puzzle's  -
  5180.      picture flag lets you specify an image file.
  5181.  
  5182. 2 See_Also
  5183.      ppm, puzzle
  5184.  
  5185. 2 Author
  5186.      Copyright (C) 1991 by Jef Poskanzer.
  5187.  
  5188. 1 ppmtorgb3
  5189.      ppmtorgb3 - separate a portable pixmap into  three  portable
  5190.      graymaps
  5191.  
  5192. 2 Synopsis
  5193.      ppmtorgb3 [ppmfile]
  5194.  
  5195. 2 Description
  5196.      Reads a portable pixmap as  input.   Writes  three  portable
  5197.      graymaps as output, one each for red, green, and blue.
  5198.  
  5199.      The output filenames are constructed  by  taking  the  input
  5200.      filename, stripping off any extension, and appending ".red",
  5201.      ".grn", and ".blu".  For example, separating lenna.ppm would
  5202.      result in lenna.red, lenna.grn, and lenna.blu.  If the input
  5203.      comes from stdin, the names are noname.red, noname.grn,  and
  5204.      noname.blu.
  5205.  
  5206. 2 See_Also
  5207.      rgb3toppm, ppmtopgm, pgmtoppm, ppm, pgm
  5208.  
  5209. 2 Author
  5210.      Copyright (C) 1991 by Jef Poskanzer.
  5211.  
  5212. 1 ppmtosixel
  5213.      ppmtosixel - convert a portable pixmap into DEC sixel format
  5214.  
  5215. 2 Synopsis
  5216.      ppmtosixel [-raw] [-margin] [ppmfile]
  5217.  
  5218. 2 Description
  5219.      Reads a portable pixmap as input.  Produces  sixel  commands
  5220.      (SIX)  as  output.  The output is formatted for color print-
  5221.      ing, e.g. for a DEC LJ250 color inkjet printer.
  5222.  
  5223.      If RGB values from the PPM file do not have maxval=100,  the
  5224.      RGB  values  are  rescaled.   A printer control header and a
  5225.      color assignment table begin the SIX file.   Image  data  is
  5226.      written  in  a compressed format by default.  A printer con-
  5227.      trol footer ends the image file.
  5228.  
  5229. 2 Options
  5230.      -raw If specified, each pixel will be  explicitly  described
  5231.           in  the  image  file.  If -raw is not specified, output
  5232.           will default to compressed format  in  which  identical
  5233.           adjacent  pixels  are  replaced  by "repeat pixel" com-
  5234.           mands.  A raw file  is  often  an  order  of  magnitude
  5235.           larger than a compressed file and prints much slower.
  5236.  
  5237.      -margin
  5238.           If -margin is not specified, the image will be start at
  5239.           the  left  margin  (of the window, paper, or whatever).
  5240.           If -margin is specified, a 1.5 inch  left  margin  will
  5241.           offset the image.
  5242.  
  5243. 2 Printing
  5244.      Generally, sixel files must reach  the  printer  unfiltered.
  5245.      Use the lpr -x option or cat filename > /dev/tty0?.
  5246.  
  5247. 2 Bugs
  5248.      Upon rescaling, truncation of the least significant bits  of
  5249.      RGB values may result in poor color conversion.  If the ori-
  5250.      ginal PPM  maxval  was  greater  than  100,  rescaling  also
  5251.      reduces  the  image depth.  While the actual RGB values from
  5252.      the ppm file are more or less retained, the color palette of
  5253.      the  LJ250  may  not  match the colors on your screen.  This
  5254.      seems to be a printer limitation.
  5255.  
  5256. 2 See_Also
  5257.      ppm
  5258.  
  5259. 2 Author
  5260.      Copyright (C) 1991 by Rick Vinci.
  5261.  
  5262. 1 ppmtotga
  5263.      ppmtotga - convert portable pixmap into a  TrueVision  Targa
  5264.      file
  5265.  
  5266. 2 Synopsis
  5267.      ppmtotga [-mono|-cmap|-rgb] [-norle] [ppmfile]
  5268.  
  5269. 2 Description
  5270.      Reads a portable pixmap as  input.   Produces  a  TrueVision
  5271.      Targa file as output.
  5272.  
  5273. 2 Options
  5274.      -mono
  5275.           Forces Targa file to  be  of  type  8  bit  monochrome.
  5276.           Input must be a portable bitmap or a portable graymap.
  5277.  
  5278.      -cmap
  5279.           Forces Targa file to be of  type  24  bit  colormapped.
  5280.           Input  must be a portable bitmap, a portable graymap or
  5281.           a portable pixmap containing no more than 256  distinct
  5282.           colors.
  5283.  
  5284.      -rgb Forces Targa file to be of type 24 bit unmapped color.
  5285.  
  5286.      -norle
  5287.           Disables run-length encoding, in case you have a  Targa
  5288.           reader which can't read run-length encoded files.
  5289.  
  5290.      All flags can be abbreviated to their shortest  unique  pre-
  5291.      fix.   If  no  file  type  is specified the most highly con-
  5292.      stained compatible type is used, where  monochrome  is  more
  5293.      constained than colormapped which is in turn more constained
  5294.      than unmapped.
  5295.  
  5296. 2 Bugs
  5297.      Does not support all  possible  Targa  file  types.   Should
  5298.      really be in PNM, not PPM.
  5299.  
  5300. 2 See_Also
  5301.      tgatoppm, ppm
  5302.  
  5303. 2 Author
  5304.      Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.
  5305.  
  5306. 1 ppmtouil
  5307.      ppmtouil - convert a portable pixmap into a Motif  UIL  icon
  5308.      file
  5309.  
  5310. 2 Synopsis
  5311.      ppmtouil [-name uilname] [ppmfile]
  5312.  
  5313. 2 Description
  5314.      Reads a portable pixmap as input.  Produces a Motif UIL icon
  5315.      file as output.
  5316.  
  5317.      If the program was compiled with an rgb database  specified,
  5318.      and  a RGB value from the ppm input matches a RGB value from
  5319.      the database, then the corresponding color name mnemonic  is
  5320.      printed  in the UIL's colormap.  If no rgb database was com-
  5321.      piled in, or if the RGB values don't match, then  the  color
  5322.      will  be  printed  with  the  #RGB,  #RRGGBB, #RRRGGGBBB, or
  5323.      #RRRRGGGGBBBB hexadecimal format.
  5324.  
  5325. 2 Options
  5326.      -name
  5327.           Allows you  to  specify  the  prefix  string  which  is
  5328.           printed in the resulting UIL output.  If not specified,
  5329.           will default to the filename (without extension) of the
  5330.           ppmfile  argument.   If  -name  is not specified and no
  5331.           ppmfile is specified (i.e.  piped  input),  the  prefix
  5332.           string will default to the string "noname".
  5333.  
  5334.      All flags can be abbreviated to their shortest  unique  pre-
  5335.      fix.
  5336.  
  5337. 2 See_Also
  5338.      ppm
  5339.  
  5340. 2 Author
  5341.      Converted by Jef Poskanzer from ppmtoxpm.c, which  is  Copy-
  5342.      right (C) 1990 by Mark W. Snitily
  5343.  
  5344. 1 ppmtoxpm
  5345.      ppmtoxpm - convert a portable pixmap into an X11 pixmap
  5346.  
  5347. 2 Synopsis
  5348.      ppmtoxpm [-name xpmname] [ppmfile]
  5349.  
  5350. 2 Description
  5351.      Reads a portable pixmap as input.  Produces X11 pixmap (XPM)
  5352.      as output.
  5353.  
  5354.      If the program was compiled with an rgb database  specified,
  5355.      and  a RGB value from the ppm input matches a RGB value from
  5356.      the database, then the corresponding color name mnemonic  is
  5357.      printed  in the XPM's colormap.  If no rgb database was com-
  5358.      piled in, or if the RGB values don't match, then  the  color
  5359.      will  be  printed  with  the  #RGB,  #RRGGBB, #RRRGGGBBB, or
  5360.      #RRRRGGGGBBBB hexadecimal format.
  5361.  
  5362. 2 Options
  5363.      -name
  5364.           Allows you  to  specify  the  prefix  string  which  is
  5365.           printed in the resulting XPM output.  If not specified,
  5366.           will default to the filename (without extension) of the
  5367.           ppmfile  argument.   If  -name  is not specified and no
  5368.           ppmfile is specified (i.e.  piped  input),  the  prefix
  5369.           string will default to the string "noname".
  5370.  
  5371.      All flags can be abbreviated to their shortest  unique  pre-
  5372.      fix.
  5373.  
  5374. 2 Example
  5375.      To     convert     the     file     "dot"     (found      in
  5376.      /usr/include/X11/bitmaps), from xbm to xpm one could specify
  5377.  
  5378.           xbmtopbm dot | ppmtoxpm -name dot
  5379.  
  5380. 2 Bugs
  5381.      An option to match the closest  (rather  than  exact)  color
  5382.      name  mnemonic  from  the  rgb  text  would  be  a desirable
  5383.      enhancement.
  5384.  
  5385.      Truncation of the least significant bits of a RGB value  may
  5386.      result  in  nonexact  matches  when  performing  color  name
  5387.      mnemonic lookups.
  5388.  
  5389. 2 See_Also
  5390.      xpmtoppm, ppm
  5391.  
  5392. 2 Author
  5393.      Copyright (C) 1990 by Mark W. Snitily.
  5394.  
  5395. 1 ppmtoyuv
  5396.      ppmtoyuv - convert a portable pixmap into an Abekas YUV file
  5397.  
  5398. 2 Synopsis
  5399.      ppmtoyuv [ppmfile]
  5400.  
  5401. 2 Description
  5402.      Reads a portable pixmap as input.  Produces  an  Abekas  YUV
  5403.      file as output.
  5404.  
  5405. 2 See_Also
  5406.      yuvtoppm, ppm
  5407.  
  5408. 2 Author
  5409.      Marc Boucher <marc@PostImage.COM>, based on Example  Conver-
  5410.      sion  Program,  A60/A64 Digital Video Interface Manual, page
  5411.      69.
  5412.  
  5413.      Copyright (C) 1991 by DHD PostImage Inc.
  5414.  
  5415.      Copyright (C) 1987 by Abekas Video Systems Inc.
  5416.  
  5417. 1 ppmtoyuvsplit
  5418.      ppmtoyuvsplit - convert a portable pixmap into 3  subsampled
  5419.      raw YUV files
  5420.  
  5421. 2 Synopsis
  5422.      ppmtoyuvsplit basename [ppmfile]
  5423.  
  5424. 2 Description
  5425.      Reads a portable pixmap as  input.   Produces  3  raw  files
  5426.      basename.Y,  basename.U  and  basename.V  as  output.  These
  5427.      files are the subsampled raw YUV representation of the input
  5428.      pixmap,  as required by the Stanford MPEG codec. The subsam-
  5429.      pling is done by arithmetic mean of  4  pixels  colors  into
  5430.      one.  The  YUV  values  are scaled according to CCIR.601, as
  5431.      assumed by MPEG.
  5432.  
  5433. 2 See_Also
  5434.      mpeg, ppm
  5435.  
  5436. 2 Author
  5437.      Copyright (C) 1993 by  Andre  Beck.  (Andreeck@IRS.Inf.TU-
  5438.      Dresden.de)
  5439.  
  5440.      Based on ppmtoyuv.c
  5441.  
  5442. 1 qrttoppm
  5443.      qrttoppm - convert output from the QRT  ray  tracer  into  a
  5444.      portable pixmap
  5445.  
  5446. 2 Synopsis
  5447.      qrttoppm [qrtfile]
  5448.  
  5449. 2 Description
  5450.      Reads a QRT file as input.  Produces a  portable  pixmap  as
  5451.      output.
  5452.  
  5453. 2 See_Also
  5454.      ppm
  5455.  
  5456. 2 Author
  5457.      Copyright (C) 1989 by Jef Poskanzer.
  5458.  
  5459. 1 rawtoppm
  5460.      rawtoppm - convert raw RGB bytes into a portable pixmap
  5461.  
  5462. 2 Synopsis
  5463.      rawtoppm [-headerskip N]  [-rowskip  N]  [-rgb|-rbg|-grb  |-
  5464.      gbr|-brg|-bgr ] [-interpixel|-interrow] width height [image-
  5465.      data]
  5466.  
  5467. 2 Description
  5468.      Reads raw RGB bytes as input.  Produces a portable pixmap as
  5469.      output.   The  input  file  is  just RGB bytes.  You have to
  5470.      specify the width and height on the command line, since  the
  5471.      program  obviously can't get them from the file.  The maxval
  5472.      is assumed to be 255.  If  the  resulting  image  is  upside
  5473.      down, run it through pnmflip -tb .
  5474.  
  5475. 2 Options
  5476.      -headerskip
  5477.           If the file has a header, you can use this flag to skip
  5478.           over it.
  5479.  
  5480.      -rowskip
  5481.           If there is padding at the ends of the  rows,  you  can
  5482.           skip it with this flag.
  5483.  
  5484.      -rgb -rbg -grb -gbr -brg -bgr
  5485.           These flags let you  specify  alternate  color  orders.
  5486.           The default is -rgb.
  5487.  
  5488.      -interpixel -interrow
  5489.           These flags let you specify how the colors  are  inter-
  5490.           leaved.   The  default  is  -interpixel, meaning inter-
  5491.           leaved by pixel.  A byte of red, a byte of green, and a
  5492.           byte  of  blue,  or whatever color order you specified.
  5493.           -interrow means interleaved by row - a row  of  red,  a
  5494.           row  of  green,  a  row  of blue, assuming standard rgb
  5495.           color order.  An -interplane flag  - all the  red  pix-
  5496.           els,  then  all the green, then all the blue - would be
  5497.           an obvious extension,  but  is  not  implemented.   You
  5498.           could  get  the  same effect by splitting the file into
  5499.           three parts (perhaps using dd), turning each part  into
  5500.           a  PGM file with rawtopgm, and then combining them with
  5501.           rgb3toppm.
  5502.  
  5503. 2 See_Also
  5504.      ppm, rawtopgm, rgb3toppm, pnmflip
  5505.  
  5506. 2 Author
  5507.      Copyright (C) 1991 by Jef Poskanzer.
  5508.  
  5509. 1 rgb3toppm
  5510.      rgb3toppm - combine three portable graymaps into  one  port-
  5511.      able pixmap
  5512.  
  5513. 2 Synopsis
  5514.      rgb3toppm redpgmfile greenpgmfile bluepgmfile
  5515.  
  5516. 2 Description
  5517.      Reads three portable graymaps as input.  Combines  them  and
  5518.      produces one portable pixmap as output.
  5519.  
  5520. 2 See_Also
  5521.      ppmtorgb3, pgmtoppm, ppmtopgm, ppm, pgm
  5522.  
  5523. 2 Author
  5524.      Copyright (C) 1991 by Jef Poskanzer.
  5525.  
  5526. 1 sldtoppm
  5527.      sldtoppm - convert an AutoCAD slide  file  into  a  portable
  5528.      pixmap
  5529.  
  5530. 2 Synopsis
  5531.      sldtoppm [-adjust] [-dir] [-height|-ysize s] [-info] [-
  5532.               lib|-Lib name] [-scale s] [-verbose] [-width|-xsize
  5533.               s] [slidefile]
  5534.  
  5535. 2 Description
  5536.      Reads an AutoCAD(Reg.) slide file  and  outputs  a  portable
  5537.      pixmap.   If  no  slidefile is specified, input is read from
  5538.      standard input.  The ppmdraw library is used to convert  the
  5539.      vector  and  polygon information in the slide file to a pix-
  5540.      map; see the file ppmdraw.h for details on this package.
  5541.  
  5542. 2 Options
  5543.      -adjust
  5544.           If the display on which the slide file was created  had
  5545.           non-square  pixels,  when  the  slide is processed with
  5546.           sldtoppm and the -adjust option  is  not  present,  the
  5547.           following warning will appear:
  5548.             Warning - pixels on source screen were non-square.
  5549.             Specifying -adjust will correct image width  to  com-
  5550.             pensate.
  5551.           Specifying the -adjust option causes sldtoppm to  scale
  5552.           the  width of the image so that pixels in the resulting
  5553.           portable pixmap are square (and hence circles appear as
  5554.           true  circles, not ellipses).  The scaling is performed
  5555.           in  the  vector  domain,  before  scan  converting  the
  5556.           objects.   The  results  are,  therefore,  superior  in
  5557.           appearance to what you'd obtain were you to perform the
  5558.           equivalent  scaling  with pnmscale after the bitmap had
  5559.           been created.
  5560.  
  5561.      -dir The input is assumed to be  an  AutoCAD  slide  library
  5562.           file.  A directory listing each slide in the library is
  5563.           printed on standard error.
  5564.  
  5565.      -height size
  5566.           Scales the image in the vector domain  so  it  is  size
  5567.           pixels  in  height.   If  no -width or -xsize option is
  5568.           specified, the width will be adjusted to  preserve  the
  5569.           pixel aspect ratio.
  5570.  
  5571.      -info
  5572.           Dump the slide file header on standard error,  display-
  5573.           ing  the  original  screen  size and aspect ratio among
  5574.           other information.
  5575.  
  5576.      -lib name
  5577.           Extracts the slide with the given name from  the  slide
  5578.           library  given  as  input.   The specified name is con-
  5579.           verted to upper case.
  5580.  
  5581.      -Lib name
  5582.           Extracts the slide with the given name from  the  slide
  5583.           library  given  as  input.  The name is used exactly as
  5584.           specified; it is not converted to upper case.
  5585.  
  5586.      -scale s
  5587.           Scales the image by factor s, which may be any floating
  5588.           point  value  greater than zero.  Scaling is done after
  5589.           aspect ratio adjustment, if any.  Since scaling is per-
  5590.           formed  in the vector domain, before rasterisation, the
  5591.           results look much better than  running  the  output  of
  5592.           sldtoppm through pnmscale.
  5593.  
  5594.      -verbose
  5595.           Dumps the slide file header and lists every vector  and
  5596.           polygon in the file on standard error.
  5597.  
  5598.      -width size
  5599.           Scales the image in the vector domain  so  it  is  size
  5600.           pixels  wide.  If no -height or -ysize option is speci-
  5601.           fied, the height will be adjusted to preserve the pixel
  5602.           aspect ratio.
  5603.  
  5604.      -xsize size
  5605.           Scales the image in the vector domain  so  it  is  size
  5606.           pixels  wide.  If no -height or -ysize option is speci-
  5607.           fied, the height will be adjusted to preserve the pixel
  5608.           aspect ratio.
  5609.  
  5610.      -ysize size
  5611.           Scales the image in the vector domain  so  it  is  size
  5612.           pixels  in  height.   If  no -width or -xsize option is
  5613.           specified, the width will be adjusted to  preserve  the
  5614.           pixel aspect ratio.
  5615.  
  5616.      All flags can be abbreviated to their shortest  unique  pre-
  5617.      fix.
  5618.  
  5619. 2 Bugs
  5620.      Only Level 2 slides are converted.  Level 1 format has  been
  5621.      obsolete  since the advent of AutoCAD Release 9 in 1987, and
  5622.      was not portable across machine architectures.
  5623.  
  5624.      Slide library items with names containing  8  bit  (such  as
  5625.      ISO)  or  16  bit (Kanji, for example) characters may not be
  5626.      found when chosen with the -lib option unless  sldtoppm  has
  5627.      been built with character set conversion functions appropri-
  5628.      ate to the locale.  You  can  always  retrieve  slides  from
  5629.      libraries  regardless of the character set by using the -Lib
  5630.      option and specifying the precise name  of  library  member.
  5631.      Use  the  -dir  option  to  list  the slides in a library if
  5632.      you're unsure of the exact name.
  5633.  
  5634. 2 See_Also
  5635.      AutoCAD Reference Manual: Slide  File  Format,  pnmscale,
  5636.      ppm
  5637.  
  5638. 2 Author
  5639.           John Walker
  5640.           Autodesk SA
  5641.           Avenue des Champs-Montants 14b
  5642.           CH-2074 MARIN
  5643.           Suisse/Schweiz/Svizzera/Svizra/Switzerland
  5644.           Usenet:  kelvin@Autodesk.com
  5645.           Fax:     038/33 88 15
  5646.           Voice:   038/33 76 33
  5647.  
  5648.      Permission  to  use,  copy,  modify,  and  distribute   this
  5649.      software  and  its documentation for any purpose and without
  5650.      fee is hereby granted, without any  conditions  or  restric-
  5651.      tions.   This software is provided ``as is'' without express
  5652.      or implied warranty.
  5653.  
  5654.      AutoCAD and Autodesk are registered trademarks of  Autodesk,
  5655.      Inc.
  5656.  
  5657. 1 spctoppm
  5658.      spctoppm - convert an Atari compressed Spectrum file into  a
  5659.      portable pixmap
  5660.  
  5661. 2 Synopsis
  5662.      spctoppm [spcfile]
  5663.  
  5664. 2 Description
  5665.      Reads an Atari compressed Spectrum file as input.   Produces
  5666.      a portable pixmap as output.
  5667.  
  5668. 2 See_Also
  5669.      sputoppm, ppm
  5670.  
  5671. 2 Author
  5672.      Copyright (C) 1991 by Steve Belczyk (seb3@gte.com)  and  Jef
  5673.      Poskanzer.
  5674.  
  5675. 1 sputoppm
  5676.      sputoppm - convert an Atari uncompressed Spectrum file  into
  5677.      a portable pixmap
  5678.  
  5679. 2 Synopsis
  5680.      sputoppm [spufile]
  5681.  
  5682. 2 Description
  5683.      Reads an Atari uncompressed Spectrum file  as  input.   Pro-
  5684.      duces a portable pixmap as output.
  5685.  
  5686. 2 See_Also
  5687.      spctoppm, ppm
  5688.  
  5689. 2 Author
  5690.      Copyright (C) 1991 by Steve Belczyk (seb3@gte.com)  and  Jef
  5691.      Poskanzer.
  5692.  
  5693. 1 tgatoppm
  5694.      tgatoppm - convert TrueVision Targa  file  into  a  portable
  5695.      pixmap
  5696.  
  5697. 2 Synopsis
  5698.      tgatoppm [-debug] [tgafile]
  5699.  
  5700. 2 Description
  5701.      Reads a TrueVision Targa file as input.  Produces a portable
  5702.      pixmap as output.
  5703.  
  5704. 2 Options
  5705.      -debug
  5706.           Causes the header information to be dumped to stderr.
  5707.  
  5708.      All flags can be abbreviated to their shortest  unique  pre-
  5709.      fix.  Should really be in PNM, not PPM.
  5710.  
  5711. 2 See_Also
  5712.      ppmtotga, ppm
  5713.  
  5714. 2 Author
  5715.      Partially based on tga2rast, version 1.0,  by  Ian  J.  Mac-
  5716.      Phedran.
  5717.  
  5718.      Copyright (C) 1989 by Jef Poskanzer.
  5719.  
  5720. 1 ximtoppm
  5721.      ximtoppm - convert an Xim file into a portable pixmap
  5722.  
  5723. 2 Synopsis
  5724.      ximtoppm [ximfile]
  5725.  
  5726. 2 Description
  5727.      Reads an Xim file as input.  Produces a portable  pixmap  as
  5728.      output.   The Xim toolkit is included in the contrib tree of
  5729.      the X.V11R4 release.
  5730.  
  5731. 2 See_Also
  5732.      ppm
  5733.  
  5734. 2 Author
  5735.      Copyright (C) 1991 by Jef Poskanzer.
  5736.  
  5737. 1 xpmtoppm
  5738.      xpmtoppm - convert an X11 pixmap into a portable pixmap
  5739.  
  5740. 2 Synopsis
  5741.      xpmtoppm [xpmfile]
  5742.  
  5743. 2 Description
  5744.      Reads an X11 pixmap (XPM) as  input.   Produces  a  portable
  5745.      pixmap as output.
  5746.  
  5747. 2 See_Also
  5748.      ppmtoxpm, ppm
  5749.  
  5750. 2 Author
  5751.      Copyright (C) 1991 by Jef Poskanzer.
  5752.  
  5753. 1 yuvtoppm
  5754.      yuvtoppm - convert Abekas YUV bytes into a portable pixmap
  5755.  
  5756. 2 Synopsis
  5757.      yuvtoppm width height [imagedata]
  5758.  
  5759. 2 Description
  5760.      Reads raw Abekas YUV bytes as input.   Produces  a  portable
  5761.      pixmap  as  output.   The input file is just YUV bytes.  You
  5762.      have to specify the width and height on  the  command  line,
  5763.      since  the  program  obviously can't get them from the file.
  5764.      The maxval is assumed to be 255.
  5765.  
  5766. 2 See_Also
  5767.      ppmtoyuv, ppm
  5768.  
  5769. 2 Author
  5770.      Marc Boucher <marc@PostImage.COM>, based on Example  Conver-
  5771.      sion  Program,  A60/A64 Digital Video Interface Manual, page
  5772.      69.
  5773.  
  5774.      Copyright (C) 1991 by DHD PostImage Inc.
  5775.  
  5776.      Copyright (C) 1987 by Abekas Video Systems Inc.
  5777.  
  5778. 1 yuvsplittoppm
  5779.      yuvplittoppm - convert a Y- an U- and a V-file into a  port-
  5780.      able pixmap.
  5781.  
  5782. 2 Synopsis
  5783.      yuvsplittoppm basename width height [-ccir601]
  5784.  
  5785. 2 Description
  5786.      Reads three files, containing the YUV components, as  input.
  5787.      These  files  are  basename .Y,  basename.U and basename.V .
  5788.      Produces a portable pixmap on stdout.
  5789.  
  5790.      Since the YUV files are raw files, the dimensions width  and
  5791.      height must be specified on the command line.
  5792.  
  5793. 2 Options
  5794.      -ccir601
  5795.           Assumes that the  YUV  triplets  are  scaled  into  the
  5796.           smaller  range  of  the CCIR 601 (MPEG) standard. Else,
  5797.           the JFIF (JPEG) standard is assumed.
  5798.  
  5799. 2 See_Also
  5800.      ppmtoyuvsplit, yuvtoppm, ppm
  5801.  
  5802. 2 Author
  5803.      Marcel    Wijkstra    <wijkstra@fwi.uva.nl>,    based     on
  5804.      ppmtoyuvsplit.
  5805.  
  5806. 1 ppmforge
  5807.      ppmforge - fractal forgeries of clouds, planets, and  starry
  5808.      skies
  5809.  
  5810. 2 Synopsis
  5811.      ppmforge [-clouds] [-night] [-dimension dimen] [-hour hour]
  5812.               [-inclination|-tilt angle] [-mesh size] [-power
  5813.               factor] [-glaciers level] [-ice level] [-saturation
  5814.               sat] [-seed seed] [-stars fraction] [-xsize|-width
  5815.               width] [-ysize|-height height]
  5816.  
  5817. 2 Description
  5818.      ppmforge generates three  kinds  of  ``random  fractal  for-
  5819.      geries,'' the term coined by Richard F. Voss of the IBM Tho-
  5820.      mas J. Watson Research Center for seemingly  realistic  pic-
  5821.      tures  of natural objects generated by simple algorithms em-
  5822.      bodying randomness and fractal self-similarity.   The  tech-
  5823.      niques  used  by  ppmforge  are  essentially  those given by
  5824.      Voss[1], particularly the technique  of  spectral  synthesis
  5825.      explained in more detail by Dietmar Saupe[2].
  5826.  
  5827.      The program generates two varieties of pictures: planets and
  5828.      clouds, which are just different renderings of data generat-
  5829.      ed in an identical manner, illustrating  the  unity  of  the
  5830.      fractal  structure of these very different objects.  A third
  5831.      type of picture, a starry sky, is synthesised directly  from
  5832.      pseudorandom numbers.
  5833.  
  5834.      The generation of planets or clouds begins with the prepara-
  5835.      tion  of  an  array  of random data in the frequency domain.
  5836.      The size of this array, the ``mesh size,'' can be  set  with
  5837.      the -mesh option; the larger the mesh the more realistic the
  5838.      pictures but the calculation time and memory requirement in-
  5839.      creases  as the square of the mesh size.  The fractal dimen-
  5840.      sion, which you can  specify  with  the  -dimension  option,
  5841.      determines the roughness of the terrain on the planet or the
  5842.      scale of detail in the clouds.  As the fractal dimension  is
  5843.      increased, more high frequency components are added into the
  5844.      random mesh.
  5845.  
  5846.      Once the mesh  is  generated,  an  inverse  two  dimensional
  5847.      Fourier  transform  is performed upon it.  This converts the
  5848.      original random frequency domain data  into  spatial  ampli-
  5849.      tudes.   We  scale  the real components that result from the
  5850.      Fourier transform into numbers from 0 to 1  associated  with
  5851.      each  point on the mesh.  You can further modify this number
  5852.      by applying a ``power law scale'' to it with the -power  op-
  5853.      tion.    Unity  scale leaves the numbers unmodified; a power
  5854.      scale of 0.5 takes the square root of  the  numbers  in  the
  5855.      mesh,  while  a power scale of 3 replaces the numbers in the
  5856.      mesh with their cubes.  Power law scaling is best envisioned
  5857.      by  thinking  of  the  data as representing the elevation of
  5858.      terrain; powers less than 1 yield landscapes  with  vertical
  5859.      scarps  that  look  like  glacially-carved  valleys;  powers
  5860.      greater than one make  fairy-castle  spires  (which  require
  5861.      large mesh sizes and high resolution for best results).
  5862.  
  5863.      After these calculations, we have a array of  the  specified
  5864.      size containing numbers that range from 0 to 1.  The pixmaps
  5865.      are generated as follows:
  5866.  
  5867.      Clouds    A colour map is created that ranges from pure blue
  5868.                to white by increasing admixture (desaturation) of
  5869.                blue  with  white.   Numbers  less  than  0.5  are
  5870.                coloured  blue,  numbers  between  0.5 and 1.0 are
  5871.                coloured with corresponding levels of white,  with
  5872.                1.0 being pure white.
  5873.  
  5874.      Planet    The mesh is projected onto a sphere.  Values  less
  5875.                than  0.5  are treated as water and values between
  5876.                0.5 and 1.0 as land.  The water areas are coloured
  5877.                based  upon the water depth, and land based on its
  5878.                elevation.  The random  depth  data  are  used  to
  5879.                create  clouds over the oceans.  An atmosphere ap-
  5880.                proximately like the  Earth's  is  simulated;  its
  5881.                light  absorption  is  calculated to create a blue
  5882.                cast around the limb of the  planet.   A  function
  5883.                that  rises from 0 to 1 based on latitude is modu-
  5884.                lated by the local elevation to generate polar ice
  5885.                caps--high   altitude   terrain  carries  glaciers
  5886.                farther from the pole.  Based on the  position  of
  5887.                the  star  with  respect  to the observer, the ap-
  5888.                parent colour of each pixel of the planet is  cal-
  5889.                culated by ray-tracing from the star to the planet
  5890.                to the observer and applying a lighting model that
  5891.                sums  ambient  light  and  diffuse reflection (for
  5892.                most planets ambient light is zero, as their  pri-
  5893.                mary  star  is  the  only source of illumination).
  5894.                Additional random data are used to generate  stars
  5895.                around the planet.
  5896.  
  5897.      Night     A sequence of pseudorandom numbers is used to gen-
  5898.                erate stars with a user specified density.
  5899.  
  5900.      Cloud pictures always contain 256 or fewer colours  and  may
  5901.      be  displayed  on most colour mapped devices without further
  5902.      processing.  Planet pictures often contain tens of thousands
  5903.      of  colours  which  must  be  compressed  with  ppmquant  or
  5904.      ppmdither before encoding in a colour mapped format.  If the
  5905.      display  resolution is high enough, ppmdither generally pro-
  5906.      duces better looking  planets.   ppmquant  tends  to  create
  5907.      discrete colour bands, particularly in the oceans, which are
  5908.      unrealistic and distracting.  The number of colours in star-
  5909.      ry  sky pictures generated with the -night option depends on
  5910.      the value specified for -saturation.  Small values limit the
  5911.      colour  temperature distribution of the stars and reduce the
  5912.      number of colours in the image.  If the -saturation  is  set
  5913.      to  0,  none of the stars will be coloured and the resulting
  5914.      image will never contain more than 256 colours.   Night  sky
  5915.      pictures  with  many  different star colours often look best
  5916.      when colour compressed by pnmdepth rather than  ppmquant  or
  5917.      ppmdither.   Try  newmaxval  settings  of 63, 31, or 15 with
  5918.      pnmdepth to reduce the number of colours in the  picture  to
  5919.      256 or fewer.
  5920.  
  5921. 2 Options
  5922.      -clouds   Generate clouds.  A pixmap of  fractal  clouds  is
  5923.                generated.   Selecting clouds sets the default for
  5924.                fractal dimension to 2.15 and power  scale  factor
  5925.                to 0.75.
  5926.  
  5927.      -dimension dimen
  5928.                Sets the fractal dimension to the specified dimen,
  5929.                which  may  be  any floating point value between 0
  5930.                and 3.   Higher  fractal  dimensions  create  more
  5931.                ``chaotic''  images,  which require higher resolu-
  5932.                tion output and a larger FFT  mesh  size  to  look
  5933.                good.   If  no dimension is specified, 2.4 is used
  5934.                when generating planets and 2.15 for clouds.
  5935.  
  5936.      -glaciers level
  5937.                The floating point level setting controls the  ex-
  5938.                tent  to which terrain elevation causes ice to ap-
  5939.                pear at lower latitudes.   The  default  value  of
  5940.                0.75  makes the polar caps extend toward the equa-
  5941.                tor across high terrain and forms glaciers in  the
  5942.                highest  mountains,  as  on  Earth.  Higher values
  5943.                make ice sheets that cover more and  more  of  the
  5944.                land  surface,  simulating planets in the midst of
  5945.                an ice age.   Lower  values  tend  to  be  boring,
  5946.                resulting in unrealistic geometrically-precise ice
  5947.                cap boundaries.
  5948.  
  5949.      -hour hour
  5950.                When generating a planet,  hour  is  used  as  the
  5951.                ``hour  angle  at  the central meridian.''  If you
  5952.                specify -hour 12, for example, the planet will  be
  5953.                fully  illuminated,  corresponding to high noon at
  5954.                the longitude at the centre of  the  screen.   You
  5955.                can specify any floating point value between 0 and
  5956.                24 for hour, but values which place  most  of  the
  5957.                planet in darkness (0 to 4 and 20 to 24) result in
  5958.                crescents which, while pretty, don't give you many
  5959.                illuminated  pixels  for  the  amount of computing
  5960.                that's required.  If no -hour option is specified,
  5961.                a random hour angle is chosen, biased so that only
  5962.                25% of the images generated will be crescents.
  5963.  
  5964.      -ice level
  5965.                Sets the extent of the polar ice caps to the given
  5966.                floating  point  level.   The default level of 0.4
  5967.                produces ice caps similar to those of  the  Earth.
  5968.                Smaller  values  reduce  the  amount of ice, while
  5969.                larger -ice settings  create  more  prominent  ice
  5970.                caps.   Sufficiently  large values, such as 100 or
  5971.                more, in conjunction with  small  settings  for  -
  5972.                glaciers (try 0.1) create ``ice balls'' like Euro-
  5973.                pa.
  5974.  
  5975.      -inclination|-tilt angle
  5976.                The inclination angle of the planet with regard to
  5977.                its primary star is set to angle, which can be any
  5978.                floating point value from -90 to 90.  The inclina-
  5979.                tion angle can be thought of as specifying, in de-
  5980.                grees, the ``season'' the planet is presently  ex-
  5981.                periencing  or,  more  precisely,  the latitude at
  5982.                which the star transits the zenith at local  noon.
  5983.                If  0,  the  planet  is  at  equinox;  the star is
  5984.                directly overhead at the equator.  Positive values
  5985.                represent summer in the northern hemisphere, nega-
  5986.                tive values summer  in  the  southern  hemisphere.
  5987.                The  Earth's  inclination  angle,  for example, is
  5988.                about  23.5  at  the  June  solstice,  0  at   the
  5989.                equinoxes in March and September, and -23.5 at the
  5990.                December solstice.  If  no  inclination  angle  is
  5991.                specified,  a  random value between -21.6 and 21.6
  5992.                degrees is chosen.
  5993.  
  5994.      -mesh size
  5995.                A mesh of size by size will be used for  the  fast
  5996.                Fourier  transform  (FFT).   Note  that memory re-
  5997.                quirements and computation speed increase  as  the
  5998.                square  of  size; if you double the mesh size, the
  5999.                program will use four times  the  memory  and  run
  6000.                four  times as long.  The default mesh is 256x256,
  6001.                which produces reasonably  good  looking  pictures
  6002.                while  using half a megabyte for the 256x256 array
  6003.                of single precision complex  numbers  required  by
  6004.                the  FFT.  On machines with limited memory capaci-
  6005.                ty, you may have to reduce the mesh size to  avoid
  6006.                running out of RAM.  Increasing the mesh size pro-
  6007.                duces better looking pictures; the difference  be-
  6008.                comes particularly noticeable when generating high
  6009.                resolution images with relatively high fractal di-
  6010.                mensions (between 2.2 and 3).
  6011.  
  6012.      -night    A starry sky is generated.  The stars are  created
  6013.                by the same algorithm used for the stars that sur-
  6014.                round planet pictures, but the output consists ex-
  6015.                clusively of stars.
  6016.  
  6017.      -power factor
  6018.                Sets the ``power factor'' used to scale elevations
  6019.                synthesised  from  the FFT to factor, which can be
  6020.                any floating point number greater than  zero.   If
  6021.                no factor is specified a default of 1.2 is used if
  6022.                a planet is being generated, or 0.75 if clouds are
  6023.                selected by the -clouds option.  The result of the
  6024.                FFT image  synthesis  is  an  array  of  elevation
  6025.                values  between 0 and 1.  A non-unity power factor
  6026.                exponentiates each  of  these  elevations  to  the
  6027.                specified power.  For example, a power factor of 2
  6028.                squares each value, while a power  factor  of  0.5
  6029.                replaces  each  with  its square root.  (Note that
  6030.                exponentiating  values  between  0  and  1  yields
  6031.                values that remain within that range.)  Power fac-
  6032.                tors less than 1 emphasise  large-scale  elevation
  6033.                changes at the expense of small variations.  Power
  6034.                factors greater than 1 increase the  roughness  of
  6035.                the terrain and, like high fractal dimensions, may
  6036.                require a  larger  FFT  mesh  size  and/or  higher
  6037.                screen resolution to look good.
  6038.  
  6039.      -saturation sat
  6040.                Controls the degree of colour  saturation  of  the
  6041.                stars that surround planet pictures and fill star-
  6042.                ry skies created with the -night option.  The  de-
  6043.                fault  value  of  125 creates stars which resemble
  6044.                the sky as seen by the human eye from Earth's sur-
  6045.                face.   Stars are dim; only the brightest activate
  6046.                the cones in the human retina, causing  colour  to
  6047.                be  perceived.   Higher  values of sat approximate
  6048.                the appearance of stars from  Earth  orbit,  where
  6049.                better  dark  adaptation,  absence of skyglow, and
  6050.                the concentration of light from a given star  onto
  6051.                a smaller area of the retina thanks to the lack of
  6052.                atmospheric turbulence enhances the perception  of
  6053.                colour.   Values greater than 250 create ``science
  6054.                fiction'' skies that, while pretty, don't occur in
  6055.                this universe.
  6056.  
  6057.                Thanks to the inverse  square  law  combined  with
  6058.                Nature's  love of mediocrity, there are many, many
  6059.                dim stars for every bright one.   This  population
  6060.                relationship  is accurately reflected in the skies
  6061.                created by ppmforge.  Dim,  low  mass  stars  live
  6062.                much longer than bright massive stars, consequent-
  6063.                ly there are many reddish stars for every blue gi-
  6064.                ant.   This relationship is preserved by ppmforge.
  6065.                You can reverse the proportion, simulating the sky
  6066.                as  seen  in  a  starburst galaxy, by specifying a
  6067.                negative sat value.
  6068.  
  6069.      -seed num Sets the seed for the random number  generator  to
  6070.                the  integer  num.   The  seed used to create each
  6071.                picture is displayed on  standard  output  (unless
  6072.                suppressed with the -quiet option).  Pictures gen-
  6073.                erated with the same seed will be  identical.   If
  6074.                no  -seed is specified, a random seed derived from
  6075.                the date and time will be chosen.   Specifying  an
  6076.                explicit  seed  allows  you to re-render a picture
  6077.                you particularly like at a  higher  resolution  or
  6078.                with different viewing parameters.
  6079.  
  6080.      -stars fraction
  6081.                Specifies the percentage of pixels, in tenths of a
  6082.                percent,  which  will appear as stars, either sur-
  6083.                rounding a planet or filling the entire  frame  if
  6084.                -night is specified.  The default fraction is 100.
  6085.  
  6086.      -xsize|-width width
  6087.                Sets the width of the  generated  image  to  width
  6088.                pixels.   The default width is 256 pixels.  Images
  6089.                must be at least as wide as they are  high;  if  a
  6090.                width  less  than the height is specified, it will
  6091.                be increased to equal the  height.   If  you  must
  6092.                have  a long skinny pixmap, make a square one with
  6093.                ppmforge, then use pnmcut to extract a portion  of
  6094.                the shape and size you require.
  6095.  
  6096.      -ysize|-height height
  6097.                Sets the height of the generated image  to  height
  6098.                pixels.  The default height is 256 pixels.  If the
  6099.                height specified exceeds the width, the width will
  6100.                be increased to equal the height.
  6101.  
  6102.      All flags can be abbreviated to their shortest  unique  pre-
  6103.      fix.
  6104.  
  6105. 2 Bugs
  6106.      The algorithms require the output pixmap to be at  least  as
  6107.      wide  as  it  is high, and the width to be an even number of
  6108.      pixels.  These constraints are enforced  by  increasing  the
  6109.      size of the requested pixmap if necessary.
  6110.  
  6111.      You may have to reduce the FFT mesh size on machines with 16
  6112.      bit integers and segmented pointer architectures.
  6113.  
  6114. 2 See_Also
  6115.      pnmcut, pnmdepth, ppmdither, ppmquant, ppm
  6116.  
  6117.      [1]  Voss, Richard  F.,  ``Random  Fractal  Forgeries,''  in
  6118.           Earnshaw  et.  al., Fundamental Algorithms for Computer
  6119.           Graphics, Berlin: Springer-Verlag, 1985.
  6120.  
  6121.      [2]  Peitgen, H.-O., and Saupe,  D.  eds.,  The  Science  Of
  6122.           Fractal Images, New York: Springer Verlag, 1988.
  6123.  
  6124. 2 Author
  6125.           John Walker
  6126.           Autodesk SA
  6127.           Avenue des Champs-Montants 14b
  6128.           CH-2074 MARIN
  6129.           Suisse/Schweiz/Svizzera/Svizra/Switzerland
  6130.           Usenet:  kelvin@Autodesk.com
  6131.           Fax:     038/33 88 15
  6132.           Voice:   038/33 76 33
  6133.  
  6134.      Permission  to  use,  copy,  modify,  and  distribute   this
  6135.      software  and  its documentation for any purpose and without
  6136.      fee is hereby granted, without any  conditions  or  restric-
  6137.      tions.   This software is provided ``as is'' without express
  6138.      or implied warranty.
  6139.  
  6140.      PLUGWARE! If you like this kind of stuff, you may also enjoy
  6141.      ``James Gleick's Chaos--The Software'' for MS-DOS, available
  6142.      for $59.95 from your local software store or  directly  from
  6143.      Autodesk,  Inc.,  Attn:  Science Series, 2320 Marinship Way,
  6144.      Sausalito, CA 94965, USA.  Telephone: (800)  688-2344  toll-
  6145.      free  or,  outside  the  U.S. (415) 332-2344 Ext 4886.  Fax:
  6146.      (415) 289-4718.  ``Chaos--The  Software''  includes  a  more
  6147.      comprehensive   fractal   forgery  generator  which  creates
  6148.      three-dimensional landscapes as well as clouds and  planets,
  6149.      plus five more modules which explore other aspects of Chaos.
  6150.      The user guide of more than 200 pages includes an  introduc-
  6151.      tion by James Gleick and detailed explanations by Rudy Ruck-
  6152.      er of the mathematics and algorithms used by each program.
  6153.  
  6154. 1 ppmpat
  6155.      ppmpat - make a pretty pixmap
  6156.  
  6157. 2 Synopsis
  6158.      ppmpat   -gingham2|-g2|-gingham3|   -g3|-madras|-tartan|   -
  6159.      poles|-squig|-camo| -anticamo width height
  6160.  
  6161. 2 Description
  6162.      Produces a  portable  pixmap  of  the  specified  width  and
  6163.      height, with a pattern in it.
  6164.  
  6165.      This program is mainly to demonstrate  use  of  the  ppmdraw
  6166.      routines,  a  simple  but powerful drawing library.  See the
  6167.      ppmdraw.h include file for more info  on  using  these  rou-
  6168.      tines.   Still,  some  of the patterns can be rather pretty.
  6169.      If you have  a  color  workstation,  something  like  ppmpat
  6170.      -squig  300  300 | ppmquant 128 should generate a nice back-
  6171.      ground.
  6172.  
  6173. 2 Options
  6174.      The different flags specify various different pattern types:
  6175.  
  6176.      -gingham2
  6177.           A gingham check pattern.  Can be tiled.
  6178.  
  6179.      -gingham3
  6180.           A slightly more complicated gingham.  Can be tiled.
  6181.  
  6182.      -madras
  6183.           A madras plaid.  Can be tiled.
  6184.  
  6185.      -tartan
  6186.           A tartan plaid.  Can be tiled.
  6187.  
  6188.      -poles
  6189.           Color gradients centered on randomly-placed poles.  May
  6190.           need to be run through ppmquant.
  6191.  
  6192.      -squig
  6193.           Squiggley tubular pattern.  Can be tiled.  May need  to
  6194.           be run through ppmquant.
  6195.  
  6196.      -camo
  6197.           Camouflage  pattern.   May  need  to  be  run   through
  6198.           ppmquant.
  6199.  
  6200.      -anticamo
  6201.           Anti-camouflage pattern - like -camo, but  ultra-bright
  6202.           colors.  May need to be run through ppmquant.
  6203.  
  6204.      All flags can be abbreviated to their shortest  unique  pre-
  6205.      fix.
  6206.  
  6207. 2 References
  6208.      Some of the patterns are from "Designer's Guide to Color  3"
  6209.      by Jeanne Allen.
  6210.  
  6211. 2 See_Also
  6212.      pnmtile, ppmquant, ppm
  6213.  
  6214. 2 Author
  6215.      Copyright (C) 1989 by Jef Poskanzer.
  6216.  
  6217. 1 ppmqvga
  6218.      ppmqvga - 8 plane quantization
  6219.  
  6220. 2 Synopsis
  6221.      ppmqvga [ options ] [ input file ]
  6222.  
  6223. 2 Description
  6224.      ppmqvga quantizes PPM  files  to  8  planes,  with  optional
  6225.      Floyd-Steinberg  dithering.   Input  is  a PPM file from the
  6226.      file named, or standard input of no file is provided.
  6227.  
  6228. 2 Options
  6229.      -d dither. Apply Floyd-Steinberg dithering to the data
  6230.  
  6231.      -q quiet. Produces no progress reporting,  and  no  terminal
  6232.      output unless and error occurs.
  6233.  
  6234.      -v verbose. Produces additional output describing the number
  6235.      of  colors found, and some information on the resulting map-
  6236.      ping. May be repeated to generate loads  of  internal  table
  6237.      output, but generally only useful once.
  6238.  
  6239. 2 Examples
  6240.      ppmqvga -d mymage.ppm | ppmtogif >mymage.gif
  6241.  
  6242.      tgatoppm zombie.tga | ppmqvga | ppmtotif > zombie.tif
  6243.  
  6244. 2 See_Also
  6245.      ppmquant
  6246.  
  6247. 2 Diagnostics
  6248.      Error messages if problems, various levels of optional  pro-
  6249.      gress reporting.
  6250.  
  6251. 2 Limitations
  6252.      none known.
  6253.  
  6254. 2 Author
  6255.      Original by Lyle Rains (lrains@netcom.com)  as  ppmq256  and
  6256.      ppmq256fs  combined, documented, and enhanced by Bill David-
  6257.      sen (davidsen@crd.ge.com)
  6258.  
  6259.      Copyright 1991,1992 by Bill Davidsen, all  rights  reserved.
  6260.      The  program  and documentation may be freely distributed by
  6261.      anyone in source or binary format. Please clearly  note  any
  6262.      changes.
  6263.  
  6264. 1 ppmtomap
  6265.      ppmtomap - extract all colors from a portable pixmap
  6266.  
  6267. 2 Synopsis
  6268.      ppmtomap [-sort] [-square] [ppmfile]
  6269.  
  6270. 2 Description
  6271.      Reads a portable pixmap as input.  Produces a portable  pix-
  6272.      map  as  output, representing a color map of the input file.
  6273.      All N different colors found are put in an Nx1 portable pix-
  6274.      map.   This  color  map  file  can  be used as a mapfile for
  6275.      ppmquant or ppmtogif.
  6276.  
  6277. 2 Options
  6278.      -sort
  6279.           Produces a portable pixmap  with  the  colors  in  some
  6280.           sorted order.
  6281.  
  6282.      -square
  6283.           Produces a (more or less) square output  file,  instead
  6284.           of putting all colors on the top row.
  6285.  
  6286.      All flags can be abbreviated to their shortest  unique  pre-
  6287.      fix.
  6288.  
  6289. 2 WARNING
  6290.      If you want to use the output file as a mapfile  for  ppmto-
  6291.      gif,  you first have to do a ppmquant 256, since ppmtomap is
  6292.      not limited to 256 colors (but to 65536).
  6293.  
  6294. 2 See_Also
  6295.      ppmtogif, ppmquant, ppm
  6296.  
  6297. 2 Author
  6298.      Marcel Wijkstra (wijkstra@fwi.uva.nl).
  6299.  
  6300.      Copyright (C) 1989 by Jef Poskanzer.
  6301.  
  6302. 1 ppmtopjxl
  6303.      ppmtopjxl - convert a portable pixmap into an HP PaintJet XL
  6304.      PCL file
  6305.  
  6306. 2 Synopsis
  6307.      ppmtopjxl [-nopack] [-gamma <n>  ]  [-presentation]  [-dark]
  6308.      [-diffuse]  [-cluster] [-dither] [-xshift <s> ] [-yshift <s>
  6309.      ] [-xshift <s> ] [-yshift <s> ] [-xsize|-width|-xscale <s> ]
  6310.      [-ysize|-height|-yscale <s> ] [ppmfile]
  6311.  
  6312.  
  6313. 2 Description
  6314.      Reads a portable pixmap as input.  Produces a PCL file suit-
  6315.      able for printing on an HP PaintJet XL printer as output.
  6316.  
  6317.      The generated file is not suitable for printing on a  normal
  6318.      PrintJet printer.  The -nopack option generates a file which
  6319.      does not use the normal TIFF 4.0  compression  method.  This
  6320.      file might be printable on a normal PaintJet printer (not an
  6321.      XL).
  6322.  
  6323.      The -gamma option sets the gamma correction for  the  image.
  6324.      The useful range for the PaintJet XL is approximately 0.6 to
  6325.      1.5.
  6326.  
  6327.      The rendering algorithm used for images can be altered  with
  6328.      the  -dither,  -cluster, and -diffuse options. These options
  6329.      select ordered dithering, clustered  ordered  dithering,  or
  6330.      error  diffusion respectively.  The -dark option can be used
  6331.      to enhance images with  a  dark  background  when  they  are
  6332.      reduced  in size.  The -presentation option turns on presen-
  6333.      tation mode, in which two passes are made over the paper  to
  6334.      increase  ink  density.  This should be used only for images
  6335.      where quality is critical.
  6336.  
  6337.  
  6338.      The image can be resized by setting the  -xsize  and  -ysize
  6339.      options.  The parameter to either of these options is inter-
  6340.      preted as the number of dots to set the width or height  to,
  6341.      but  an  optional  dimension  of  `pt' (points), `dp' (deci-
  6342.      points),  `in'  (inches),  or  `cm'  (centimetres)  may   be
  6343.      appended.   If  only  one  dimension is specified, the other
  6344.      will be scaled appropriately.
  6345.  
  6346.      The options -width and -height are synonyms  of  -xsize  and
  6347.      -ysize.
  6348.  
  6349.      The -xscale and -yscale options can alternatively be used to
  6350.      scale the image by a simple factor.
  6351.  
  6352.      The image can be shifted on the page by  using  the  -xshift
  6353.      and  -yshift  options.  These  move  the image the specified
  6354.      dimensions right and down.
  6355.  
  6356.  
  6357. 2 See_Also
  6358.      ppm
  6359.  
  6360. 2 Author
  6361.      Angus Duggan
  6362.  
  6363. 1 libppm
  6364.      libppm - functions to support portable pixmap programs
  6365.  
  6366. 2 Synopsis
  6367.      #include <ppm.h>
  6368.      cc ... libppm.a libpgm.a libpbm.a
  6369.  
  6370.  
  6371. 2 Description
  6372.   TYPES AND CONSTANTS
  6373.      typedef ... pixel;
  6374.      typedef ... pixval;
  6375.      #define PPM_MAXMAXVAL ...
  6376.      extern pixval ppm_pbmmaxval;
  6377.  
  6378.      Each pixel contains three pixvals, each of which should con-
  6379.      tain   only   the   values   between  0  and  PPM_MAXMAXVAL.
  6380.      ppm_pbmmaxval is the maxval used when a PPM program reads  a
  6381.      PBM  file.   Normally it is 1; however, for some programs, a
  6382.      larger value gives better results.
  6383.  
  6384.      #define PPM_FORMAT ...
  6385.      #define RPPM_FORMAT ...
  6386.      #define PPM_TYPE PPM_FORMAT
  6387.      int PPM_FORMAT_TYPE( int format )
  6388.  
  6389.      For distinguishing different file formats and types.
  6390.  
  6391.      pixval PPM_GETR( pixel p )
  6392.      pixval PPM_GETG( pixel p )
  6393.      pixval PPM_GETB( pixel p )
  6394.  
  6395.      These three macros retrieve the red,  green  or  blue  value
  6396.      from the given pixel.
  6397.  
  6398.      void PPM_ASSIGN( pixel p, pixval red, pixval grn, pixval blu )
  6399.  
  6400.      This macro assigns the given red, green and blue  values  to
  6401.      the pixel.
  6402.  
  6403.      int PPM_EQUAL( pixel p, pixel q )
  6404.  
  6405.      This macro checks two pixels for equality.
  6406.  
  6407.      void PPM_DEPTH( pixel newp, pixel p, pixval oldmaxval, pixval newmaxval )
  6408.  
  6409.      This macro scales the colors of pixel p  according  the  old
  6410.      and  new  maximum values and assigns the new values to newp.
  6411.      It is intended to make writing ppmtowhatever easier.
  6412.  
  6413.      float PPM_LUMIN( pixel p )
  6414.      This macro determines the luminance of the pixel p.
  6415.  
  6416.   MEMORY MANAGEMENT
  6417.      pixel** ppm_allocarray( int cols, int rows )
  6418.  
  6419.      Allocate an array of pixels.
  6420.  
  6421.      pixel* ppm_allocrow( int cols )
  6422.  
  6423.      Allocate a row of the given number of pixels.
  6424.  
  6425.      void ppm_freearray( pixel** pixels, int rows )
  6426.  
  6427.      Free the array allocated  with  ppm_allocarray()  containing
  6428.      the given number of rows.
  6429.  
  6430.      void pbm_freerow( pixel* pixelrow )
  6431.  
  6432.      Free a row of pixels.
  6433.  
  6434.   READING PBM FILES
  6435.      void ppm_readppminit( FILE* fp, int* colsP, int* rowsP, pixval* maxvalP, int* formatP )
  6436.  
  6437.      Read the header from a PPM file, filling in the rows,  cols,
  6438.      maxval and format variables.
  6439.  
  6440.      void ppm_readppmrow( FILE* fp, pixel* pixelrow, int cols, pixval maxval, int format )
  6441.  
  6442.      Read a row of pixels into the pixelrow array.  Format, cols,
  6443.      and maxval were filled in by ppm_readppminit().
  6444.  
  6445.      pixel** ppm_readppm( FILE* fp, int* colsP, int* rowsP, pixval* maxvalP )
  6446.  
  6447.      Read an entire pixmap file into memory, returning the  allo-
  6448.      cated  array  and filling in the rows, cols and maxval vari-
  6449.      ables.    This    function    combines    ppm_readppminit(),
  6450.      ppm_allocarray() and ppm_readppmrow().
  6451.  
  6452.   WRITING FILES
  6453.      void ppm_writeppminit( FILE* fp, int cols, int rows, pixval maxval, int forceplain )
  6454.  
  6455.      Write the header for a portable pixmap file.  The forceplain
  6456.      flag forces a plain-format file to be written, as opposed to
  6457.      a raw-format one.
  6458.  
  6459.      void ppm_writeppmrow( FILE* fp, pixel* pixelrow, int cols, pixval maxval, int forceplain )
  6460.  
  6461.      Write a row from a portable pixmap.
  6462.  
  6463.      void ppm_writeppm( FILE* fp, pixel** pixels, int cols, int rows, pixval maxval, int forceplain )
  6464.  
  6465.      Write the header and all data for a portable  pixmap.   This
  6466.      function combines ppm_writeppminit() and ppm_writeppmrow().
  6467.  
  6468.   COLOR NAMES
  6469.      pixel ppm_parsecolor( char* colorname, pixval maxval )
  6470.  
  6471.      Parses an ASCII color name into a pixel.  The color  can  be
  6472.      specified  in  three  ways.  One, as a name, assuming that a
  6473.      pointer to an X11-style color names file  was  compiled  in.
  6474.      Two,  as  an  X11-style  hexadecimal  number: #rgb, #rrggbb,
  6475.      #rrrgggbbb,  or  #rrrrggggbbbb.   Three,  as  a  triplet  of
  6476.      decimal   floating   point   numbers  separated  by  commas:
  6477.      r.r,g.g,b.b.
  6478.  
  6479.      char* ppm_colorname( pixel* colorP, pixval maxval, int hexok )
  6480.  
  6481.      Returns a pointer to a string describing  the  given  color.
  6482.      If  the  X11  color  names  file  is available and the color
  6483.      appears in it, that name is  returned.   Otherwise,  if  the
  6484.      hexok flag is true then a hexadecimal colorspec is returned;
  6485.      if hexok is false and the X11 color names file is available,
  6486.      then the closest matching color is returned; otherwise, it's
  6487.      an error.
  6488.  
  6489. 2 See_Also
  6490.      pbm, pgm
  6491.  
  6492. 2 Author
  6493.      Copyright (C) 1989, 1991 by Tony Hansen and Jef Poskanzer.
  6494.  
  6495. 1 ppm
  6496.      ppm - portable pixmap file format
  6497.  
  6498. 2 Description
  6499.      The portable pixmap format is a  lowest  common  denominator
  6500.      color image file format.  The definition is as follows:
  6501.  
  6502.      - A "magic number" for identifying the  file  type.   A  ppm
  6503.        file's magic number is the two characters "P3".
  6504.  
  6505.      - Whitespace (blanks, TABs, CRs, LFs).
  6506.  
  6507.      - A width, formatted as ASCII characters in decimal.
  6508.  
  6509.      - Whitespace.
  6510.  
  6511.      - A height, again in ASCII decimal.
  6512.  
  6513.      - Whitespace.
  6514.  
  6515.      - The maximum color-component value, again in ASCII decimal.
  6516.  
  6517.      - Whitespace.
  6518.  
  6519.      - Width * height pixels, each  three  ASCII  decimal  values
  6520.        between 0 and the specified maximum value, starting at the
  6521.        top-left  corner  of  the  pixmap,  proceeding  in  normal
  6522.        English  reading  order.   The three values for each pixel
  6523.        represent red, green, and blue, respectively; a value of 0
  6524.        means  that color is off, and the maximum value means that
  6525.        color is maxxed out.
  6526.  
  6527.      - Characters from a "#" to the next end-of-line are  ignored
  6528.        (comments).
  6529.  
  6530.      - No line should be longer than 70 characters.
  6531.  
  6532.      Here is an example of a small pixmap in this format:
  6533.      P3
  6534.      # feep.ppm
  6535.      4 4
  6536.      15
  6537.       0  0  0    0  0  0    0  0  0   15  0 15
  6538.       0  0  0    0 15  7    0  0  0    0  0  0
  6539.       0  0  0    0  0  0    0 15  7    0  0  0
  6540.      15  0 15    0  0  0    0  0  0    0  0  0
  6541.  
  6542.      Programs that read this format should be as lenient as  pos-
  6543.      sible, accepting anything that looks remotely like a pixmap.
  6544.  
  6545.      There is also a variant on the format, available by  setting
  6546.      the  RAWBITS  option  at  compile  time.   This  variant  is
  6547.      different in the following ways:
  6548.  
  6549.      - The "magic number" is "P6" instead of "P3".
  6550.  
  6551.      - The pixel values are stored as  plain  bytes,  instead  of
  6552.        ASCII decimal.
  6553.  
  6554.      - Whitespace is not allowed in the pixels area, and  only  a
  6555.        single  character  of  whitespace (typically a newline) is
  6556.        allowed after the maxval.
  6557.  
  6558.      - The files are smaller and many times faster  to  read  and
  6559.        write.
  6560.  
  6561.      Note that this raw format can only be used for maxvals  less
  6562.      than or equal to 255.  If you use the ppm library and try to
  6563.      write a file with a larger  maxval,  it  will  automatically
  6564.      fall back on the slower but more general plain format.
  6565.  
  6566. 2 See_Also
  6567.      giftopnm, gouldtoppm, ilbmtoppm, imgtoppm, mtvtoppm, pcxtoppm,
  6568.      pgmtoppm, pi1toppm, picttoppm, pjtoppm, qrttoppm, rawtoppm,
  6569.      rgb3toppm, sldtoppm, spctoppm, sputoppm, tgatoppm, ximtoppm,
  6570.      xpmtoppm, yuvtoppm, ppmtoacad, ppmtogif, ppmtoicr, ppmtoilbm,
  6571.      ppmtopcx, ppmtopgm, ppmtopi1, ppmtopict, ppmtopj, ppmtopuzz,
  6572.      ppmtorgb3, ppmtosixel, ppmtotga, ppmtouil, ppmtoxpm, ppmtoyuv,
  6573.      ppmdither, ppmforge, ppmhist, ppmmake, ppmpat, ppmquant,
  6574.      ppmquantall, ppmrelief, pnm, pgm, pbm
  6575.  
  6576. 2 Author
  6577.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  6578.  
  6579. 1 pgmkernel
  6580.         pgmkernel - generate a convolution kernel
  6581.  
  6582. 2 Synopis
  6583.         pgmkernel [-weight w] width [height]
  6584.  
  6585. 2 Description
  6586.         Generates a portable graymap array of size width x height  (or
  6587.     width  x  width  if  height  is  not  specified) to be used  as  a
  6588.     convolution file  by pnmconvol.  The data in the convolution array
  6589.     K are computed according to the formula:
  6590.  
  6591.     K(i,j) = 1 / ( 1 + w * sqrt((i-width/2)\^{}2 + (j-height/2)\^{}2)) 
  6592.  
  6593.     where w is a coefficient specified via the -weight flag, and width
  6594.     and height are the X and Y filter sizes.
  6595.  
  6596.         The output PGM file is always written out in ASCII format.
  6597.  
  6598. 2 Options
  6599.         The optional -weight flag should be a real number greater than
  6600.     -1.  The default value is 6.0.
  6601.  
  6602. 2 Bugs
  6603.         The computation time is proportional  to width * height.  This
  6604.     increases rapidly with the increase of  the kernel size.  A better
  6605.     approach could be using a FFT in these cases.
  6606.  
  6607. 2 See_Also
  6608.         pnmconvol(1), pnmsmooth(1)
  6609.  
  6610. 2 Author
  6611.         Alberto Accomazzi (alberto@cfa.harvard.edu).
  6612.  
  6613. 1 fitstopnm
  6614.         fitstopnm - convert a FITS file into a portable anymap
  6615.  
  6616. 2 Synopis
  6617.         fitstopnm [-image N] [-noraw] [-scanmax] [-printmax] [-min f]
  6618.                   [-max f] [FITSfile]
  6619.  
  6620. 2 Description
  6621.         Reads a FITS file as input.  Produces a portable pixmap if the
  6622.     FITS file consists of 3 image planes (NAXIS = 3 and NAXIS3 = 3), a
  6623.     portable  graymap  if  the  FITS file consists of 2  image  planes
  6624.     (NAXIS  =  2),  or  whenever  the -image flag is specified.    The
  6625.     results may need to be flipped top for bottom;  if  so,  just pipe
  6626.     the output through pnmflip -tb.
  6627.  
  6628. 2 Options
  6629.         The  -image  option  is  for  FITS files with three axes.  The
  6630.     assumption is that the third axis is for multiple images, and this
  6631.     option lets you select which one you want.
  6632.  
  6633.         Flags -min and  -max  can  be used to override the min and max
  6634.     values as read from  the  FITS  header  or  the  image  data if no
  6635.     DATAMIN and DATAMAX keywords are found.  Flag -scanmax can be used
  6636.     to  force the program to scan  the  data  even  when  DATAMIN  and
  6637.     DATAMAX are found in the header.   If  -printmax is specified, the
  6638.     program will just print the min and max  values  and  quit.   Flag
  6639.     -noraw  can  be  used  to force the program to  produce  an  ASCII
  6640.     portable anymap.
  6641.  
  6642.         The  program  will tell what kind of anymap is writing.    All
  6643.     flags can be abbreviated to their shortest unique prefix.
  6644.  
  6645. 2 References
  6646.         FITS stands for  Flexible  Image  Transport  System.    A full
  6647.     description can be found  in  Astronomy  & Astrophysics Supplement
  6648.     Series 44 (1981), page 363.
  6649.  
  6650. 2 See_Also
  6651.         pnmtofits(1), pgm(5), pnmflip(1)
  6652.  
  6653. 2 Author
  6654.         Copyright (C) 1989 by Jef  Poskanzer,  with  modifications  by
  6655.     Daniel    Briggs    (dbriggs@nrao.edu)    and   Alberto  Accomazzi
  6656.     (alberto@cfa.harvard.edu).
  6657.  
  6658. 1 pnmalias
  6659.         pnmalias - antialias a portable anyumap.
  6660.  
  6661. 2 Synopis
  6662.         pnmalias  [-bgcolor  color] [-fgcolor color] [-bonly] [-fonly]
  6663.                   [-balias] [-falias] [-weight w] [pnmfile]
  6664.  
  6665. 2 Description
  6666.         Reads a portable anymap as input, and applies anti-aliasing to
  6667.     background and foreground pixels.  If the input file is a portable
  6668.     bitmap,  the  output  anti-aliased image is promoted to a graymap,
  6669.     and  a  message  is  printed  informing the user of the change  in
  6670.     format.
  6671.  
  6672. 2 Options
  6673.         -bgcolor colorb,
  6674.         -fgcolor colorf
  6675.         set the  background  color  to  colorb,  and the foreground to
  6676.     color to colorf.    Pixels with these values will be anti-aliased.
  6677.     by  default, the background  color  is  taken  to  be  black,  and
  6678.     foreground color is assumed to  be  white.    The  colors  can  be
  6679.     specified in five ways:
  6680.  
  6681.             o A name,  assuming  that  a pointer to an X11-style color
  6682.             names file was compiled in.
  6683.  
  6684.             o An X11-style hexadecimal  specifier:  rgb:r/g/b, where r
  6685.             g and b are each 1- to 4-digit hexadecimal numbers.
  6686.  
  6687.             o An X11-style decimal specifier:    rgbi:r/g/b, where r g
  6688.             and b are floating point numbers between 0 and 1.
  6689.  
  6690.             o    For    backwards    compatibility,  an  old-X11-style
  6691.             hexadecimal    number:    #rgb,  #rrggbb,  #rrrgggbbb,  or
  6692.             #rrrrggggbbbb.
  6693.  
  6694.             o  For  backwards  compatibility,  a  triplet  of  numbers
  6695.             separated by commas:   r,g,b, where r g and b are floating
  6696.             point numbers between 0  and  1.    (This  style was added
  6697.             before MIT came up with the similar rgbi style.)
  6698.  
  6699.         Note  that  even when dealing with  graymaps,  background  and
  6700.     foreground colors need to be specified in  the  fashion  described
  6701.     above.  In this case, background and foreground  pixel  values are
  6702.     taken to be the value of the red component for the given color.
  6703.  
  6704.         -bonly,
  6705.         -fonly
  6706.         Apply anti-aliasing only to background (-bonly), or foreground
  6707.     (-fonly) pixels.
  6708.  
  6709.         -balias,
  6710.         -falias 
  6711.         Apply  anti-aliasing  to  all  pixels  surrounding  background
  6712.     (-balias),  or  foreground    (-falias)    pixels.    By  default,
  6713.     anti-aliasing takes place only  among  neighboring  background and
  6714.     foreground pixels.
  6715.  
  6716.         -weight w
  6717.         Use w as the central  weight  for the aliasing filter.  W must
  6718.     be a real number in the range 0 < w < 1.  The lower the value of w
  6719.     is, the "blurrier" the output image is.  The default is w = 1/3.
  6720.  
  6721. 2 See_Also
  6722.         pbmtext(1), pnmsmooth(1), pnm(5)
  6723.  
  6724. 2 Author
  6725.         Copyright    (C)    1992  by  Alberto  Accomazzi,  Smithsonian
  6726.     Astrophysical Observatory.
  6727.  
  6728. 1 pnmtofits
  6729.         pnmtofits - convert a portable anymap into FITS format
  6730.  
  6731. 2 Synopis
  6732.         pnmtofits [-max f] [-min f] [pnmfile]
  6733.  
  6734. 2 Description
  6735.         Reads a portable anymap as input.  Produces  a  FITS (Flexible
  6736.     Image  Transport  System) file as output.  The resolution  of  the
  6737.     output file is either 8 bits/pixel, or 16 bits/pixel, depending on
  6738.     the value of maxval in the input file.  If the  input  file  is  a
  6739.     portable bitmap or a portable graymap, the output file consists of
  6740.     a single plane image (NAXIS = 2).   If instead the input file is a
  6741.     portable  pixmap,  the output file will consist of  a  three-plane
  6742.     image (NAXIS = 3, NAXIS3 = 3).  A  full  description  of  the FITS
  6743.     format  can be found in Astronomy & Astrophysics Supplement Series
  6744.     44 (1981), page 363.
  6745.  
  6746. 2 Options
  6747.         Flags  -min  and  -max  can  be  used to set DATAMAX, DATAMIN,
  6748.     BSCALE and BZERO in the FITS header, but do not cause the  data to
  6749.     be rescaled.
  6750.  
  6751. 2 See_Also
  6752.         fitstopnm(1), pgm(5)
  6753.  
  6754. 2 Author
  6755.         Copyright (C) 1989 by Wilson  H.    Bent  (whb@hoh-2.att.com),
  6756.     with modifications by Alberto Accomazzi (alberto@cfa.harvard.edu).
  6757.  
  6758. 1 ppmchange
  6759.         ppmchange -  change  all  pixels  of one color to another in a
  6760.     portable pixmap
  6761.  
  6762. 2 Synopis
  6763.         ppmchange oldcolor newcolor [...] [ppmfile]
  6764.  
  6765. 2 Description
  6766.         Reads  a portable pixmap as input.    Changes  all  pixels  of
  6767.     oldcolor to newcolor, leaving all others unchanged.    Up  to  256
  6768.     colors  may  be replaced by specifying couples of  colors  on  the
  6769.     command line.  
  6770.  
  6771.         The colors can be specified in five ways:
  6772.  
  6773.             o A name, assuming that a  pointer  to  an X11-style color
  6774.             names file was compiled in.
  6775.  
  6776.             o An X11-style hexadecimal specifier:  rgb:r/g/b,  where r
  6777.             g and b are each 1- to 4-digit hexadecimal numbers.
  6778.  
  6779.             o An X11-style decimal specifier:  rgbi:r/g/b, where  r  g
  6780.             and b are floating point numbers between 0 and 1.
  6781.  
  6782.             o    For    backwards  compatibility,  an    old-X11-style
  6783.             hexadecimal  number:    #rgb,  #rrggbb,  #rrrgggbbb,    or
  6784.             #rrrrggggbbbb.
  6785.  
  6786.             o  For  backwards  compatibility,  a  triplet  of  numbers
  6787.             separated by commas:  r,g,b, where r g  and b are floating
  6788.             point  numbers  between  0 and 1.  (This style  was  added
  6789.             before MIT came up with the similar rgbi style.)
  6790.  
  6791. 2 See_Also
  6792.         pgmtoppm(1), ppm(5)
  6793.  
  6794. 2 Author
  6795.         Wilson  H.    Bent.   Jr.  (whb@usc.edu) with modifications by
  6796.     Alberto Accomazzi (alberto@cfa.harvard.edu)
  6797.  
  6798. 1 xvminitoppm
  6799.         xvminitoppm - convert a XV "thumbnail" picture to PPM
  6800.  
  6801. 2 Synopis
  6802.         xvminitoppm [xvminipic]
  6803.  
  6804. 2 Description
  6805.         Reads a  XV "thumbnail" picture (a miniature picture generated
  6806.     by the "VisualSchnauzer"  browser)  as input.  Produces a portable
  6807.     pixmap as output.
  6808.  
  6809. 2 See_Also
  6810.         ppm(5), xv(1)
  6811.  
  6812. 2 Author
  6813.         Copyright (C) 1993 by Ingo Wilken
  6814.  
  6815.