File formats - JPEG / GIF

The JPEG format (Joint Photographic Experts Group) which supports 24-bit color, can be read by many applications because it is a standardized image compression mechanism. Created especially for the transmission and storage of photographic images, it offers a significant reduction in file size. It uses a lossy compression scheme by averaging the data in blocks of 8 x 8 pixels. Color variations that existed in the original image are lessened.

JPEG can achieve very high compression factors, the amount of which can be varied. But beware, since every time you open and save a JPEG file the image is compressed again so repeatedly saving the same image will seriously degrade it.

The GIF format (Graphic Interchange Format) which was developed by Compuserve in 1987,  can only show 256 colors but it can choose any of the 16 million colors in a 24-bit image. These colors are stored in an index. It uses a lossless compression scheme.

An advantage over JPEG is that it handles images with a lot of contrast and fine details better than JPEG. This is the reason it is mostly used for line art such as cartoons, logos and text, and not so much for photographic images. JPEG and GIF are the most widely used formats on the Web nowadays.