Originally, web images could only be in GIF format. The GIF image
format was created by CompuServe in 1987 to make it possible for images to be
viewed while online, so it was well suited to the Internet. GIF images can have
only up to 256 colors each. This limitation caused the major browser vendors to
add support for JPEG images in 1995. The JPEG format was created by a group of
photographic experts to store full-color-spectrum, continuous-tone images.
These images, when properly created, can be of much higher fidelity as well as
more highly compressed than a GIF encoding of the same source image. Another
file format is PNG. It too is an alternative to GIF. In almost all cases, you
will never care or notice which format is being used in your programs. The Java
image classes abstract the differences behind a clean interface.