home *** CD-ROM | disk | FTP | other *** search
- COMMAND LINE MANUAL PAGES
- =========================
- These pages provide a description of each of the implemented menu options.
-
- Each manual page is headed by the PBMtk menu entry, followed by the original
- PBMPlus (Unix version) description of the command line invocation of each
- function. The PBMtk dialog boxes allow for most, if not all, of the possible
- options that are provided for by the command line.
-
- Note that each of the PBMPlus functions that have been incorporated into
- PBMtk can be invoked from the command line using the syntax provided in
- these manual pages. The binary executables for each of the functions are
- in the directory !PBMtk.bin. (Do not remove these binaries from this
- directory. They are required by PBMtk).
-
- PBMPlus functions are designed to operate with defaults if no option is
- provided by the user. In addition the functions are designed to accept input
- from stdin and from Unix pipes, and the output to be written to stdout. As a
- result the command synopsis never includes a requirement for an output
- filename, and where only one input file is required it is optional. The
- command line cannot be operated this way in RISC OS and it will always be
- necessary to provide input filenames on the command line and redirect the
- output to a file if it is to be captured. Options other than filenames can
- be ignored if the defaults are acceptable.
-
- The following examples serve to illustrate the above;
-
- Unix Command line description:
-
- fredtoppm [ -long | -short] [ fredfile] (default is short)
-
- RISC OS Command line use:
-
- fredtoppm fred > fredppm
-
- (where short is OK, and the input fredfile is 'fred' and the output file is
- 'fredppm')
-
- fredtoppm long fred > fredppm
-
- (where the long option is required)
-
- Conventions
-
- options are enclosed in brackets [] are optional. Alternatives are separated
- by a |. Parameters not enclosed by brackets are required.
-
-
- =============================================================================
-
- Readin -> YUVtoPPM
- ==================
-
- NAME
-
- yuvtoppm - convert Abekas YUV bytes into a portable pixmap
-
- SYNOPSIS
-
- yuvtoppm width height [ imagedata ]
-
-
- DESCRIPTION
-
- Reads raw Abekas YUV bytes as input. Produces a portable pixmap as output.
- The input file is just YUV bytes.
- You have to specify the width and height on the command line, since the
- program obviously can't get them from the file. The maxval is assumed to be
- 255.
-
- "SEE ALSO"
-
- ppmtoyuv(1), ppm(5)
-
- AUTHOR
-
- Marc Boucher <marc@PostImage.COM>,
- based on Example Conversion Program, A60/A64 Digital Video Interface
- Manual, page 69.
-
- Copyright (C) 1991 by DHD PostImage Inc.
-
- Copyright (C) 1987 by Abekas Video Systems Inc.
-
- ***************************************************************************
-
- Writeout -> PPMtoYUV
- ====================
-
- NAME
-
- ppmtoyuv - convert a portable pixmap into an Abekas YUV file
-
- SYNOPSIS
-
- ppmtoyuv [ ppmfile ]
-
- DESCRIPTION
-
- Reads a portable pixmap as input.
- Produces an Abekas YUV file as output.
-
- "SEE ALSO"
-
- yuvtoppm(1), ppm(5)
-
- AUTHOR
-
- Marc Boucher <marc@PostImage.COM>,
- based on Example Conversion Program, A60/A64 Digital Video Interface
- Manual, page 69.
-
- Copyright (C) 1991 by DHD PostImage Inc.
-
- Copyright (C) 1987 by Abekas Video Systems Inc.
-
- ***************************************************************************
-
- PBM -> Make
- ===========
-
- NAME
-
- pbmmake - create a blank bitmap of a specified size
-
- SYNOPSIS
-
- pbmmake [ -white | -black | -gray] width height
-
- DESCRIPTION
-
- Produces a portable bitmap of the specified width and height.
- The color defaults to white.
-
- OPTIONS
-
- In addition to the usual -white and -black , this program implements -gray.
- This gives a simple 50% gray pattern with 1's and 0's alternating.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- "SEE ALSO"
-
- pbm(5), ppmmake(1)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
-
- ***************************************************************************
- PGM -> Crater
- =============
-
- NAME
-
- pgmcrater - create cratered terrain by fractal forgery
-
- SYNOPSIS
-
-
- pgmcrater [ -number n ] [ -height | -ysize s ] [ -width | -xsize s ]
- [ -gamma g ]
-
- DESCRIPTION
-
- pgmcrater creates a portable graymap which mimics cratered terrain. The
- graymap is created by simulating the impact of a given number of craters
- with random position and size, then rendering the resulting terrain
- elevations based on a light source shining from one side of the screen. The
- size distribution of the craters is based on a power law which results in
- many more small craters than large ones. The number of craters of a given
- size varies as the reciprocal of the area as described on pages 31 and 32 of
- Peitgen and Saupe[1]; cratered bodies in the Solar System are observed to
- obey this relationship. The formula used to obtain crater radii governed by
- this law from a uniformly distributed pseudorandom sequence was developed by
- Rudy Rucker.
-
- High resolution images with large numbers of craters often benefit from
- being piped through pnmsmooth . The averaging performed by this process
- eliminates some of the jagged pixels and lends a mellow ``telescopic image''
- feel to the overall picture.
-
- OPTIONS
-
- -number " n"
- Causes n craters to be generated. If no -number specification
- is given, 50000 craters will be generated. Don't expect to see them all!
- For every large crater there are many, many more tiny ones which tend simply
- to erode the landscape. In general, the more craters you specify the more
- realistic the result; ideally you want the entire terrain to have been
- extensively turned over again and again by cratering. High resolution
- images containing five to ten million craters are stunning but take quite a
- while to create.
-
- -height " height"
- Sets the height of the generated image to height pixels. The default height
- is 256 pixels.
-
- -width " width"
- Sets the width of the generated image to width pixels. The default width is
- 256 pixels.
-
- -xsize " width"
- Sets the width of the generated image to width pixels. The default width is
- 256 pixels.
-
- -ysize " height"
- Sets the height of the generated image to height pixels. The default height
- is 256 pixels.
-
- -gamma " factor"
- The specified factor is used to gamma correct the graymap in the same manner
- as performed by pnmgamma . The default value is 1.0, which results in a
- medium contrast image. Values larger than 1 lighten the image and reduce
- contrast, while values less than 1 darken the image, increasing contrast.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- BUGS
-
- The -gamma option isn't really necessary since you can achieve the same
- effect by piping the output from pgmcrater through pnmgamma . However,
- pgmcrater performs an internal gamma map anyway in the process of rendering
- the elevation array into a graymap, so there's no additional overhead in
- allowing a user-specified gamma.
-
- Real craters have two distinct morphologies. pgmcrater simulates only small
- craters, which are hemispherical in shape (regardless of the incidence angle
- of the impacting body, as long as the velocity is sufficiently high). Large
- craters, such as Copernicus and Tycho on the Moon, have a ``walled plain''
- shape with a cross-section more like:
-
-
-
- /\\ /\\
-
- _____/ \\____________/\\____________/ \\_____
-
-
- Larger craters should really use this profile, including the central
- peak, and totally obliterate the pre-existing terrain.
-
-
- "SEE ALSO"
-
- pgm (5),
- pnmgamma (1),
- pnmsmooth (1)
- [1] Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Images, New
- York: Springer Verlag, 1988.
-
- AUTHOR
-
- John Walker
- Autodesk SA
- Avenue des Champs-Montants 14b
- CH-2074 MARIN
- Suisse/Schweiz/Svizzera/Svizra/Switzerland
- Usenet:
- kelvin@Autodesk.com
-
- Fax:
- 038/33 88 15
-
- Voice:
- 038/33 76 33
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted,
- without any conditions or restrictions. This software is provided ``as
- is'' without express or implied warranty.
-
- PLUGWARE!
- If you like this kind of stuff, you may also enjoy ``James Gleick's
- Chaos--The Software'' for MS-DOS, available for $59.95 from your
- local software store or directly from Autodesk, Inc., Attn: Science
- Series, 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone:
- (800) 688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext
- 4886. Fax: (415) 289-4718. ``Chaos--The Software'' includes a more
- comprehensive fractal forgery generator which creates
- three-dimensional landscapes as well as clouds and planets, plus five
- more modules which explore other aspects of Chaos. The user guide of
- more than 200 pages includes an introduction by James Gleick and
- detailed explanations by Rudy Rucker of the mathematics and algorithms
- used by each program.
-
- ***************************************************************************
-
-
- PGM -> Edge
- ===========
-
- NAME
-
- pgmedge - edge-detect a portable graymap
-
- SYNOPSIS
-
- pgmedge [ pgmfile ]
-
-
- DESCRIPTION
-
- Reads a portable graymap as input.
- Outlines the edges, and writes a portable graymap as output.
-
- Piping the result through pgmtopbm -threshold and playing with the threshold
- value will give a bitmap of the edges. thresholding
-
- The edge detection technique used is to take the Pythagorean sum of two
- Sobel gradient operators at 90 degrees to each other. For more details see
- "Digital Image Processing" by Gonzalez and Wintz, chapter 7.
-
-
- "SEE ALSO"
-
- pgmenhance(1), pgmtopbm(1), pgm(5), pbm(5)
-
- AUTHOR
-
- Copyright (C) 1991 by Jef Poskanzer.
-
- ***************************************************************************
-
- PGM -> Enhance
- ==============
-
- NAME
-
- pgmenhance - edge-enhance a portable graymap
-
-
- SYNOPSIS
-
- pgmenhance [ -N ] [ pgmfile ]
-
-
- DESCRIPTION
-
- Reads a portable graymap as input. Enhances the edges, and writes a portable
- graymap as output.
- The edge enhancing technique is taken from Philip R. Thompson's "xim"
- program, which in turn took it from section 6 of "Digital Halftones by Dot
- Diffusion", D. E. Knuth, ACM Transaction on Graphics Vol. 6, No. 4, October
- 1987, which in turn got it from two 1976 papers by J. F. Jarvis et. al.
-
- OPTIONS
-
- The optional -N flag should be a digit from 1 to 9. 1 is the lowest level of
- enhancement, 9 is the highest, The default is 9.
-
-
- "SEE ALSO"
-
- pgmedge(1), pgm(5), pbm(5)
-
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
-
- ***************************************************************************
-
- PPM -> Pattern
- ==============
-
- NAME
-
- ppmpat - create a patterned pixelmap
-
- SYNOPSIS
-
- ppmpat -gingham2 | -g2 | -gingham3 | -g3 | -madras | -tartan | -poles
- |-squig | -camo | -anticamo width height
-
- DESCRIPTION
-
- Produces a portable pixmap of the specified width and height,with a pattern
- in it.
-
- This program is mainly to demonstrate use of the ppmdraw routines, a simple
- but powerful drawing library. See the ppmdraw.h include file for more info
- on using these routines. Still, some of the patterns can be rather pretty.
- If you have a color workstation, something like "ppmpat -squig 300 300" |
- "ppmquant 128" should generate a nice background.
-
- OPTIONS
-
- The different flags specify various different pattern types:
-
- -gingham2
- A gingham check pattern. Can be tiled.
-
- -gingham3
- A slightly more complicated gingham. Can be tiled.
-
- -madras
- A madras plaid. Can be tiled.
-
- -tartan
- A tartan plaid. Can be tiled.
-
- -poles
- Color gradients centered on randomly-placed poles. May need to be run
- through ppmquant .
-
- -squig
- Squiggley tubular pattern. Can be tiled. May need to be run through
- ppmquant.
-
- -camo
- Camouflage pattern.
- May need to be run through ppmquant .
-
- -anticamo
- Anti-camouflage pattern - like -camo, but ultra-bright colors.
- May need to be run through ppmquant .
-
- All flags can be abbreviated to their shortest unique prefix.
- REFERENCES
- Some of the patterns are from "Designer's Guide to Color 3" by Jeanne Allen.
-
- "SEE ALSO"
-
- pnmtile(1), ppmquant(1), ppm(5)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that
- copyright notice and this permission notice appear in supporting
- documentation. This software is provided "as is" without express or
- implied warranty.
- *****************************************************************************
-
-
- PPM -> Relief
- =============
-
- NAME
-
- ppmrelief - run a Laplacian relief filter on a portable pixmap
-
- SYNOPSIS
-
- ppmrelief [ ppmfile ]
-
- DESCRIPTION
-
- Reads a portable pixmap as input. Does a Laplacian relief filter, and writes
- a portable pixmap as output. The Laplacian relief filter is described in
- "Beyond Photography" by Holzmann, equation 3.19. It's a sort of
- edge-detection.
-
- "SEE ALSO"
-
- pgmbentley(1), pgmoil(1), ppm(5)
-
- AUTHOR
-
- Copyright (C) 1990 by Wilson Bent (whb@hoh-2.att.com)
-
- ***************************************************************************
-
- PPM -> To-PGM
- =============
-
- NAME
-
- ppmtopgm - convert a portable pixmap into a portable graymap
-
- SYNOPSIS
- ppmtopgm [ ppmfile ]
-
- DESCRIPTION
-
- Reads a portable pixmap as input. Produces a portable graymap as output. The
- quantization formula used is .299 r + .587 g + .114 b.
-
- Note that although there is pgmtoppm program, it is not necessary for simple
- conversions from pgm to ppm , because any ppm program can read pgm (and pbm)
- files automagically. pgmtoppm is for colorizing pgm file. Also,
- see ppmtorgb3 ppmtorgb3 for a different way of converting color to gray.
-
- QUOTE
-
- Cold-hearted orb that rules the night
- Removes the colors from our sight
- Red is gray, and yellow white
- But we decide which is right
- And which is a quantization error.
-
- "SEE ALSO"
-
- pgmtoppm(1), ppmtorgb3(1), rgb3toppm(1), ppm(5), pgm(5)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
-
- ***************************************************************************
-
- PNM -> Arithmetic
- =================
-
- pnmarith - perform arithmetic on two portable anymaps
-
- SYNOPSIS
-
- pnmarith -add | -subtract | -multiply pnmfile1 pnmfile2
-
- DESCRIPTION
-
- Reads two portable anymaps as input. Performs the specified arithmetic
- operation, and produces a portable anymap as output. The two input anymaps
- must be the same width and height.
-
- The arithmetic is performed between corresponding pixels in the two
- anymaps, as if maxval was 1.0, black was 0.0, and a linear scale in between.
- Results that fall outside of [0..1) are truncated.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- "SEE ALSO"
-
- pbmmask(1), pnmpaste(1), pnminvert(1), pnm(5)
-
- AUTHOR
-
- Copyright (C) 1989, 1991 by Jef Poskanzer.
- =============================================================================
- PNM -> Concatenate
- ==================
-
- pnmcat - concatenate portable anymaps
-
- SYNOPSIS
-
- pnmcat [ -white | -black ] -leftright | -lr [ -jtop | -jbottom ] pnmfile
- pnmfile ...
-
- pnmcat [ -white | -black ] -topbottom | -tb [ -jleft | -jright ] pnmfile
- pnmfile
- ...
-
- DESCRIPTION
-
- Reads portable anymaps as input. Concatenates them either left to right or
- top to bottom, and produces a portable anymap as output.
-
- OPTIONS
-
-
- If the anymaps are not all the same height (left-right) or width (top-bottom),
- the smaller ones have to be justified with the largest.
- By default, they get centered, but you can specify one side or the other
- with one of the -j* flags. So,-topbottom -jleft would stack the anymaps on
- top of each other, flush with the left edge. The -white and -black flags
- specify what color to use to fill in the extra space when doing this
- justification. If neither is specified, the program makes a guess.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- "SEE ALSO"
-
- pnm(5)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
- =============================================================================
- PNM -> Convolution
- ==================
-
- pnmconvol - general MxN convolution on a portable anymap
-
- SYNOPSIS
-
- pnmconvol convolutionfile [ pnmfile ]
-
- DESCRIPTION
-
- Reads two portable anymaps as input. Convolves the second using the first,
- and writes a portable anymap as output.
-
- Convolution means replacing each pixel with a weighted average of the
- nearby pixels. The weights and the area to average are determined by
- the convolution matrix. The unsigned numbers in the convolution file are
- offset by -maxval/2 to make signed numbers, and then normalized, so the
- actual values in the convolution file are only relative.
-
- Here is a sample convolution file;
- it does a simple average of the nine immediate neighbors, resulting
- in a smoothed image:
-
- P2
- 3 3
- 18
- 10 10 10
- 10 10 10
- 10 10 10
-
-
- To see how this works, do the above-mentioned offset: 10 - 18/2 gives 1.
- The possible range of values is from 0 to 18, and after the offset
- that's -9 to 9. The normalization step makes the range -1 to 1, and
- the values get scaled correspondingly so they become 1/9 - exactly what
- you want.
- The equivalent matrix for 5x5 smoothing would have maxval 50 and be
- filled with 26.
-
- The convolution file will usually be a graymap, so that the same convolution
- gets applied to each color component. However, if you want to use a pixmap
- and do a different convolution to different colors, you can certainly do
- that.
-
- "SEE ALSO"
-
- pnmsmooth(1), pnm(5)
-
- AUTHOR
-
- Copyright (C) 1989, 1991 by Jef Poskanzer.
- =============================================================================
- PNM -> Cut
- ==========
-
- pnmcut - cut a rectangle out of a portable anymap
-
- SYNOPSIS
-
- pnmcut x y width height [ pnmfile ]
-
- DESCRIPTION
-
- Reads a portable anymap as input. Extracts the specified rectangle, and
- produces a portable anymap as output.
-
- The x and y can be negative, in which case they are interpreted relative to
- the right and bottom of the anymap, respectively.
-
- "SEE ALSO"
-
- pnm(5)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
- =============================================================================
-
- PNM -> NoRaw
- ============
-
- NAME
-
- pnmnoraw - force a portable anymap into plain format
-
- SYNOPSIS
-
- pnmnoraw [ pnmfile ]
-
- DESCRIPTION
-
- Reads a portable anymap as input. Writes it out in plain (non-raw) format.
- This is fairly useless if you haven't defined the
- PBMPLUS_RAWBITS compile-time option.
-
- "SEE ALSO"
-
- pnm(5)
-
- AUTHOR
-
- Copyright (C) 1991 by Jef Poskanzer.
-
- ***************************************************************************
-
- PNM -> Paste
- ============
-
- pnmpaste - paste a rectangle into a portable anymap
-
- SYNOPSIS
-
- pnmpaste [ -replace | -or | -and | -xor ] frompnmfile x y [ intopnmfile ]
-
- DESCRIPTION
-
- Reads two portable anymaps as input.
- Inserts the first anymap into the second at the specified location,
- and produces a portable anymap the same size as the second as output.
-
- If the second anymap is not specified, it is read from stdin.
- The x and y can be negative, in which case they are interpreted relative to
- the right and bottom of the anymap, respectively.
-
- This tool is most useful in combination with pnmcut . For instance, if you
- want to edit a small segment of a large image, and your image editor cannot
- edit the large image, you can cut out the segment you are interested in,
- edit it, and then paste it back in.
-
- Another useful companion tool is pbmmask .
-
- OPTIONS
-
- The optional flag specifies the operation to use when doing the paste.
- The default is -replace . The other, logical operations are only allowed if
- both input images are bitmaps. These operations act as if white is TRUE and
- black is FALSE.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- "SEE ALSO"
-
- pnmcut(1), pnminvert(1), pnmarith(1), pnm(5), pbmmask(1)
-
- AUTHOR
-
-
- Copyright (C) 1989, 1991 by Jef Poskanzer.
- ***************************************************************************
-
- PNM -> Scale
- ============
-
- NAME
-
- pnmscale - scale a portable anymap
-
-
- SYNOPSIS
-
- pnmscale s [pnmfile]
-
- pnmscale -xsize | -width | -ysize | -height s [pnmfile]
-
- pnmscale -xscale | -yscale s [pnmfile]
-
- pnmscale -xscale | -xsize | -width s -yscale | -ysize | -height s [pnmfile]
-
- pnmscale -xysize x y [pnmfile]
-
-
- DESCRIPTION
-
- Reads a portable anymap as input. Scales it by the specified factor or
- factors and produces a portable anymap as output. If the input file is in
- color, the output will be too, otherwise it will be grayscale. You can both
- enlarge (scale factor > 1) and reduce (scale factor < 1).
-
- You can specify one dimension as a pixel size, and the other dimension
- will be scaled correspondingly.
-
- You can specify one dimension as a scale, and the other dimension will not
- be scaled.
-
- You can specify different sizes or scales for each axis.
-
- Or, you can use the special -xysize flag, which fits the image into the
- specified size without changing the aspect ratio.
-
- All flags can be abbreviated to their shortest unique prefix.
-
- If you enlarge by a factor of 3 or more, you should probably add a pnmsmooth
- step; otherwise, you can see the original pixels in the resulting image.
-
-
- "SEE ALSO"
-
- pbmreduce(1), pnmenlarge(1), pnmsmooth(1), pnm(5)
-
-
- AUTHOR
-
- Copyright (C) 1989, 1991 by Jef Poskanzer.
-
- ***************************************************************************
-
- PNM -> Tile
- ===========
-
- NAME
-
- pnmtile - replicate a portable anymap into a specified size
-
- SYNOPSIS
-
- pnmtile width height [ pnmfile ]
-
-
- DESCRIPTION
-
- Reads a portable anymap as input.
- Replicates it until it is the specified size, and produces a portable anymap
- as output.
-
- "SEE ALSO"
-
- pnm(5)
-
- AUTHOR
-
- Copyright (C) 1989 by Jef Poskanzer.
-
- ***************************************************************************