-->

Previous | Table of Contents | Next

Page 378

pgmtoppm

pgmtoppm—Colorize a portable graymap into a portable pixmap

SYNOPSIS


pgmtoppm colorspec [pgmfile]

pgmtoppm colorspec1-colorspec2 [pgmfile]

pgmtoppm -map mapfile [pgmfile]

DESCRIPTION

pgmtoppm reads a portable graymap as input, colorizes it by multiplying the gray values by specified color or colors, and produces a portable pixmap as output.

If only one color is specified, black in the PGM file stays black and white in the PGM file turns into the specified color in the PPM file. If two colors (separated by a hyphen) are specified, then black gets mapped to the first color and white gets mapped to the second.

The color can be specified in five ways:

Also, the -map flag lets you specify an entire colormap to be used. The mapfile is just a PPM file; it can be any shape, all that matters is the colors in it and their order. In this case, black gets mapped to the first color in the mapfile, and white gets mapped to the last.

SEE ALSO


rgb3toppm(1), ppmtopgm(1), ppmtorgb3(1), ppm(5),

pgm(5)

AUTHOR

Copyright" 1991 by Jef Poskanzer.

11 January 1991

pi1toppm

pi1toppm—Convert an Atari Degas PI1 into a portable pixmap

SYNOPSIS


pi1toppm [pi1file]

DESCRIPTION

pi1toppm reads an Atari Degas PI1 file as input and produces a portable pixmap as output.

SEE ALSO

ppmtopi1(1), ppm(5), pi3topbm(1), pbmtopi3(1)

AUTHOR

Copyright" 1991 by Steve Belczyk (seb3@gte.com) and Jef Poskanzer.

19 July 1990

Page 379

pi3topbm

pi3topbm—Convert an Atari Degas PI3 file into a portable bitmap

SYNOPSIS


pi3topbm [pi3file]

DESCRIPTION

pi3topbm reads an Atari Degas PI3 file as input. Produces a portable bitmap as output.

SEE ALSO


pbmtopi3(1), pbm(5), pi1toppm(1), ppmtopi1(1)

AUTHORS

Copyright" 1988 by David Beckemeyer (bdt!david) and Diomidis D. Spinellis.

11 March 1990

picttoppm

picttoppm—Convert a Macintosh PICT file into a portable pixmap

SYNOPSIS


picttoppm [-verbose][-fullres][-noheader][-quickdraw][-fontdirfile] [pictfile]

DESCRIPTION

picttoppm reads a PICT file (version 1 or 2) and outputs a portable pixmap. Useful as the first step in converting a scanned image to something that can be displayed on UNIX.

OPTIONS

_fontdir file Make the list of BDF fonts in file available for use by pict-toppm when drawing text. For the format of the fontdir file, see the "fontdir File Format" subsection.
_fullres Force any images in the PICT file to be output with at least their full resolution. A PICT file may indicate that a contained image is to be scaled down before output. This option forces images to retain their sizes and prevent information loss. Use of this option disables all PICT operations except images.
_noheader Do not skip the 512-byte header that is present on all PICT files. This is useful when you have PICT data that was not stored in the data fork of a PICT file.
_quickdraw Execute only pure quickdraw operations. In particular, turn off the interpretation of special PostScript printer operations.
_verbose Turns on verbose mode, which prints a whole bunch of information that only picttoppm hackers really care about.

BUGS

The PICT file format is a general drawing format. picttoppm does not support all the drawing commands, but it does have full support for any image commands and reasonable support for line, rectangle, polygon, and text drawing. It is useful for converting scanned images and some drawing conversion.

Memory is used very liberally with at least six bytes needed for every pixel. Large bitmap PICT files will likely run your computer out of memory.

Page 380

fontdir File Format

picttoppm has a built-in default font and your local installer probably provided adequate extra fonts. You can point picttoppm at more fonts that you specify in a font directory file. Each line in the file is either a comment line, which must begin with #, or font information. The font information consists of four whitespace separated fields. The first is the font number, the second is the font size in pixels, the third is the font style, and the fourth is the name of a BDF file containing the font. The BDF format is defined by the X Window System and is not described here.

The font number indicates the type face. Here is a list of known font numbers and their faces.

0 Chicago
1 Application font
2 New York
3 Geneva
4 Monaco
5 Venice
6 London
7 Athens
8 San Francisco
9 Toronto
11 Cairo
12 Los Angeles
20 Times Roman
21 Helvetica
22 Courier
23 Symbol
24 Taliesin

The font style indicates a variation on the font. Multiple variations may apply to a font and the font style is the sum of the variation numbers, which are

1 Boldface
2 Italic
4 Underlined
8 Outlined
16 Shadow
32 Condensed
64 Extended

Obviously, the font definitions are strongly related to the Macintosh. More font numbers and information about fonts can be found in Macintosh documentation.

SEE ALSO

Inside Macintosh volumes 1 and 5, ppmtopict(1), ppm(5)

AUTHOR

Copyright "1993 George Phillips.

29 November 1991

Previous | Table of Contents | Next