JPEG versus GIF and other still image compression schemes.
GIF (Graphic Interchange Format) is a competing still image compression format that uses a type of compression called LZW that is patented by Unisys. GIF is currently widely used but concerns with licensing and copyright violations are making the use of JPEG more attractive. There are also other reasons why JPEG is superior to GIF for some applications.

JPEG stores full color information: 24 bits/pixel (16 million colors). GIF, the other image format widely used on the Internet, can only store 8 bits/pixel (256 or fewer colors).

GIF is reasonably well matched to inexpensive computer displays --- most run-of-the-mill PCs can't display more than 256 distinct colors at once. But full-color hardware is getting cheaper all the time, and JPEG images look much better than GIFs on such hardware

Generally speaking, JPEG is superior to GIF for storing full-color or gray-scale images of "realistic" scenes; that means scanned photographs and similar material. Any continuous variation in color, such as occurs in highlighted or shaded areas, will be represented more faithfully and in less space by JPEG than by GIF.

GIF does significantly better on images with only a few distinct colors, such as line drawings and simple cartoons. Not only is GIF lossless for such images, but it often compresses them more than JPEG can.

Other still image compression schemes do exist, such as PNG, which is not yet widely supported. TIFF uses a variety of compression techniques and is very widely supported.