Image File Formats


There are three types of image files formats that are used on the Web. They are JPG (Joint Photographers Experimental Group), GIF (Graphics Interchange Format), and PNG (Portable Networks Graphics. (Although the BMP file format is displayed by most browsers, it is not used on the Web for practical reasons.) JPG and GIF are the oldest of the three formats.

The JPG is a compressed format. Data is lost as the file is saved. The degree of compression is set by the image editing software, such as Photoshop or PaintShop Pro. JPG is best suited for photographs because of the way that it handles colors. Many thousands of colors can be displayed, although the actual number of colors will vary by image depending on how much compression has been chosen.

This photograph has been prepared using very little compressionThe JPG photograph on the right has been prepared using very little compression. The color is good and there is a high level of detail in the shadows.







Photograph with a high level of compression

The same image is displayed on the right. But, in this example it has been highly compressed. You will notice small "artifacts" that some times appear as dots or ghosting. More compression results is smaller file sizes and quicker downloads. It is necessary to select a compression level that balances quality with file size and download times.






Example of a GIF imageThe GIF image format is designed for images that have solid colors, such as drawings and logos. It is limited to no more than 256 colors, although most software allows the user to select less colors for small file sizes and quicker downloads. The GIF format does not handle photographs well because of the limited number of colors. However, it does handle solid colors extremely well. The image on the right is a GIF. Notice that the there are no artifacts of pixilation in the solid colors.



Photograph saved as a GIFThe photograph on the right has been saved as a GIF. Notice that there is a banding effect in the sky. Because GIF images are limited to no more that 256 colors, many of the colors in a typical sky photo will not be viewable. Those colors will be substituted by the closes available GIF color. The result will often be banding, stripes, or occasionally a "moire" or "watered-silk" effect.





A city square in PNG formatThe PNG format was originally intended to replace the GIF format. However, that did not come to pass. PNG images handle solid colors as well as GIFs do, and they also manage the photographic color well. Notice that in the photograph on the right that the colors are accurate and the sky does not display any of the banding effect that appears in the GIF example above.