Eric Weeks - personal pages - graphics techniques

Converting PostScript to other formats (GIF, BMP, PPM, etc.)

[home] [research]
[software] [pics]
[misc] [about me]

weeks@physics.emory.edu

This is useful for putting pictures you've made in PostScript onto your web page. Not that I'd know anything about people who do that. All I know about this I learned from Joe Newman. You have to use Ghostscript; on our linux computers it's called "gs". To convert a file called "blah.ps" to GIF, the command you use is:

gs -sDEVICE=gif8 -sOutputFile=blah.gif -r50 blah.ps

This must be typed *exactly* as shown, without any additional spaces and with the capitalization exactly as shown. When you run this command, gs will give you a message asking you to hit return; you must hit return to write the new file. Then type "quit" to exit gs. That's all there is to it.

The DEVICE can be any picture format that gs knows; type gs -? to see a list. The -r50 sets the resolution of the resulting output file; start with something small first and see how it looks. (30-60 is small; the first time I tried this I used 300 and created a 3 megabyte file.)

You might be able to avoid the hitting return / typing quit part, by adding the following flags (try one or the other methods):

gs -sDEVICE=gif8 -sOutputFile=blah.gif -r50 -c quit blah.ps
gs -sDEVICE=gif8 -sOutputFile=blah.gif -r50 -dBATCH -dNOPAUSE blah.ps

After you create the GIF file, you probably will want to use some graphics utility to crop the picture. I use "xv".

About the image:

This is a section of a quasi-crystalline tiling where the tiles have been replaced by small donut shapes. This was generated by a C program which produced PostScript output. Click here for more information about this picture.

If you find anything here useful, let me know to encourage me to put more of this sort of information up here; my email address is below.


Current address:
Eric R. Weeks
weeks(circle a)physics.emory.edu
Department of Physics
Emory University
Atlanta, GA 30322-2430