computing services  
home dept of astronomy mcdonald observatory research hobby-eberly telescope directory university of texas  
home
department of astronomy
mcdonald observatory
research
hobby-eberly telescope
directory
university of texas
 
 
Image Conversions for Astronomers:
Postscript vs. Powerpoint

by Mark Cornell
4/2/04

As you know, I have looked into the question of how to insert a line drawing made by sm, originally stored as a Postscript file, into a Powerpoint presentation, preserving as much resolution as possible. The previous method using JPEGs as an intermediate format produced Powerpoint images that were too fuzzy (because of the inherently lossy nature of JPEG image compression). I believe that I have found an acceptable scheme. Note that I made no attempt to also make the output file as small as possible, but they do come out fairly small anyway.

The bottom line is to take the Postscript file, transfer it to a Mac, read it into Adobe Illustrator, and then select File...Export. Save the file in PNG format, specifying High (300 ppi) Resolution with a background color of White, making sure that "Anti-Alias" is selected, and that "Interlaced" is not selected. The resulting PNG file can be directly inserted as a picture into Powerpoint (and most other modern software), and produces a nice result when scaled inside Powerpoint. It is not necessary to try to adjust the size or resolution of the image further, before inserting into Powerpoint. Rasterizing at 300dpi is necessary to preserve the original Postscript file's native resolution. One could select "Interlaced" images for output instead. This makes bigger images, but ones that can be displayed more nicely in successive scans on a web page over a slow network link. I don't know if Powerpoint would take any advantage of that.

Note that Illustrator is better for this purpose than Photoshop, because Illustrator is vector-graphics-based, while Photoshop is bitmap-graphics-based. Illustrator does not rasterize the image until you execute the Export command, and then does so exactly as you specify, once. Photoshop, on the other hand, rasterizes the image immediately upon input, and it is easy to end up further interpolating the pixels, possibly reducing resolution even more. If you must run Photoshop on a Postscript image, be sure to rasterize at a high resolution (like 300dpi) when you first input the image. Do not take the default resolution of 72dpi.

PNG format is the replacement for GIF, and has been around since 1995. PNG is now supported in our latest patched xv (as of today), and in many other programs such as Mozilla, Adobe Illustrator, Adobe Photoshop, Microsoft Powerpoint, etc., so in principle one could use it instead of JPEG format. However PNG's lossless compression often produces files that are bigger than JPEG's inherently lossy compression, and JPEG remains the recommended format for actual pictures.

To reiterate, PNGs are not a particularly good way to make image files smaller, although they are smaller than GIFs. Their lossless compression usually results in larger files than JPEGs. PNGs are a way to make high quality intermediate files that can be inserted into other graphics applications, like Powerpoint. If you already have a JPEG file, there is no point in converting it to a PNG file, since you have already lost resolution in the original JPEG compression.


Related topic:

If your original image is a JPEG file, and you want to make a SMALL (and hence lower quality) Postscript file for insertion into a TeX document destined for astro-ph, then do the following. Load the JPEG file into xv on a Sun, and re-save it as a JPEG file, but with the quality set to 50%. Then convert the compressed JPEG into a Postscript file with the command:

jpeg2ps -h whatever.jpg > whatever.eps

If your original image is a LARGE Postscript file, and you want to make a SMALL Postscript file for insertion into a TeX document destined for astro-ph, then try the following:

ps2ps input.ps output.ps
gzip output.ps


This Postscript-rewriting program can be quite amazing:

Original file:

-rw-r--r-- 1 cornell 11 708592 Mar 30 10:48 n1353phot.ps

Just gzipping that produces a result that is too big for astro-ph:

-rw-r--r-- 1 cornell 11 151042 Mar 30 10:48 n1353phot.ps.gz

Instead run ps2ps on it to make test.ps:

-rw-r--r-- 1 cornell 11 458026 Apr 2 15:10 test.ps

and run gzip to compress a lot:

-rw-r--r-- 1 cornell 11 38805 Apr 2 15:10 test.ps.gz

The result is just fine for astro-ph and I can't tell the difference between it and the original when printed.

There are all-Mac and all-UNIX variants of the above steps.






Dr. Mark Cornell is the former head of McDonald Observatory Computing Services.
 



14 April 2004
Astronomy Program · The University of Texas at Austin · Austin, Texas 78712
prospective student inquiries: studentinfo@astro.as.utexas.edu
site comments: www@www.as.utexas.edu