All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one. You may separate an option name and its value with white space instead of an equals sign.
This program is part of Netpbm.
pnmtops reads a Netpbm image stream as input and produces Encapsulated PostScript (EPSF) as output.
If the input file is in color (PPM), pnmtops generates a color PostScript file. Some PostScript interpreters can't handle color PostScript. If you have one of these you will need to run your image through ppmtopgm first.
If you specify no output dimensioning options, the output image is dimensioned as if you had specified -scale=1.0, which means aproximately 72 pixels of the input image generate one inch of output (if that fits the page).
Use -imagewidth, -imageheight, -equalpixels, -width, -height, and -scale to adjust that.
Each image in the input stream becomes one complete one-page Postscript program in the output. (This may not be the best way to create a multi-page Postscript stream; someone who knows Postscript should work on this).
The line at the top of the file produced by pnmtops is either "%!PS-Adobe-3.0 EPSF-3.0" or just "%!PS-Adobe-3.0". The numbers do not reflect the Postscript language level, but the version of the DSC comment specification and EPS specification implmented. The Postscript language level is in the "%%LanguageLevel:" comment. pnmtops omits "EPSF-3.0" if you specify -setpage, because it is incorrect to claim EPS compliance if the file uses setpagedevice.
Encapsulated Postscript (EPSF) is a subset of Postscript (i.e. the set of streams that conform to EPSF is a subset of those that conform to Postscript). It is designed so that an EPSF stream can be embedded in another Postscript stream. A typical reason to do that is where an EPSF stream describes a picture you want in a larger document.
An Encapsulated Postscript document conforms to the DSC (Document Structuring Convention). The DSC defines some Postscript comments (they're comments from a Postscript point of view, but have semantic value from a DSC point of view).
More information about Encapsulated Postscript is at http://www.cs.indiana.edu/docproject/programming/postscript/eps.html.
Many of the ideas in pnmtops come from Dirk Krause's bmeps. See SEE ALSO
If these dimensions are greater than the page size, you get Postscript output that runs off the page.
You cannot use imagewidth or imageheight with -scale or -equalpixels.
You cannot use -equalpixels with -imagewidth, -imageheight, or -scale.
But pnmtops rounds the number to something that is an integral number of output device pixels. E.g. if the output device is 300 dpi and you specify -scale=1.0, then 75 (not 72) pixels of input becomes one inch of output (4 output pixels for each input pixel). Note that the -dpi option tells pnmtops how many pixels per inch the output device generates.
If the size so specified does not fit on the page (as measured either by the -width and -height options or the default page size of 8.5 inches by 11 inches), pnmtops ignores the -scale option, issues a warning, and scales the image to fit on the page.
This option specifies the dots per inch resolution of your output device. The default is 300 dpi. In theory PostScript is device-independent and you don't have to worry about this, but in practice its raster rendering can have unsightly bands if the device pixels and the image pixels aren't in sync.
Also this option is crucial to the working of the equalpixels option.
If you specify NxN, the first number is the horizontal resolution and the second number is the vertical resolution. If you specify just a single number N, that is the resolution in both directions.
The page size has no effect, however, when you specify the -imagewidth, -imageheight, or -equalpixels options.
These options may also affect positioning of the image on the page and even the paper selected (or cut) by the printer/plotter when the output is printed. See the -nosetpage option.
The default is 8.5 inches by 11 inches.
This may, however, make the Postscript program considerable smaller.
This usually doesn't help at all with a color image and -psfilter, because in that case, the Postscript program pnmtops creates has the red, green, and blue values for each pixel together, which means you would see long runs of identical bytes only in the unlikely event that the red, green, and blue values for a bunch of adjacent pixels are all the same. But without -psfilter, the Postscript program has all the red values, then all the green values, then all the blue values, so long runs appear wherever there are long stretches of the same color.
See the -rle option for information about compression in general.
You must specify -psfilter if you specify -flate.
This option was new in Netbpm 10.27 (March 2005).
Before Netpbm 10.32 (February 2005), you could not specify -rle and -flate together.
With the -ascii85 option, pnmtops uses "ascii85" encoding instead. This is an encoding in which 32 bits are encoded into five characters of text. Thus, it produces less text for the same raster than asciihex. But ascii85 is not available in Postscript Level 1, whereas asciihex is.
This option was new in Netbpm 10.27 (March 2005).
This option was new in Netbpm 10.27 (March 2005). Before that, pnmtops always used the custom readstring.
The custom code can't do flate or ascii85 encoding, so you must use -psfilter if you want those (see -flate, -ascii85).
This option was new in Netpbm 10.27 (March 2005). Before that, pnmtops always used Level 2.
This option was new in Netbpm 10.27 (March 2005).
This option was new in Netbpm 10.27 (March 2005).
For backward compatibility, pnmtops accepts the option -center, but it has no effect.
From January through May 2002, the default was to include "setpagedevice" and this option did not exist. Before January 2002, there was no way to include "setpagedevice" and neither the -setpage nor -nosetpage option existed.
See the -setpage option for the history of this option.
This options was new in Netpbm 10.27 (March 2005). Earlier versions of pnmtops always include the showpage.
This option was new in Netpbm 10.27 (March 2005).
If the PNM image has a maxval greater than 255, pnmtops will probably produce incorrect output unless you use the -psfilter option or use the -level option to demand Postscript Level 1.
Postscript is described in the Postscript Language Reference Manual.
bmeps converts from Netpbm and other formats to Encapsulated Postscript. It is suitable for hooking up to dvips so you can include an image in a Latex document just with an \includegraphics directive. bmeps has a few functions pnmtops does not, such as the ability to include a transparency mask in the Postscript program (but not from PAM input -- only from PNG input).
pnm, gs, psidtopgm, pstopnm, pbmtolps, pbmtoepsi, pbmtopsg3, ppmtopgm,
Copyright (C) 1989, 1991 by Jef Poskanzer.
Modified November 1993 by Wolfgang Stuerzlinger, [email protected]