NOAA

Geophysical Fluid
Dynamics Laboratory

Skip to: [content] [navigation]
If you are using Navigator 4.x or Internet Explorer 4.x or Omni Web 4.x , this site will not render correctly!

Vis > image_printing > Image Formats

Image Formats

The major image formats that one is likely to encounter include SGI RGB, GIF, JPEG, TIFF, PNG, PhotoCD, and PostScript. Here is a quick summary of their characteristics:

SGI RGB GIF JPEG TIFF PNG PhotoCD PostScript
8-bit (1) (1) (1)
24-bit
Lossy (2)

1: This 8-bit format usually refers to grayscale.
2: The only potential loss is when converting down from a 24-bit original.


SGI RGB

SGI RGB is among the most common image formats at GFDL, but it's not widely supported on non-SGI machines. It is used when snapping images off the screen with imgsnap and rendering images with Explorer. SGI RGB can use RLE compression to greatly reduce the file size. Here is SGI's official RGB image specification.

GIF

GIF (Graphics Interchange Format) is certainly one of the most widely used image formats of all time. It was originally popularized on the PC by CompuServe and now is available across virtually all platforms. A large majority of programs that deal with images can handle GIF. GIF is so widespread due to its long history, its efficient compression, and more recently due to the explosive growth of the World Wide Web since only GIF and JPEG images can be embeded in WWW pages (inline images). GIF does have a significant limitation in that it can only store up to 8-bit color-indexed data (no 24-bit truecolor).

There are basically two flavors of GIF files, GIF87a and GIF89a. GIF89a is a newer and more advanced format that supports all the features of GIF87a plus additional ones such as comment blocks and transparency. Not all programs that claim to load GIF files will necessarily support GIF89a, although most should.

JPEG

JPEG (a standard from the Joint Photographic Experts Group) is the only popular image format that is "lossy". The JPEG format actually discards data (from a 24-bit work space) in an image that is beyond what the human eye can usually notice. When compressing an image and then uncompressing it again, you will not get exactly the same image you started with. JPEG has user-adjustable compression in the form of a quality setting. This quality setting ranges from 1 to 100 with lower numbers resulting in better compression but worse image quality (more data is thrown out). JPEG works best with images containing large numbers of colors such as scanned photographs. On computer generated images, it has a tendency to blur sharp edges (especially text) unless the quality is high.

TIFF

TIFF (Tagged Image File Format) is one of the dominant image formats for 24-bit graphics. It originated on the Macintosh and PC, so portability is not much of a problem. Most programs that work in 24-bit can handle TIFF. It should be noted, however, that there are several varieties of TIFF images with different compression techniques. Some SGI programs may not be able to read all the different TIFF varieties. It is probably safest to always go with LZW (Lempel Ziv Welch) compression for TIFF images. All SGI programs can deal with LZW and it's among the most efficient anyway. Here is the Unofficial TIFF Home Page for further information.

PNG

The PNG (Portable Network Graphics) format came about as a result of trying to find a better alternative to GIF. This became desirable after Unisys patented the LZW data compression and decompression technology used in the GIF format (as well as in TIFF, PDF, and others). Unisys began imposing licensing fees for all programs that use LZW, hence all those that support GIF. This currently doesn't seem to affect free programs, but the situation is subject to change and as such hangs over the heads of developers. PNG, on the other hand, is completely open and free. It not only seeks to replace GIF, but to provide extra capabilities like support for 24-bit truecolor. PNG also has better efficient compression in the form of "zlib" - a derivative used in the gzip and pkzip compression programs. For more information, check out the PNG home pages.

PhotoCD

PhotoCD is a format developed by Kodak for putting scanned camera photographs onto a CD. Each PhotoCD image is stored as an "IMAGE PAC" file with multiple resolutions (192x128, 384x256, 768x512, 1536x1024, and 3072x2048 - sometimes the image resolutions are listed backwards as height by width rather than width by height) and about 100 of these images can fit onto one CD. The images can be read from a PhotoCD and saved as computer files (~4-5MB each) each of which contains all the resolutions. SGI's Image Works and ImgView are among the few programs which can read them. Kodak has much more information about the PhotoCD format as well as some very nice sample images.

PostScript

Althought a PostScript file can contain image data, it is not really thought of as being an image format. PostScript is, of course, the only way to print an image at GFDL. The only real disadvantage to PostScript is that files are typically very large due to the fact that they're usually ASCII text.


Examples

As can be seen by the above descriptions, all image formats are not created equal. In an effort to better illustrate their differences, here is an example of a 24-bit image saved in various formats with ImageMagick.

File size in bytes
Raw 24-bit 921600
SGI RGB (RLE) 520425
GIF (LZW) 118937
JPEG (100) 405923
JPEG (90) 152392
JPEG (80) 108249
JPEG (70) 87765
JPEG (60) 74690
JPEG (50) 65735
JPEG (40) 57477
JPEG (30) 48727
JPEG (20) 37266
JPEG (10) 24174
JPEG (1) 11588
TIFF (LZW) 462124
PNG (24-bit) 248269
PNG (8-bit) 99584

Note: The number next to the JPEG format is the quality setting. You can also run a program called compview to see a side-by-side visual comparison of an image and its JPEG compressed version including the quality, file sizes, and compression ratio.

Lasted modified: Tuesday, 09-Jan-01 15:27:01 EST

smaller bigger reset
last modified: June 27 2005.