Chuck Rosenberg


img2ps

Description

    A postscript related image file conversion utility which I wrote for Linux.

    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:

      img2ps test.gif test.eps

    To get the usage, just execute:

      img2ps

    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

    The executable (should work on Red Hat 5.x-7.x) is available here: img2ps

    Version: 2001-07-20

Source Code

    I am currently not distributing source code on this page. If you are interested in receiving source code, please e-mail me.

Links

   


img2index

Description

    An image organizing / album utility which I wrote for Linux.

    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:

      img2index -o index.html *.jpg

    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!

    This version introduces a "config" file which allows you to name and process images.

    Details can be found here.

Executables

Source Code

    I am currently not distributing source code on this page. If you are interested in receiving source code, please e-mail me.

Links


txtform.ps

Description

    A text formatting utility for postscript which I wrote.

    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:

    1. number of leaves per page (1-4, 3 = two long vertical columns)
    2. text point size
    3. text font
    4. paper page dimensions
    5. left, right, top, and bottom margins

    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

    Since Postscript code is interpreted, there is only source code.

Source Code


General Notes

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.


Return [Piercing Eyes] Home

Contact: chuck@cs.cmu.edu -- First Edition: 3/8/01 -- Last modified: Fri Jul 20 16:31:20 EDT 2001


Web Counter Graphics Follow


FastCounter

Click Here!