-->

Previous | Table of Contents | Next

Page 381

pjtoppm

pjtoppm—Convert an HP PaintJet file to a portable pixmap

SYNOPSIS


pjtoppm [paintjet]

DESCRIPTION

pjtoppm reads an HP PaintJet file as input and converts it into a portable pixmap. This was a quick hack to save some trees, and it only handles a small subset of the paintjet commands. In particular, it will only handle enough commands to convert most raster image files.

REFERENCES

HP PaintJet XL Color Graphics Printer User's Guide

SEE ALSO

ppmtopj(1)

AUTHOR

Copyright" 1991 by Christos Zoulas.

14 July 1991

pktopbm

pktopbm—Convert packed (PK) format font into portable bitmap(s)

SYNOPSIS


pktopbm pkfile[.pk] [-c num] pbmfile ...

DESCRIPTION

pktopbm reads a packed (PK) font file as input and produces portable bitmaps as output. If the filename "-" is used for any of the filenames, the standard input stream (or standard output where appropriate) will be used.

OPTIONS

-c num Sets the character number of the next bitmap written to num.

SEE ALSO


pbmtopk(1), pbm(5)

AUTHOR

Adapted from Tom Rokicki's pxtopk by Angus Duggan (ajcd@dcs.ed.ac.uk).

6 August 1990

pnmalias

pnmalias—Antialias a portable anymap.

SYNOPSIS


pnmalias [-bgcolor color][-fgcolor color][-bonly][-fonly][-balias][-falias]

[-weight w][pnmfile]

Page 382

DESCRIPTION

pnmalias reads a portable anymap as input and applies antialiasing to background and foreground pixels. If the input file is a portable bitmap, the output antialiased image is promoted to a graymap, and a message is printed informing the user of the change in format.

OPTIONS

_bgcolor colorb, Set the background color to colorb, and the foreground to color to colorf. Pixels with these values
_fgcolor colorf will be antialiased. By default, the background color is taken to be black, and foreground color is assumed to be white. The colors can be specified in five ways:
n A name, assuming that a pointer to an X11-style color names file was compiled in.
n An X11-style hexadecimal specifier: rgb:r/g/b, where r, g, and b are each 1- to 4-digit hexadecimal numbers.
n An X11-style decimal specifier: rgbi:r/g/b, where r, g, and b are floating-point numbers between 0 and 1.
n For backwards compatibility, an old-X11-style hexadecimal number: #rgb, #rrggbb, #rrrgggbbb, or #rrrrggggbbbb.
n For backwards compatibility, a triplet of numbers separated by commas: r,g,b, where r, g, and b are floating-point numbers between 0 and 1. (This style was added before MIT came up with the similar rgbi style.)

Note that even when dealing with graymaps, background and foreground colors need to be specified in the fashion described in the preceding list. In this case, background and foreground pixel values are taken to be the value of the red component for the given color.

_bonly, _fonly Apply antialiasing only to background (_bonly), or foreground (_fonly) pixels.
_balias, _falias Apply antialiasing to all pixels surrounding background (_balias), or foreground (_falias) pixels. By default, antialiasing takes place only among neighboring background and foreground pixels.
_weight w Use w as the central weight for the aliasing filter. w must be a real number in the range 0 < w < 1. The lower the value of w is, the "blurrier" the output image is. The default is w = 1/3.

SEE ALSO

pbmtext(1), pnmsmooth(1), pnm(5)

AUTHOR

Copyright" 1992 by Alberto Accomazzi, Smithsonian Astrophysical Observatory.

30 April 1992

pnmarith

pnmarith—Perform arithmetic on two portable anymaps

SYNOPSIS


pnmarith -add|-subtract|-multiply|-difference pnmfile1 pnmfile2

DESCRIPTION

pnmarith 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, with a linear scale in between. Results that fall outside of [0..1) are truncated.

Page 383

The operator -difference calculates the absolute value of


pnmarith -subtract pnmfile1 pnm-file2

In other words, no truncation is done.

All flags can be abbreviated to their shortest unique prefix.

SEE ALSO


pbmmask(1), pnmpaste(1), pnminvert(1), pnm(5)

AUTHOR

Copyright" 1989, 1991 by Jef Poskanzer. Lightly modified by Marcel Wijkstra (wijkstra@fwi.uva.nl).

26 August 1993

pnmcat

pnmcat—Concatenate portable anymaps

SYNOPSIS


pnmcat [-white|-black] -leftright|-lr [-jtop|-jbottom] pnmfile pnmfile ...

pnmcat [-white|-black] -topbottom|-tb [-jleft|-jright] pnmfile pnmfile ...

DESCRIPTION

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

12 March 1989

pnmcomp

pnmcomp—Composite two portable anymap files together

SYNOPSIS


pnmcomp [-invert][-xoffN] [-yoffN] [-alphapgmfile] overlay [pnm-input][pnm-output]

Page 384

DESCRIPTION

pnmcomp reads in a portable anymap image and puts an overlay upon it, with optional alpha mask. The -alphapgmfile allows you to also add an alpha mask file to the compositing process; the range of max and min can be swapped by using the -invert option. The -xoff and -yoff arguments can be negative, allowing you to shift the overlay off the top corner of the screen.

SEE ALSO


pnm(5)

AUTHOR

Copyright" 1992 by David Koblas (koblas@mips.com).

21 February 1989

pnmconvol

pnmconvol—General MxN convolution on a portable anymap

SYNOPSIS


pnmconvol convolutionfile [pnmfile]

DESCRIPTION

pnmconvol 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 offset mentioned in the preceding paragraph: 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 5¥5 smoothing would have maxval 50 and be filled with 26.

The convolution file will usually be a graymap, so that the same convolution is 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" 1989, 1991 by Jef Poskanzer.

13 January 1991

Previous | Table of Contents | Next