img2ps
Description
The program creates compact EPS (encapsulated postscript) files and is straightforward to use. It can convert PGM, PPM, GIF, or JPEG to EPS or stand alone postscript files. In the case of JPEG files, the images can remain in compressed form and are decompressed by the printer or postscript viewer. In the case of color mapped GIF files, the color map is retained. To convert an image:
To get the usage, just execute:
Note that the default options will be good enough for most people, some of the features (partially described below) may be of interest. The "-b 1" option tells the program to threshold grayscale images and treat them as 1 bit per pixel, this is generally useful and helps in the fact that the program does not support PBM files (1 bit per pixel images). However, it will still generate compact files if you first convert the file to PGM and tell the program that it is a bi-level file with the -b 1 option. The "-d <int>" option allows you to adjust the printed size of the image, the size specified by latex commands overrides this, but this option is still useful in other situations. The "-m 1" option allows you to concatenate multiple images into a multi-page stand alone printable postscript document. This is useful for converting a bunch of scanned pages into a document. In the "-m 1" mode, the input file name is actually the name of a text file containing a list of file names, one file name per line. Executable
Version: 2001-07-20 Source Code
Links
|
Description
The program name is img2index and there is an included helper program img2pnm. The program also requires the standard programs pnmscale, ppmtogif, and cjpeg. Example usage is:
This will create thumbnails for all the images and a summary html page. Thumbnail generation is a little time consuming because I try to make them look good. There are a number of options which change the output - including the icon size and the number of columns. Just type "img2index" to get help. New Feature!
Details can be found here. Executables
Versions: 2001-04-30, 2001-04-26 Source Code
Links
|
Description
The program name is "txtform.ps" and it can be used to print a text file on a Postscript printer. It can be pre-pended to the beginning of any text file and that text file will now be a file which can be printed on a postscript printer. (The program automatically will wrap lines that are too long.) Admittedly, text printed in this way will not print as quickly as from a program like "enscript"; however, it can be extremely useful since it is a Postscript program and is platform independent. Example usage is:
By default the program displays the text as two rotated pages. However, the program is very flexible and has a number of options. These options can be set in two ways, by editing the program itself and changing the defaults or by pre-pending the file with an options file which sets all of the options. Example usage is:
The options allow you to select:
And don't forget you can use it to print any text file, including Postscript code:
On a technical note, the "options" file trick works by a neat little Postscript procedure I wrote called "cdef" which stands for conditional define. It works the same as standard Postscript "def", but it it will only define the named value if it is not already defined. So it is useful for implementing things like defaults.
Executables
Source Code
Version: 3/25/91, 3/25/91 |
I'd love to get some feedback on these programs and see how they work for you. I can be contacted at: chuck@cs.cmu.edu
The software provided here is provided without any express or implied warranty. The author assumes no responsibility for any loss incurred from use of the supplied software for either the implied use or any other use. |
Contact: chuck@cs.cmu.edu -- First Edition: 3/8/01 -- Last modified: Fri Jul 20 16:31:20 EDT 2001