-->

Previous | Table of Contents | Next

Page 385

pnmcrop

pnmcrop—Crop a portable anymap

SYNOPSIS


pnmcrop [-white|-black][-left][-right][-top][-bottom][pnmfile]

DESCRIPTION

pnmcrop reads a portable anymap as input, removes edges that are the background color, and produces a portable anymap as output.

OPTIONS

By default, it makes a guess as to what the background color is. You can override the default with the -white and -black flags.

The options -left, -right, -top and -bottom restrict cropping to the sides specified. The default is to crop all sides of the image.

All flags can be abbreviated to their shortest unique prefix.

SEE ALSO

pnmcut(1), pnm(5)

AUTHOR

Copyright " 1989 by Jef Poskanzer.

25 February 1989

pnmcut

pnmcut—Cut a rectangle out of a portable anymap

SYNOPSIS


pnmcut x y width height [pnmfile]

DESCRIPTION

pnmcut 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 " 1989 by Jef Poskanzer.

21 February 1989

pnmdepth

pnmdepth—Change the maxval in a portable anymap

SYNOPSIS


pnmdepth newmaxval [pnmfile]

Page 386

DESCRIPTION

pnmdepth reads a portable anymap as input, scales all the pixel values, and writes out the image with the new maxval. Scaling the colors down to a smaller maxval will result in some loss of information.

Be careful of off-by-one errors when choosing the new maxval. For instance, if you want the color values to be five bits wide, use a maxval of 31, not 32.

SEE ALSO


pnm(5), ppmquant(1), ppmdither(1)

AUTHOR

Copyright " 1989, 1991 by Jef Poskanzer.

12 January 1991

pnmenlarge

pnmenlarge—Read a portable anymap and enlarge it N times

SYNOPSIS


pnmenlarge N [pnmfile]

DESCRIPTION

pnmenlarge reads a portable anymap as input, replicates its pixels N times, and produces a portable anymap as output.

pnmenlarge can only enlarge by integer factors. The slower but more general pnmscale can enlarge or reduce by arbitrary factors, and pbmreduce can reduce by integer factors, but only for bitmaps.

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), pnmscale(1), pnmsmooth(1), pnm(5)

AUTHOR

Copyright " 1989 by Jef Poskanzer.

26 February 1989

pnmfile

pnmfile—Describe a portable anymap

SYNOPSIS


pnmfile [pnmfile] ...

DESCRIPTION

pnmfile reads one or more portable anymaps as input and writes out short descriptions of the image type, size, and so on. This is mostly for use in shell scripts, so the format is not particularly pretty.

SEE ALSO


pnm(5), file(1)

Page 387

AUTHOR

Copyright " 1991 by Jef Poskanzer.

9 January 1991

pnmflip

pnmflip—Perform one or more flip operations on a portable anymap

SYNOPSIS


pnmflip [-leftright|-lr][-topbottom|-tb][-transpose|-xy][-rotate90|-r90|-ccw ]

[-rotate270|-r270|-cw ][-rotate180|-r180][pnmfile]

DESCRIPTION

pnmflip reads a portable anymap as input, performs one or more flip operations in the order specified, and writes out a portable anymap.

OPTIONS

The flip operations available are left for right (-leftright or -lr); top for bottom (-topbottom or -tb); and transposition (-transpose or -xy). In addition, some canned concatenations are available: -rotate90 or -ccw is equivalent to -transpose -topbottom; -rotate270 or -cw is equivalent to -transpose -leftright; and -rotate180 is equivalent to -leftright -topbottom.

All flags can be abbreviated to their shortest unique prefix.

SEE ALSO

pnmrotate(1), pnm(5)

AUTHOR

Copyright" 1989 by Jef Poskanzer.

25 July 1989

pnmgamma

pnmgamma—Perform gamma correction on a portable anymap

SYNOPSIS


pnmgamma value [pnmfile]

pnmgamma redvalue greenvalue bluevalue [pnmfile]

DESCRIPTION

pnmgamma reads a portable anymap as input, performs gamma correction, and produces a portable anymap as output.

The arguments specify what gamma value(s) to use. A value of 1.0 leaves the image alone, less than 1 darkens it, and greater than 1 lightens it.

SEE ALSO


pnm(5)

AUTHOR

Copyright" 1991 by Bill Davidson and Jef Poskanzer.

12 January 1991

Page 388

pnmhistmap

pnmhistmap—Draw a histogram for a PGM or PPM file

SYNOPSIS


pnmhistmap [-black][-white][-max N][-verbose][pnmfile]

DESCRIPTION

pnmhistmap reads a portable anymap as input, although bitmap (PBM) input produces an error message and no image, and produces an image showing a histogram of the color (or gray) values in the input. A graymap (PGM) input produces a bitmap output. A pixmap (PPM) input produces pixmap output with three overlaid histograms: a red one for the red input, a green one for the green input, and a blue one for the blue input. The output is fixed in size: 256 pixels wide by 200 pixels high.

OPTIONS

-black Ignores the count of black pixels when scaling the histogram.
-white Ignores the count of white pixels when scaling the histogram.

The -black and -white options, which can be used separately or together, are useful for images with a large percentage of pixels whose value is zero or 255, which can cause the remaining histogram data to become unreadably small. Note that, for pixmap inputs, these options apply to all colors; if, for example, the input has a large number of bright-red areas, you will probably want to use the -white option.

-max N Force the scaling of the histogram to use N as the largest-count value. This is useful for inputs with a large percentage of single-color pixels that are not black or white.
-verbose Report the progress of making the histogram, including the largest-count value used to scale the output.

All flags can be abbreviated to their shortest unique prefix.

BUGS

Assumes maxval is always 255. Images with a smaller maxval will only use the lower-value side of the histogram. This can be overcome either by piping the input through pnmdepth 255 or by cutting and scaling the lower-value side of the histogram. Neither is a particularly elegant solution.

Should allow the output size to be specified.

SEE ALSO


pgmhist(1), ppmhist(1), pgm(5), ppm(5)

AUTHOR

Wilson H. Bent, Jr. (whb@usc.edu).

25 October 1993

pnmindex

pnmindex—Build a visual index of a bunch of anymaps

SYNOPSIS


pnmindex [-size N][-across N][-colors N][-black] pnmfile ...

DESCRIPTION

This script makes small versions of a bunch of anymaps, adds labels, and concatenates them together into a collage.

Previous | Table of Contents | Next