This curious procedure serves to purify PostScript files that are not includable in other documents because they fail to conform to Adobe's Encapsulated PostScript specification (see Appendix G of any of the three editions of the PostScript Language Reference Manual). pstopngtops converts PostScript files to PostScript bitmap page images, with user control of resolution, cropping, and margin padding.
For maximal color fidelity, bitmaps are produced in 24-bit color mode, with 16,777,216 possible colors.
The PNG format is an Internet Standard defined in RFC 2083 (1997), and major Web browsers, PostScript level 3 (1999), and picture editors such as gimp(1) photoshop(1), and xv(1) now support it.
Unlike the Compuserv GIF format, which uses the Lempel-Ziv-Welch (LZW) compression algorithm protected under U.S. Patent 4,558,302 (10-Dec-1985) held by Unisys Corporation, PNG is free of patent and copyright claims, and the PNG format is recommended for replacement of GIF images.
For each file given on the command line, an output file is written with the same basename as the input file, but with extension xps, or the name specified by the -extension option.
With the -icon option, small companion files with the same name are also written in a subdirectory icons, which is created if necessary.
If no files are given on the command line, then stdin is read, and stdout is written, and no icon file can be produced.
pstopngtops is a convenient interface to gs(1), pngtopnm(1), pnmcrop(1), pnmmargin(1), and pnmtops(1), which do the real work.
To avoid confusion with options, if a filename begins with a hyphen, it must be disguised by a leading absolute or relative directory path, e.g. /tmp/-foo.eps or ./-foo.eps.
Options may begin with either UNIX-style single hyphens, or GNU/POSIX-style double hyphens, and may be abbreviated to any unique prefix.
[Default: 1.0]
In filter mode (no files on the command line), this option is ignored.
Use this option to trap the complex command pipelines for further private customization.
[Default: 100 dpi, suitable only for screen resolution].
This option, a POSIX convention, provides a general way for a user to pass options to programs invoked by another program. The value option is passed after any generated in response to options supplied to pstopngtops. For example, -Wpnmmargin,-black would cause any added margin to be colored black.
T. Boutell, RFC 2083: PNG (Portable Network Graphics) Specification Version 1.0, available at ftp://ftp.internic.net/rfc/rfc2083.txt.
John Miano, The programmer's guide to compressed image files: JPEG, PNG, GIF, XBM, BMP, Addison-Wesley Longman, Harlow, Essex, England 1999, ISBN 0-201-60443-4.
Greg Roelofs, PNG: The Definitive Guide, O'Reilly and Associates, Inc., Sebastopol, CA, Cambridge, MA, and Beijing, China, 1999, ISBN 1-56592-542-4.
The PostScript language has evolved through three upward-compatible major levels, each defined by an edition of these books:
Adobe Systems Incorporated, PostScript Language Reference Manual, First edition, Addison-Wesley, Reading, MA, 1985, ISBN 0-201-10174-2.
Adobe Systems Incorporated, PostScript Language Reference Manual, Second edition, Addison-Wesley, Reading, MA, 1990, ISBN 0-201-18127-4.
Adobe Systems Incorporated, PostScript Language Reference, Third edition, Addison-Wesley, Reading, MA, 1999, ISBN 0-201-37922-8.
PostScript printing devices contain language implementations that are also compatible with one or more of these levels, though usually with a lag time of two to three years after an edition of the books.
Nelson H. F. Beebe, Ph.D. Center for Scientific Computing University of Utah Department of Mathematics, 322 INSCC 155 S 1400 E RM 233 Salt Lake City, UT 84112-0090 Tel: +1 801 581 5254 FAX: +1 801 585 1640, +1 801 581 4148 Email: [email protected], [email protected], [email protected], [email protected] WWW URL: http://www.math.utah.edu/~beebe