outputing to compressed image formats

I am looking for a way to output an the contents of an openGL window to a compressed image format. It is important that I am able to support the widest range of formats (PNG especially important) and platforms (linux, solaris and irix minimum). I can already output to PPM (uncompressed) and EPS (specify each line individually).

Use some third party libraries. Here’s some links to libraries for the most common formats.

PNG
JPEG
TIFF